about making automatic gate - 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: about making automatic gate (
/showthread.php?tid=92737)
about making automatic gate -
Sfinx_17 - 21.08.2009
how i can make a automatic gate?? please i need help i know that "wiki" tutorial but that is to complicated for me...and i know also i have to save possitions for the /gate open /gate closed i have allready the possitions in my Sa directory...

..now all i need is the codes to put in my script and where to put to have a automatic gate please can anybody show me ..? i will apreciate that please...
Re: about making automatic gate -
Gamer_Z - 21.08.2009
i suggest you learn the PAWN basics

okay lol here we go xD
1. make your object
2. make a public that will get the players pos and
3.
check if it's withing the gate's opening range (using PlayerToPoint or u could use IsPlayerInArea..)
PlayerToPoint checks if the player is at a distance to 1 given point
IsPlayerInArea checks if the player is in a specified "square" (there are also some things like "IsPlayerInCube")
4. then also if "it's true" make happen the gate opens (using MoveObject)
- also forward the public!!(forward publicname(something you got in the public at this place...);
5. put somewhere a timer (for the public that will check the pos.. i recommend 5631 (random value and its a 5,6 sec check)
no
6. should work now...
EDIT:
BTW found this(if this will not help you here under you have an EXACT explanation of all things you need to know)
http://forum.sa-mp.com/index.php?topic=54701.0
Re: about making automatic gate -
Sfinx_17 - 21.08.2009
i don't understand nothing ..please can anybody can explain me better? sorry but i hate pawno codes because is to complicated..please i need

help
Re: about making automatic gate -
Gamer_Z - 22.08.2009
man if u hate PAWN and if u don't want to learn it you'll never understand... try first learning from some other premade gamemodes..
Re: about making automatic gate -
pliva_sb - 22.08.2009
Also you can visit wiki
https://sampwiki.blast.hk/wiki/Automatic_Gates
Re: about making automatic gate -
Sfinx_17 - 22.08.2009
gamer_z what premade gamemods do you mean?
Re: about making automatic gate -
Gamer_Z - 22.08.2009
just go to the gamemodes section and pick one where most things are exlpioaned with // (comments)