Checkpoint for everyone
#1

hi,

below u can see how i create the checkpoints.
Everything is fine but theres one little problem.
Theres a timer, every 10 minutes theres a cp created somewhere on my map (visible for every player in the server).
But if a player joins after the timer has set this cp, he isnt able to see it.
He has to wait for the next time the next timer sets the next cp. (to be able to see the cp)
How can i do it like if theres already a cp active, and a new player joins (after the creation of the cp) he is also able to see it right after spawn?

pawn Код:
stock SetPlayerCheckpointForAll(ID, playerid, Float:x, Float:y, Float:z, Float:size) // Creating a new function that includes an ID parameter
{
    CheckPoint[playerid] = ID; // Setting the players variable to the ID of the created checkpoint.
    SetPlayerCheckpoint(playerid, x, y, z, size); // Creating the checkpoint.
}

SetCheckpointForAll(cp3,-599.5901,2043.0802,60.1875,2.0);
DisableCheckpointForAll(cp3,-599.5901,2043.0802,60.1875,2.0);
regards.
Reply
#2

Store the coords that you set the checkpoint too.
So in this case (-599.5901,2043.0802,60.1875) into an cpX, cpY, and cpZ variable.
On a player's connect, use cpX, cpY, and cpZ with SetPlayerCheckpoint to set it for the new player.
Reply
#3

thx for ur answer.

mhh, is there a chance u could give me a little example?
id be very happy about that, cause im still a noob and i dont really know how i shall do that.
Reply
#4

could someone explain that to me pls.
Ive tried so much but i just dont know how start this cp variable thing
id be very happy about an answer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)