help with checkpoints
#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


Messages In This Thread
help with checkpoints - by gokurulles - 25.10.2008, 19:44
Re: help with checkpoints - by gijsmin - 25.10.2008, 19:49
Re: help with checkpoints - by Lorrden - 25.10.2008, 19:52
Re: help with checkpoints - by matt2127 - 25.10.2008, 19:52
Re: help with checkpoints - by Finn - 25.10.2008, 19:54
Re: help with checkpoints - by gokurulles - 25.10.2008, 19:58
Re: help with checkpoints - by Finn - 25.10.2008, 20:04
Re: help with checkpoints - by gijsmin - 25.10.2008, 20:17
Re: help with checkpoints - by Finn - 25.10.2008, 20:29
Re: help with checkpoints - by gijsmin - 25.10.2008, 20:40

Forum Jump:


Users browsing this thread: 3 Guest(s)