27.03.2015, 15:10
You added too much parentheses and cmdtext doesn't have "/" before the command.
pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(GetPVarInt(playerid, "LoggedIn") == 0)
{
SendClientMessage(playerid,COLOR_RED, "[SERVER]: You can't use commands if you didn't login.");
return 0;
}
if(GetPVarInt(playerid, "Injured") != 0 || GetPVarInt(playerid, "Dragged") == 1 || GetPVarInt(playerid, "Cuffed") != 0)
{
if(strcmp(cmdtext, "ems", true, 3) == 0 || strcmp(cmdtext, "me", true, 2) == 0 || strcmp(cmdtext, "do", true, 2) == 0 || strcmp(cmdtext, "giveup", true, 6) == 0 || strcmp(cmdtext, "revive", true, 6) == 0)
{
SendClientMessage(playerid,COLOR_RED, "[SERVER]: You can't use commands while: injured/dragged/cuffed.");
return 0;
}
}
return 1;
}