SA-MP Forums Archive
check points - 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: check points (/showthread.php?tid=112184)



check points - sggassasin - 06.12.2009

could someone plz tell me how to set a check point so it can only be seen from a sertain distains plz


Re: check points - Zamaroht - 06.12.2009

First of all, you will need a timer that runs all the time, aproximatly once a second. (You could use OnPlayerUpdate, but it would take too much resources and cause lag).
In that timer, you'll have to check every player's position, and using IsPlayerInRangeOfPoint, see if they are close enough to the checkpoint. In case they are, show it. In case they aren't, hide it.
Since getting a player's position and compareing it against a distance can be very resource intensive, you could use some other checks first. For example, if it's inside an interior, you could check if they are inside the correct interior before checking the position. That way, you would improve performance even more.


Re: check points - DJDhan - 06.12.2009

Can be seen from only a certain distance?
You can't obviously see a checkpoint in Los Santos when you are in San Fierro can you?
Try changing the stream distance in server.cfg or try playing with the position and distance calculator as dude above me says


Re: check points - sggassasin - 06.12.2009

could u write it up for me coz im a bit new to this


and DJ i mean on the radar



Re: check points - Abernethy - 06.12.2009

Uh, why not download a checkpoint streamer?


Re: check points - sggassasin - 06.12.2009

well could someone put a link to the YCP check point coz the link is broken