Garry's Mod Wiki

Garry's Mod Wiki

Cookie - Library

Functions to persist data on a user's computer.

The data will be read / written to / from a database
corresponding to the realm the library was used in.

Realm Database File
Server garrysmod/sv.db
Client garrysmod/cl.db
Menu garrysmod/mn.db

Methods

cookie.Delete( string key )
Removes any cookie with the given name. Does nothing if the cookie doesn't exist.
number cookie.GetNumber( string name, any default = nil )
Gets the value of a cookie on the client as a number.
string cookie.GetString( string name, any default = nil )
Gets the value of a cookie on the client as a string.
cookie.Set( string key, string value )
Creates / updates a cookie in the Database.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...