help with checkpoints
#1

i will make a race
but how i can make good checkpoints
and yes i have 20 minutes searched
Reply
#2

I ask it To
Reply
#3

search again.
Reply
#4

OnPlayerEnterCheckpoint
Reply
#5

1. Stop lying. You did not search for 20 minutes, I don't think you searched at all.
2. SetRaceCheckpoint
Reply
#6

thanks but how i activate it
Reply
#7

Right from the wiki:

Quote:

SetPlayerRaceCheckpoint(playerid, type, Float, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Floatize);

playerid The ID of the player to set the checkpoint for
type Kind of checkpoint.0-Normal, 1-Finish, 2-Nothing(Only the checkpoint without anything on it), 3-Air normal, 4-Air finish
Float X-Coordinate
Float:y Y-Coordinate
Float:z Y-Coordinate
Float:nextx X-Coordinate of the next point, for the arrow facing direction
Float:nexty Y-Coordinate of the next point, for the arrow facing direction
Float:nextz Y-Coordinate of the next point, for the arrow facing direction
Floatize Size (diameter) of the checkpoint

Quote:

Creates a race checkpoint. When the player enters it, a OnPlayerEnterRaceCheckpoint callback is fired.

3. LEARN TO READ!
Reply
#8

but i mean what must in the command (give me a exaple)
Reply
#9

pawn Код:
//Top of the script
new racecheckpoint[MAX_PLAYERS];
pawn Код:
//in the command
SetPlayerRaceCheckpoint(playerid, 0, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, 5.0);
racecheckpoint[playerid] = 1;
//START OF THE RACE
pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
   DisablePlayerRaceCheckpoint(playerid);
   if(racecheckpoint[playerid] == 1)
   {
     SetPlayerRaceCheckpoint(playerid, 0, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, 5.0);
     racecheckpoint[playerid] = 2; // NEXT CP
   }
   else if(racecheckpoint[playerid] == 2)
   {
     SetPlayerRaceCheckpoint(playerid, 0, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, 5.0);
     racecheckpoint[playerid] = 3; // NEXT CP
   }
   else if(racecheckpoint[playerid] == 3)
   {
     SetPlayerRaceCheckpoint(playerid, 0, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, 5.0);
     racecheckpoint[playerid] = 4; // NEXT CP
   }
   else if(racecheckpoint[playerid] == 4)
   {
     SetPlayerRaceCheckpoint(playerid, 1, Float:x, Float:y, Float:z, 0.0, 0.0, 0.0, 5.0);
     racecheckpoint[playerid] = 5; // NEXT CP, THIS IS THE FINISH LINE CHECKPOINT
   }
   else if(racecheckpoint[playerid] == 5)
   {
     //FINISH
     racecheckpoint[playerid] = 0;
   }
   return 1;
}
This is just an example, it won't work properly for sure, but this is all I can help you.
Reply
#10

THANKS i go test it, I hope it work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)