about making automatic gate
#1

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...
Reply
#2

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
Reply
#3

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
Reply
#4

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..
Reply
#5

Also you can visit wiki

https://sampwiki.blast.hk/wiki/Automatic_Gates
Reply
#6

gamer_z what premade gamemods do you mean?
Reply
#7

just go to the gamemodes section and pick one where most things are exlpioaned with // (comments)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)