Can some one make example ?
I can't get it work or I do it wrong.
Quote:
Usage: cmd String containing command to register.
callback A function to use as a callback for when the command is invoked.
adminflags Administrative flags (bitstring) to use for permissions.
description Optional description to use for help.
group String containing the command group to use. If empty, the plugin's filename will be used instead.
flags Optional console flags.
|
PHP Code:
#include <sourcemod>
public OnPluginStart()
{
RegAdminCmd("sm_test", admcmd_test, ADMFLAG_SLAY, "Hii Ho Hoi", "group_something", FCVAR_NONE);
}
public Action:admcmd_test(client, args)
{
PrintToChat(client, "Helou");
return Plugin_Handled;
}
admins.cfg
Code:
Admins
{
"Admin"
{
"auth" "steam"
"identity" "STEAM_0:1:123456"
"group" "group_1"
}
}
admin_groups.cfg
Code:
"group_1"
{
/**
* You can override commands and command groups here.
* Specify a command name or group and either "allow" or "deny"
* Examples:
* ":CSDM" "allow"
* "csdm_enable" "deny"
*/
Overrides
{
":group_something" "allow"
}
}
or I even try this
admin_overrides.cfg
Code:
Overrides
{
/**
* By default, commands are registered with three pieces of information:
* 1)Command Name (for example, "csdm_enable")
* 2)Command Group Name (for example, "CSDM")
* 3)Command Level (for example, "changemap")
*
* You can override the default flags assigned to individual commands or command groups in this way.
* To override a group, use the "@" character before the name. Example:
* Examples:
* "@CSDM" "b" // Override the CSDM group to 'b' flag
* "csdm_enable" "bgi" // Override the csdm_enable command to 'bgi' flags
*
* Note that for overrides, order is important. In the above example, csdm_enable overwrites
* any setting that csdm_enable previously had.
*
* You can make a command completely public by using an empty flag string.
*/
"@group_something" ""
}
returns everytime
[SM] You do not have access to this command.