Garry's Mod Wiki

cookie.Set

  cookie.Set( string key, string value )

Description

Creates / updates a cookie in the Database.

Arguments

1 string key
The name of the cookie.
2 string value
The data stored in the cookie.




Example

Sets & prints out a cookie's value.

cookie.Set('My-Cookie','Hello World') print('Set My-Cookie') print('My-Cookie:',cookie.GetString('My-Cookie'))
Output:
Set My-Cookie My-Cookie: Hello World