C# Class GarrysModLuaShared.cookie

Used to store permanent variables/settings on clients that will persist between servers. They are stored in the cl.db SQLite database located in the root Garry's Mod folder.
Afficher le fichier Open project: OmegaExtern/gmod-csharp-binary-module

Méthodes publiques

Méthode Description
Delete ( LuaState luaState, string name ) : void

Deletes a cookie on the client.

GetNumber ( LuaState luaState, string name, object @default = null ) : double

Gets the value of a cookie on the client as a number.

GetString ( LuaState luaState, string name, object @default = null ) : string

Gets the value of a cookie on the client as a string.

Set ( LuaState luaState, string name, string value ) : void

Sets the value of a cookie on the client. These are stored in the cl.db file.

Method Details

Delete() public static méthode

Deletes a cookie on the client.
public static Delete ( LuaState luaState, string name ) : void
luaState LuaState Pointer to lua_State struct.
name string The name of the cookie that you want to delete.
Résultat void

GetNumber() public static méthode

Gets the value of a cookie on the client as a number.
public static GetNumber ( LuaState luaState, string name, object @default = null ) : double
luaState LuaState Pointer to lua_State struct.
name string The name of the cookie that you want to get.
@default object
Résultat double

GetString() public static méthode

Gets the value of a cookie on the client as a string.
public static GetString ( LuaState luaState, string name, object @default = null ) : string
luaState LuaState Pointer to lua_State struct.
name string The name of the cookie that you want to get.
@default object
Résultat string

Set() public static méthode

Sets the value of a cookie on the client. These are stored in the cl.db file.
public static Set ( LuaState luaState, string name, string value ) : void
luaState LuaState Pointer to lua_State struct.
name string The name of the cookie that you want to set.
value string Value to store in the cookie.
Résultat void