SA-MP Forums Archive
Restricted teleport - 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)
+--- Thread: Restricted teleport (/showthread.php?tid=633095)



Restricted teleport - AlexLambert - 25.04.2017

Hi, I havent found anything similar. I would like to know how I can create a teleport that can only be used if you are in an area, if you are not in that area, the command will not work, thank you.


Re: Restricted teleport - Kane - 25.04.2017

Could always use IsPlayerInRangeOfPoint.


Re: Restricted teleport - AlexLambert - 25.04.2017

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
Could always use IsPlayerInRangeOfPoint.
Yes, but in IsPlayerInRangeOfPoint do i just need to put the /save position?


Re: Restricted teleport - DarkSkull - 25.04.2017

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

x, y, z is the center. Range is the radius. Think of it like a circle with radius 'Range' and center as (x,y,z)

You need to put the first three cords of /save as x, y and z respectively and then specify a range.