SA-MP Forums Archive
Help With Automatic Gates - 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: Help With Automatic Gates (/showthread.php?tid=118853)



Help With Automatic Gates - wordas - 05.01.2010

ok so i want it to open gates automaticly if anyone is near

i put this code on Ongamemodeinit but it dosent work why?

Код:
for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(PlayerToPoint(15.0, i, -205.532806, 989.914429, 18.148491))
	  {
    MoveObject(pdvartai, -205.532806, 989.914429, 18.148491, 2.5);
    SetTimer("PdVartaiUzdaryti", 10000, 0);
	  }
  }



Re: Help With Automatic Gates - MadeMan - 05.01.2010

You need to set a timer to check the gate.

https://sampwiki.blast.hk/wiki/Automatic_Gates - this is a guide how to make automatic gates. There are some mistakes in that code, but if you have problems, post them here.


Re: Help With Automatic Gates - wordas - 05.01.2010

i need a gate that closes after 3seconds or so... anyone example plz?