cookie.Set

From GMod Wiki

Jump to: navigation, search
Function
Syntax cookie.Set( String Name, String Value )
Where is this used?
Description:
Sets the value of a cookie.
Returns: nil
Part of Library: cookie
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Cookie.Set]Cookie.Set [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

Descriptionsets cookie MyColor to blue and prints it
Used onNewerClient.png
Code
 
cookie.Set("MyColor", "blue")
local color = cookie.GetString("MyColor")
print("My favorite color is " .. color)
 
OutputMy favorite color is blue


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox