Automatic gate problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Automatic gate problem (
/showthread.php?tid=275903)
Automatic gate problem -
Tanush123 - 11.08.2011
On top i added
ongamemodeinit
pawn Код:
AutoGate = CreateDynamicObject(980,1285.20581055,-2056.52587891,60.50704956,0.00000000,0.00000000,87.75000000); //object(airportgate) (1)
OnPlayerConnect
pawn Код:
SetTimerEx( "AGCheck", 750, true, "i", playerid );
And the forward and public
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;
}
The Problem is when i go near the object the gate wont even move...
Re: Automatic gate problem -
MadeMan - 11.08.2011
MoveObject > MoveDynamicObject
Re: Automatic gate problem -
Darnell - 11.08.2011
You are using a streamer, use MoveDynamicObject
EDIT:
Nvm, MadeMan was faster.
Re: Automatic gate problem -
Tanush123 - 11.08.2011
oh thnx