03.08.2013, 20:44
Quote:
There's no reason whatsoever to add an if-statement for every command. You're using ZCMD, it has some callbacks that you can use.
pawn Код:
|
Or the way i do it:
pawn Код:
forward OnPlayeCommandPerformed(playerid,cmdtext[],success);
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(IsSpawned[playerid]== false)
{
new string[100];
format(string,sizeof(string),"{00FF00}%s{FF2800} cannot be used before you've spawned",cmdtext);
return SendClientMessage(playerid,-1,string);
}
return 1;
}