Checkpoint problem
#7

hm. after thinking for 10 seconds more, the #defines are not needed. the checkpoints will get created in order i bet
Код:
const MaxCheckpoints=4;
new Mcheck[MaxCheckpoints];
new McheckOrder[MAX_PLAYERS];
Код:
	new NewVehicleID = GetPlayerVehicleID(playerid);
	switch(McheckOrder[playerid])
	{
		case 0:
		{
			if(OldVehicleID[playerid] != NewVehicleID) return SendClientMessage(playerid,COLOR_RED,"This vehicle does not contain a passenger!");
			// stop previous CP
			DestroyDynamicCP(Mcheck[0]);
			Mcheck[1] = CreateDynamicCP(mInfo[playerid][Del_x], mInfo[playerid][Del_y], mInfo[playerid][Del_z], 2.0, -1, -1, playerid, 400000.0);
			McheckOrder[playerid]=1;
		}
		case 1:
		{
			SendClientMessage(playerid,COLOR_RED,"completed 1/2 of the mission");
			DestroyDynamicCP(Mcheck[1]);
			Mcheck[2] = CreateDynamicCP(mInfo[playerid][Del_x], mInfo[playerid][Del_y], mInfo[playerid][Del_z], 2.0, -1, -1, playerid, 400000.0);
			McheckOrder[playerid]=2;
		}
		case 2:
		{
			SendClientMessage(playerid,COLOR_RED,"completed 3/4 of the mission");
			DestroyDynamicCP(Mcheck[2]);
			Mcheck[3] = CreateDynamicCP(mInfo[playerid][Del_x], mInfo[playerid][Del_y], mInfo[playerid][Del_z], 2.0, -1, -1, playerid, 400000.0);
			McheckOrder[playerid]=3;
		}
		case 3:
		{
			SendClientMessage(playerid,COLOR_RED,"completed the mission");
			DestroyDynamicCP(Mcheck[3]);
			McheckOrder[playerid]=0;
		}
	}
Reply


Messages In This Thread
Checkpoint problem - by knackworst - 08.10.2011, 21:31
Re: Checkpoint problem - by =WoR=G4M3Ov3r - 08.10.2011, 22:19
Re: Checkpoint problem - by Babul - 08.10.2011, 22:33
Re: Checkpoint problem - by knackworst - 08.10.2011, 22:36
Re: Checkpoint problem - by Babul - 08.10.2011, 22:56
Re: Checkpoint problem - by knackworst - 08.10.2011, 23:05
Re: Checkpoint problem - by Babul - 08.10.2011, 23:13
Re: Checkpoint problem - by knackworst - 08.10.2011, 23:17
Re: Checkpoint problem - by Babul - 09.10.2011, 20:02

Forum Jump:


Users browsing this thread: 4 Guest(s)