23.08.2015, 02:26
This is a better way to do the command though, it looks nicer...
Remember to include the exclamation mark (!), that means IS NOT or DOES NOT, so it is saying "IF playerid IS NOT admin RETURN SendClientMessage..." else if a player is an admin it will send the commands.
It's a personal preference, both work equally as well.
PHP код:
CMD:acmds(playerid, params[])
{
if(!IsPlayerAdmin(playerid))
return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
SendClientMessage(playerid, COLOR, "Message");
return 1;
}
It's a personal preference, both work equally as well.