SA-MP Forums Archive
[HELP] Checkpoints - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Checkpoints (/showthread.php?tid=132851)



[HELP] Checkpoints - Zimon95 - 09.03.2010

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)


Re: [HELP] Checkpoints - Onyx09 - 09.03.2010

how about using

SetPlayerRaceCheckpoint ?

take a look

https://sampwiki.blast.hk/wiki/SetPlayerRaceCheckpoint


Re: [HELP] Checkpoints - Zimon95 - 09.03.2010

Thanks gonna test it!


Re: [HELP] Checkpoints - Onyx09 - 09.03.2010

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