02.06.2016, 13:32
Maybe do something like this:
?
PHP Code:
cmd_id:pm(CMD_PM);
cmd:pm(playerid, params[])
{
return 1;
}
alias:pm("sms");
public OnPlayerCommandReceived(playerid, cmdtext[]) // executed before cmd
{
return 1;
}
public OnPlayerCommandPerformed(playerid, cmd[], params[], cmdid, result) // executed after cmd
{
if (result == -1)
{
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Unknown command.");
return;
}
if (cmdid == CMD_PM)
{
//
}
// else if ...
}