Small Command Help?
#1

So this is a fraction of my code.. for some reason, even though my pFLeader is '11' (LSPD) it still says that I'm not a leader of any city services...

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_RED, "You aren't the leader of any City Services (LSPD, EMS, GOV, NG)");
return 1;
}
Any help is GREATLY appreciated.
Reply
#2

pawn Код:
if(strcmp(cmd, "/gov", true) == 0)
{
    if((PlayerInfo[playerid][pFLeader] == 11) || (PlayerInfo[playerid][pFLeader] == 13) || (PlayerInfo[playerid][pFLeader] == 12) || (PlayerInfo[playerid][pFLeader] == 16))
    {
        //some shit here
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "You aren't the leader of any City Services (LSPD, EMS, GOV, NG)");
    }
    return 1;
}
Reply
#3

Isn't this saying that if you ARE the leader, you cannot do it?
Reply
#4

Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
Isn't this saying that if you ARE the leader, you cannot do it?
pawn Код:
if(strcmp(cmd, "/gov", true) == 0)
{
    if((PlayerInfo[playerid][pFLeader] == 11) || (PlayerInfo[playerid][pFLeader] == 13) || (PlayerInfo[playerid][pFLeader] == 12) || (PlayerInfo[playerid][pFLeader] == 16))
    {
        //some shit here : if he is 11,12,13,16
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "You aren't the leader of any City Services (LSPD, EMS, GOV, NG)");
    }
    return 1;
}
did something wrong xd
Reply
#5

Thanks heaps bro, it worked
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)