Checkpoint & GetDistanceToPoint
#1

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?
Reply
#2

anyone
Reply
#3

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.
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)