SA-MP Forums Archive
How to make gates ? + they open and close - 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: How to make gates ? + they open and close (/showthread.php?tid=119002)



How to make gates ? + they open and close - Nakki - 06.01.2010

I need help with making gates.. i know how to add gates,but how that open and close system?
i hear i have to get coordinates of close and open place..


Re: How to make gates ? + they open and close - [HiC]TheKiller - 06.01.2010

Use moveobject.


Re: How to make gates ? + they open and close - Nakki - 06.01.2010

Okay.. I use if(PlayerToPoint too?


Re: How to make gates ? + they open and close - Deat_Itself - 06.01.2010

http://forum.sa-mp.com/index.php?top...8575#msg828575


Re: How to make gates ? + they open and close - Virtual1ty - 06.01.2010

Quote:
Originally Posted by Nakki
Okay.. I use if(PlayerToPoint too?
the native IsPlayerInRangeOfPoint(playerid.. is better, and faster
edit; link here (how to use it)
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint


Re: How to make gates ? + they open and close - Deat_Itself - 06.01.2010

Quote:
Originally Posted by Virtual1ty
Quote:
Originally Posted by Nakki
Okay.. I use if(PlayerToPoint too?
the native IsPlayerInRangeOfPoint(playerid.. is better, and faster
edit; link here (how to use it)
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
IsPlayerInRangeOfPoint is better

if(IsPlayerInRangeOfPoint(playerid, 10.0 , Float, Float:y, Float:z); //you can get the floats from saved positions


Re: How to make gates ? + they open and close - Virtual1ty - 06.01.2010

Quote:
Originally Posted by _Saif_
Quote:
Originally Posted by Virtual1ty
Quote:
Originally Posted by Nakki
Okay.. I use if(PlayerToPoint too?
the native IsPlayerInRangeOfPoint(playerid.. is better, and faster
edit; link here (how to use it)
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
IsPlayerInRangeOfPoint is better

if(IsPlayerInRangeOfPoint(playerid, 10.0 , Float, Float:y, Float:z);
And what have i just said to him? Just keeping your post counter high up
and he can change the range of where the door's (or gates) can open,
so it doesn't have to be 10.0!

edit; the link i gave him is pretty self-explanatory


Re: How to make gates ? + they open and close - saiberfun - 06.01.2010

I used this https://sampwiki.blast.hk/wiki/Automatic_Gates
back then to learn Move Object stuff.


Re: How to make gates ? + they open and close - Jakku - 06.01.2010

For automatic gates you have to use PlayerToPoint or IsPlayerInRangeOfPoint (Easier one). But I recommend you to just use gates opening with a command (MoveObject)


Re: How to make gates ? + they open and close - Nakki - 06.01.2010

Yes i make Command (/opengate) i use MoveObject