07.11.2012, 10:14
I got a moving gate command working, But now i want to lock them to groups, Basically. Either the leader can /lockgate and /unlock gate, and anyone can access the gates, or it only works for the members in the faction. Heres my cmd
Will rep if someone can help, thanks.
Код:
CMD:gate(playerid,params[]) { if(IsPlayerInRangeOfPoint(playerid,10,1428.6456, 242.0033, 20.3020)) { switch(Open)//Check whether the gate opened or closed { case true://If the gate opened { MoveObject(Gate,1428.6456, 242.0033, 20.3020,4);//Close the gate Open = false;//false for closed } case false://If the gate closed { MoveObject(Gate,1426.5259, 237.4716, 20.3020,4);//Open the gate Open = true;//true for opened } } return 1; } SendClientMessage(playerid,ORANGE,"You're not close enough to the gate.");//Send error message if player isn't near any gate return 1; }