[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
#2

pawn Код:
//Change
if(Faction[playerid] >= 1)
//to
if(Faction[playerid] == 1 || Faction[playerid] == 2)
Reply
#3

Quote:
Originally Posted by Smally
Посмотреть сообщение
pawn Код:
//Change
if(Faction[playerid] >= 1)
//to
if(Faction[playerid] == 1 || Faction[playerid] == 2)
Thx bbycakes.

REP +
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)