17.03.2015, 02:03
It works exactly the same way as in commands.
The difference, is that the first parameter is the command itself.
Hope it helps.
The difference, is that the first parameter is the command itself.
PHP код:
public OnRconCommand(cmd[])
{
new command[40];
if(sscanf(cmd,"s[40]",command))
return 0;
if(!strcmp(command,"test",true))
{
printf("You typed rcon command 'test'!");
return 1;
}
else if(!strcmp(command,"anothertest",true))
{
printf("You typed rcon command 'anothertest'!");
return 1;
}
return 0;
}