[HELP] Checkpoints
#1

Hi, I have created a driver's license track with checkpoints, but when i take the first the other doesn't show. :S
Here's the code:
Код:
//on top
new Exam[MAX_PLAYERS];
new PatCheck[MAX_PLAYERS];
//In the script
SetPlayerCheckpoint(bla,bla,bla);
Exam[playerid] = 1;

//In OnPlayerEnterCheckpoint
	if(Exam[playerid] == 1)
	{
	 PatCheck[playerid] = 0;
	 if(PatCheck[playerid] == 0)
   {
	  SetPlayerCheckpoint(playerid,-2704.1724,145.7414,3.7579,5.0);
	  PatCheck[playerid] = 1;
   }
   else if(PatCheck[playerid] == 1)
   {
    SetPlayerCheckpoint(playerid,-2810.4390,159.3067,6.6080,5.0);
    PatCheck[playerid] = 2;
	 }
   else if(PatCheck[playerid] == 2)
   {
    SetPlayerCheckpoint(playerid,-2797.5239,-212.4667,6.6237,5.0);
    PatCheck[playerid] = 3;
	 }
   else if(PatCheck[playerid] == 3)
   {
    SetPlayerCheckpoint(playerid,-2602.9675,-213.1772,3.7575,5.0);
	 }
  }
I got no errors, only not working. (I have tryed to use switch but then i changed it to if/else but same probl :S)
Reply
#2

how about using

SetPlayerRaceCheckpoint ?

take a look

https://sampwiki.blast.hk/wiki/SetPlayerRaceCheckpoint
Reply
#3

Thanks gonna test it!
Reply
#4

no problem that has to work if not come back here and put your errors :P lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)