Hey there!
So - I'm currently creating a plugin which contains !pause and !unpause commands.
Unfortunately it's not working.
I've registered my commands as follows:
PHP Code:
RegConsoleCmd("pause", pause_match);
RegConsoleCmd("unpause", unpause_match);
The commands refer to the following Actions:
PHP Code:
public Action pause_match(int client, int args) {
char full[256];
GetCmdArgString(full, sizeof(full));
if(!gamepause_active && GameRules_GetProp("m_bWarmupPeriod") == 0) {
new String:name[99];
ServerCommand("mp_pause_match");
GetClientName(client, name, sizeof(name));
PrintToChatAll("%s triggered a game pause!",name);
gamepause_active = true;
} else if(gamepause_active) {
PrintHintText(client,"A pause has already been triggered!");
} else if(GameRules_GetProp("m_bWarmupPeriod") == 1) {
PrintHintText(client,"Can't start pause during warmup!");
}
}
public Action unpause_match(int client, int args) {
char full[256];
GetCmdArgString(full, sizeof(full));
if(!gamepause_active) {
PrintHintText(client,"There is no scheduled pause!");
} else {
// Both teams need to !unpause
// Check if pause was set by admin or players
}
}
So far so good - everything compiles just fine.
But I can't call the command ingame.
What I noticed is, that if I renamd my commands to something like "123_pause", it works.
Is it possible that there already are !pause and !unpause commands built in by sourcemod?
If yes - how can I overwrite those??
Thanks in advance!