C# Класс 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.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

Delete() публичный статический Метод

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.
Результат void

GetNumber() публичный статический Метод

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
Результат double

GetString() публичный статический Метод

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
Результат string

Set() публичный статический Метод

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.
Результат void