11.08.2011, 16:37
On top i added
ongamemodeinit
OnPlayerConnect
And the forward and public
The Problem is when i go near the object the gate wont even move...
pawn Код:
new AutoGate;
pawn Код:
AutoGate = CreateDynamicObject(980,1285.20581055,-2056.52587891,60.50704956,0.00000000,0.00000000,87.75000000); //object(airportgate) (1)
pawn Код:
SetTimerEx( "AGCheck", 750, true, "i", playerid );
pawn Код:
forward AGCheck(playerid);
public AGCheck(playerid)
{
if(PlayerData[playerid][AdminLevel] > 3)
{
if(IsPlayerInRangeOfPoint(playerid,8.0,1285.20581055,-2056.52587891,60.50704956))
{
MoveObject(AutoGate,1285.6149902344,-2045.03515625,60.507049560547,2.00);
}
else
{
MoveObject(AutoGate,1285.20581055,-2056.52587891,60.50704956,2.00);
}
}
return 1;
}