Posts: 74
Threads: 8
Joined: Feb 2014
Mhm.....you can check out my FilterScript.
| Jeremy | - AUTOMATIC GATES
Just Replace the codes with yours.
For your help:
pawn Код:
forward TGate1();
public TGate1()
{
new gateopen;
if(!gateopen)
MoveObject(Gate1, -838.46210, 2742.37427, 46.26330, 3); // THE OBJECTS POSITION WHEN IT'S CLOSED
gateopen = 0;
for(new i=GetMaxPlayers(); i > -1; i--)
{
if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 5.0, -843.3140, 2738.1877, 44.7193))
{
gateopen = 1;
MoveObject(Gate1, -838.4621, 2742.3743, 42.2823, 3); // OBJECTS POSITION WHEN IT'S OPENED
break;
}
}
}
Posts: 21
Threads: 5
Joined: Nov 2013
Reputation:
0
Its not working can you make and give me ls airport gates model no. 988 Please
Posts: 152
Threads: 2
Joined: Nov 2013
Reputation:
0
Maybe this help you out....
new LSAPGateA, LSAPGateB, bool:AirportGateStatus;
public OnFilterScriptInit()
{
LSAPGateA = CreateObject(988, 1964.342, -2189.776, 13.533, 0.0, 0.0, 180.0);
LSAPGateB = CreateObject(988, 1958.851, -2189.777, 13.553, 0.0, 0.0, 180.0);
return 1;
}
public OnFilterScriptExit()
{
DestroyObject(LSPGateA);
DestroyObject(LSAPGateB);
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if (IsPlayerInRangeOfPoint(playerid, 10.0, 1961.389, -2189.856, 13.553))
{
if (AirportGateStatus == false)
{
AirportGateStatus = true;
MoveObject(LSAPGateA, 1968.697, -2189.776, 13.553, 5.0);
MoveObject(LSAPGateB, 1954.571, -2189.777, 13.553, 5.0);
}
}
}
return 1;
}
public OnObjectMoved(objectid)
{
if (objectid == LSAirportGateA)
{
if (AirportGateStatus)
SetTimer("CloseAirportGate", 1000, false);
}
return true;
}
public CloseAirportGate()
{
MoveObject(LSAPGateA, 1964.342, -2189.776, 13.533, 5.0);
MoveObject(LSAPGateB, 1958.851, -2189.777, 13.553, 5.0);
AirportGateStatus = false;
}
Posts: 21
Threads: 5
Joined: Nov 2013
Reputation:
0
Please give me full script