06.06.2010, 01:51
pawn Код:
new RestrictCMD;
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/Blockcmd", true)
{
if(!IsPlayerAdmin(playerid)) return 0;
if(RestrictCMD == 0)
{
RestrictCMD = 1;
SendClientMessage(playerid, COLOR, "Restricted the command");
}
if(RestrictCMD == 1)
{
RestrictCMD = 0;
SendClientMessage(playerid, COLOR, "Un-restricted the command");
}
}
if(!strcmp(cmdtext, "/Randomcmd", true)
{
if(RestrictCMD == 1) return 0;
//Rest of command here
}
return 0;
}
~[HiC]TheKiller