SA-MP Forums Archive
Checkpoint Help!? - 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: Checkpoint Help!? (/showthread.php?tid=78614)



Checkpoint Help!? - kAf_KeF - 21.05.2009

Код:
#define CP_SF 0
#define CP_LS 1
#define CP_LV 2

new gPlayerCheckpointStatus[MAX_PLAYERS];
//these things...

Код:
public OnPlayerConnect(playerid)
{
	gPlayerCheckpointStatus[playerid] = CP_SF;
	SetPlayerCheckpoint(playerid, xxx.x'x'x', yyy.y'y'y', zzz.z'z'z', 5.0);

  gPlayerCheckpointStatus[playerid] = CP_LS;
	SetPlayerCheckpoint(playerid, xxx.x'x'x', yyy.y'y'y', zzz.z'z'z', 5.0);

  gPlayerCheckpointStatus[playerid] = CP_LV;
	SetPlayerCheckpoint(playerid, xxx.x'x'x', yyy.y'y'y', zzz.z'z'z', 5.0);
...
Only CP_LV is appearing..How can I show other? (> CP_SF, CP_LS)?

Код:
public OnPlayerEnterCheckpoint(playerid) {
	switch (gPlayerCheckpointStatus[playerid]) {
		case CP_SF:
		  {
	      //any action
			}
		case CP_LS:
		  {
	       //any action
		  }
		case CP_LV:
		  {
	       //any action
		  }
	}
	return 1;
}



Re: Checkpoint Help!? - Badger(new) - 21.05.2009

i believe thats because it's the last checkpoint spawned. You need a checkpoint streamer as you can only have one down at a time i think.