Still a problem using checkpoints...
#6

You can add on the enum a boolean that checks if a raceid is valid or not. Whenever you add a checkpoint on it, set it to true. If none of the checkpoints has been set, the race is invalid.

Also, you enter the races manually, so declaring a global variable and assigning how many the loaded races are would be good.

For example:
pawn Код:
new
    Loaded_Races
;
// Global variable


// OnGameModeInit
AddCheckpointToRace(0, 0, 2378.034423, -1256.948120, 23.392478);
CreateRace(0,"TestRace", 50, 0,0,0,1);
   
AddCheckpointToRace(1, 0, 0, 0, 0);
CreateRace(1,"Race Farm", 50, 0,0,0,1);

Loaded_Races = 2;


// Somewhere else;
for( new i = 0; i < Loaded_Races; i++ )
By the way, it'd be better to save/load the races instead of entering manually. I mean, that if a race has 50 checkpoints, you will need to add them by hand (kinda boring!). Anyways, you know.
Reply


Messages In This Thread
Still a problem using checkpoints... - by knackworst - 05.09.2013, 15:29
Re: Still a problem using checkpoints... - by Konstantinos - 05.09.2013, 15:42
Re: Still a problem using checkpoints... - by knackworst - 05.09.2013, 17:21
Re: Still a problem using checkpoints... - by Konstantinos - 05.09.2013, 17:24
Re: Still a problem using checkpoints... - by knackworst - 05.09.2013, 17:53
Re: Still a problem using checkpoints... - by Konstantinos - 05.09.2013, 18:12
Re: Still a problem using checkpoints... - by knackworst - 05.09.2013, 19:38
Re: Still a problem using checkpoints... - by Konstantinos - 05.09.2013, 19:48
Re: Still a problem using checkpoints... - by knackworst - 05.09.2013, 19:49

Forum Jump:


Users browsing this thread: 1 Guest(s)