02.03.2015, 03:41
I can't seem to figure out what I have done wrong here. I've tried to rewrite it several different ways. I can't figure out what is happing. I am the chief of lspd, but yet I still cant use the cmd. (pFLeader == 11)
Any help is greatly appreciated
pawn Код:
if(strcmp(cmd, "/gov", true) == 0)
{
if((PlayerInfo[playerid][pFLeader] != 11) || (PlayerInfo[playerid][pFLeader] != 13) || (PlayerInfo[playerid][pFLeader] != 12) || (PlayerInfo[playerid][pFLeader] != 16))
{
SendClientMessage(playerid, COLOR_YELLOW, "Leader of LSPD, EMS, GOV, or NG only!");
return ;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_USAGE, "USAGE: /gov [message]");
return 1;
}
format(string, sizeof(string), "* City Message: %s", result);
SendClientMessageToAll(COLOR_DBLUE, string);
return 1;
}