SA-MP Forums Archive
[Tutorial] 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: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Automatic gates (/showthread.php?tid=279757)



Automatic gates - Hiddos - 28.08.2011

Yes, it has been done many times before, but I made this for someone who kept bugging me about it on Skype. Perhaps somebody else could use it as well?

Introduction
Automatic gates are common on quite a few servers, for example roleplay or Cops N' Robbers. (Most roleplay servers are Cops N' Robbers by the way)
This tutorial should cover the basics on creating a simple automatic gate. Any questions, comments, suggest and/or complaints can be posted in this topic.

PS: If you don't know what an automatic gate is, it's a gate that automatically opens when a player is near.
PPS: Some values in this tutorial (coordinates) are imaginary and are just for showing what the heck I'm talking about, I don't recommend using them for your actual gate.

Getting started
Before we start, we first need the coordinates of our gate. What I've stated below should do the trick:


Re: Automatic gates - Darnell - 29.08.2011

Nice tutorial .


Re: Automatic gates - Lorenc_ - 29.08.2011

Nice tutorial cow :P Indent your code !!


Re: Automatic gates - Hiddos - 29.08.2011

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Nice tutorial cow :P Indent your code !!
It is lol

Thanks btw


Re: Automatic gates - Darnell - 29.08.2011

http://dracoblue.net/tidy/pawn/ ftw.


Re: Automatic gates - Jantjuh - 29.08.2011

Nice tutorial!
Finally somebody who can EXPLAIN


Re: Automatic gates - DeathTone - 29.08.2011

niec


Re: Automatic gates - [GTA]AmericanGangster - 29.08.2011

nice tutorial


AW: Automatic gates - Nero_3D - 29.08.2011

You made a little mistake in this line

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 15.0, 8.0, 3.0, 10.0))
Good tutorial


Re: Automatic gates - Sasino97 - 11.09.2011

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Nice tutorial cow :P Indent your code !!
Quote:
Originally Posted by Darnell
Посмотреть сообщение
It's good indented, but with 2 spaces instead of 4. There's nothing bad, I used to indent with 2 spaces too :P.