register_clcmd
- Синтаксис
-
native register_clcmd(const client_cmd[], const function[], flags = -1, const info[] = "", FlagManager = -1, bool:info_ml = false);
Переменная | Описание |
---|---|
client_cmd |
Command to register |
function |
Callback function |
flags |
Admin privilege flags required |
info |
Command description |
FlagManager |
0 opts out of flag manager, 1 opts in, -1 selects automatically |
info_ml |
If true, the parameter "info" will be looked up as multilingual key |
- Описание
- Registers a callback to be called when the client executes a command from the console.
- Пометка
-
For a list of possible access flags, see the ADMIN_* constants in amxconst.inc
- Пометка
-
Opting in to FlagManager enables the admin privileges to be overwritten by the end user via the cmdaccess.ini config file.
- Пометка
-
Automatic detection for FlagManager will only include a command if it has required privileges (flags is not -1) and it is not a command starting with "say".
- Возвращает
- Command id, 0 on failure