SA-MP Forums Archive
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=216022)



automatic gate problem - hadzx - 24.01.2011

ok so basicly i have a automatic gate and when i go to it - it opens but when my friend goes to it - it doesnt open so if you want 2 pm me and il give u the ip and show u and heres the code that i have 4 it



Код:
new AutomaticGate;
forward gatec();
Код:
SetTimer("gatec", 500, true);
 	AutomaticGate = CreateObject(975,1717.04809570,1298.18298340,11.49500275,0.00000000,0.00000000,269.75000000);
Код:
public gatec()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInRangeOfPoint(i, 10.0, 1717.04809570,1298.18298340,11.49500275))
            {
                MoveObject(AutomaticGate, 1716.09643555,1293.90063477,11.49500275, 5.0);
            }
   	        else
            {
                MoveObject(AutomaticGate, 1717.04809570,1298.18298340,11.49500275, 5.0);
            }
        }
    }
}
plz help ty and if u want 2 see it pm me and il give u IP


Re: automatic gate problem - Joe Staff - 24.01.2011

Follow the tutorial at wiki.sa-mp.com just search for Automatic Gates


Re: automatic gate problem - HyperZ - 24.01.2011

https://sampwiki.blast.hk/wiki/Automatic_Gates
Edit: too late.


Re: automatic gate problem - hadzx - 24.01.2011

thanks guys fixed it <3