[Help] Faction command restrictions.
#1

I have this under my /gate command:
Код:
if(Faction[playerid] >= 1)
Is their anyway I could get it so only factions 1 and 2 can do it? Or maybe 1 between 3? I wanted SFPD and Government to be able to open it (1 and 2) but not Citizens or SFES (0 and 3) Anyway to do this?

Код:
CMD:gate(playerid)
{
if(Faction[playerid] >= 1)
{
    if(IsPlayerInRangeOfPoint(playerid, 20.0, -1631.0911,688.6709,7.1875) && gStatus == false)
    {
      MoveDynamicObject(SFPDGate1,  -1639.82, 688.49, 6.37, 2.9);
      MoveDynamicObject(SFPDGate2,  -1639.82, 688.49, 6.37, 2.9);
      gStatus = true;
    }
    else if(IsPlayerInRangeOfPoint(playerid, 20.0, -1631.0911,688.6709,7.1875) && gStatus == true)
    {
      MoveDynamicObject(SFPDGate1,   -1623.43, 688.50, 6.37, 2.9);
      MoveDynamicObject(SFPDGate2,   -1631.32, 688.49, 6.37, 2.9);
      gStatus = false;
    }
    return 1;
}
return SendClientMessage(playerid, COLOR_NEWBIE, "You don't have access to this gate!");
}
Reply


Messages In This Thread
[Help] Faction command restrictions. - by BornHuman - 18.01.2014, 15:38
Re: [Help] Faction command restrictions. - by Smally - 18.01.2014, 15:41
Re: [Help] Faction command restrictions. - by BornHuman - 18.01.2014, 15:42

Forum Jump:


Users browsing this thread: 2 Guest(s)