register_srvcmd

Синтаксис

native register_srvcmd(const server_cmd[], const function[], flags = -1, const info[] = "", bool:info_ml = false);

Употреба

client_cmd
Command to register
function
Callback function
flags
Admin privilege flags required
info
Command description
info_ml
If true, the parameter "info" will be looked up as multilingual key

Описание

Registers a callback to be called when the server executes a command from the
console.

Забележка

For a list of possible access flags, see the ADMIN_* constants in
amxconst.inc

Връщаща стойност

Command id, 0 on failure

Грешка

If an invalid callback function is specified, an error
will be thrown.