Race cmds?
#1

Hey all I read from the sa-mp.com website that to add.. this to the script to continue the race..

SetPlayerRaceCheckpoint

Can anyone explain me? I want something like this...

If a player enter's the first checkpoint , then there must be another checkpoint where i want.. in my script.. Can anyone expain?
Reply
#2

In the OnPlayerEnterRaceCheckpoint callback, use IsPlayerInRangeOfPoint to check if he's in the first checkpoint's coordinates, and display the next checkpoint.
Reply
#3

Can you explain with some coding?
Reply
#4

pawn Код:
SetPlayerRaceCheckpoint(playerid, 0, 100, 110, 15, 120, 140, 16, 5); // Set a race checkpoint where-ever
public OnPlayerEnterRaceCheckpoint(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 100, 110, 15) // Use the same coordinates as the race checkpoint was created at
    {
        // The player was in that checkpoint we created, set the next one here
    }
    return 1;
}
Reply
#5

Then if i want to continue like i want 7 cp's that time?

Then i must type like this?

Quote:

SetPlayerRaceCheckpoint(playerid, 0, 100, 110, 15, 120, 140, 16, 5); // Set a race checkpoint where-ever
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 100, 110, 15) // Use the same coordinates as the race checkpoint was created at
{
// The player was in that checkpoint we created, set the next one here
SetPlayerRaceCheckpoint(playerid , [floatx] , [floaty] , [floatz]?
}


return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)