create_cvar
- Синтаксис
-
native create_cvar(const name[], const string[], flags = FCVAR_NONE, const description[] = "", bool:has_min = false, Float:min_val = 0.0, bool:has_max = false, Float:max_val = 0.0);
Переменная | Описание |
---|---|
name |
Cvar name |
string |
Default cvar value |
flags |
Optional bitsum of flags specifying cvar behavior |
description |
Optional description of the cvar |
has_min |
Optional boolean that specifies if the cvar has a minimum value |
min_val |
Minimum floating point value |
has_max |
Optional boolean that specifies if the cvar has a maximum value |
max_val |
Maximum floating point value |
- Описание
- Creates a new cvar for the engine.
- Пометка
-
This has the same effect as register_cvar() but provides more options.
- Пометка
-
For a list of possible cvar flags see FCVAR_* constants above.
- Пометка
-
If an already existing cvar is registered it will not be duplicated. The default value is only set when the cvar is registered for the very first time since the server was started. Cvar bounds are overwritten by the create_cvar() call just as if they were re-set using set_pcvar_bounds().
- Пометка
-
The returned cvar pointer should be used with the get_pcvar_* and set_pcvar_* set of functions.
- Возвращает
- Unique cvar pointer