Quote:
Originally Posted by Jefff
You need use OnPlayerCommandReceived callback
pawn Code:
public OnPlayerCommandReceived(playerid, cmdtext[]) { if(PlayerInfo[playerid][pDM] == 1) // if is player in DM { if(!strcmp(cmdtext,"/exitdm",true)) return 1; // he can use only /exitdm return !SendClientMessage(playerid,0xFFFFFF,"You cant use commands in the DM Zone/Jail"); // return 0 is blocking all other commands } return 1; }
|
Thanks will try , how about when a player types in an invalid command , what can i write to make it send a message like (Invalid Command! Check /CMDS for the commands list) ??