RegAdminCmd

Last Updated2016-05-21
Created At2007-02-17

Creates a console command as an administrative command. If the command does not exist, it is created. When this command is invoked, the access rights of the player are automatically checked before allowing it to continue. Admin commands are case sensitive from both the client and server.

native void RegAdminCmd(const char[] cmd, ConCmd callback, int adminflags, const char[] description = "", const char[] group = "", int flags = 0)

Parameters

const char[] cmd
String containing command to register.
ConCmd callback
A function to use as a callback for when the command is invoked.
int adminflags
Administrative flags (bitstring) to use for permissions.
const char[] description
Optional description to use for help.
const char[] group
String containing the command group to use. If empty, the plugin's filename will be used instead.
int flags
Optional console flags.

Return Value

void

Error

Command name is the same as an existing convar.