Quote:
Originally Posted by MadeMan
Add a variable that checks if gate is already opened/closed.
pawn Код:
new GateOpen;
public TowServiceGate1(playerid) { if(PlayerToPoint(5.0,playerid, 1937.4944,2148.5791,10.8203) && PlayerInfo[playerid][pFaction] == 1 && GateOpen == 0) { b_MoveObject(Entrance1, 1937.729, 2137.095, 11.531, 2); b_MoveObject(Entrance2, 1937.708, 2158.011, 11.531, 2); GateOpen = 1; } else if(!PlayerToPoint(5.0, playerid, 1937.4944,2148.5791,10.8203) && PlayerInfo[playerid][pFaction] == 1 && GateOpen == 1) { b_MoveObject(Entrance1, 1937.729, 2144.566, 11.531, 2); b_MoveObject(Entrance2, 1937.708 ,2152.508 ,11.531, 2); GateOpen = 0; } }
|
Thats not really needed and it doesn't help much..
Quote:
Originally Posted by Don Correlli
Use SetTimerEx, the variant can pass parameters to the function (playerid parameter in your case).
|
Sorry, but Im not good at SetTimerEx. Could you help me with it or try explaining how to do it?