18.01.2014, 15:38
I have this under my /gate command:
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?
Код:
if(Faction[playerid] >= 1)
Код:
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!");
}


