Checkpoint & GetDistanceToPoint - 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: Checkpoint & GetDistanceToPoint (
/showthread.php?tid=92324)
Checkpoint & GetDistanceToPoint -
burgershot - 19.08.2009
Hello, I was wondering how I could bypass the one cp limit in sa-mp so I tired this:
pawn Код:
if(GetDistanceToPoint(i,X,Y,Z)<=10)
{
SetPlayerCheckpoint(i,X,Y,Z,2);
}
else if(GetDistanceToPoint(i,X2,Y2,Z2)<=10)
{
SetPlayerCheckpoint(i,X2,Y2,Z2,2);
}
else if(GetDistanceToPoint(i,X3,Y3,Z3)<=10)
{
SetPlayerCheckpoint(i,X3,Y3,Z3);
}
and under OnPlayerEnterCheckpoint I would check the distance from each of the coords (X,Y,Z), (X2,Y2,Z2) and (X3,Y3,Z3) and for whichever one is true, do a separate thing.
For some reason none of the checkpoints show up. Will this simply not work or am I doing something wrong?
Re: Checkpoint & GetDistanceToPoint -
burgershot - 19.08.2009
anyone
Re: Checkpoint & GetDistanceToPoint -
member - 19.08.2009
If you want to by-pass the standard 1 checkpoint limit, it's advised you use a 'checkpoint streamer' which basically allows you to have 1+ checkpoints in your'e server and best of all it's already scripted for you - all you need to do is use the function to create a streamed checkpoint. There are many checkpoint streamers out there. Chech out the Wiki, which focuses on Dragst's CP Streamer.
https://sampwiki.blast.hk/wiki/CPS
Edit: Here's some more CP streamer FS's:
http://forum.sa-mp.com/index.php?topic=30024.0
http://forum.sa-mp.com/index.php?topic=94163.0
http://forum.sa-mp.com/index.php?topic=84400.0
Or just search, there's more.
Re: Checkpoint & GetDistanceToPoint -
Yuryfury - 19.08.2009
it works for me with PlayerToPoint. I am actually planning a tutorial for it

. I will message you the link when I do.
But this is basically the same thing as a streamer.