27.03.2015, 15:01
Quote:
No need to, his way was good. His only mistake was the way he compared the string. He'll be still using ZCMD.
If the player is injured and the command was performed is not equal to "/ems", then do something. |
Anyway, it should look like this:
pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(GetPVarInt(playerid, "Injured") != 0 || GetPVarInt(playerid, "Cuffed") != 0)
{
if(strcmp(cmdtext, "ems", true, 3) == 0)
{
SendClientMessage(playerid,COLOR_RED, "[SERVER]: You can't use commands while: injured/recovering/cuffed.");
return 0;
}
}
return 1;
}