Help About Checkpoints
#5

The All onplayerentercheckpoint system;

Код:
if(CP[playerid] == 1) // Drivers License Test
	{
		if(IsPlayerInRangeOfPoint(playerid,5,2040.7101,-1930.1340,13.4667)) // Checkpoint 1
		{
		    SetPlayerCheckpoint(playerid,1948.1033,-1930.6860,13.4751,5);
		}
		else if(IsPlayerInRangeOfPoint(playerid,5,2074.2095,-1907.4380,13.6393)) // Checkpoint 2
		{
		    new Float:Health;
		    GetVehicleHealth(GetPlayerVehicleID(playerid), Health);
		    if(Health > 900)
			{
				DisablePlayerCheckpoint(playerid);
				PlayerInfo[playerid][pCarLic] = 1;
				LicenseTest[playerid] = 0;
				CP[playerid] = 0;
				SetVehicleToRespawn(GetPlayerVehicleID(playerid));
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ehliyet Kurulu i almaya hak kazandınız.");
			}
			else
			{
				DisablePlayerCheckpoint(playerid);
				LicenseTest[playerid] = 0;
				CP[playerid] = 0;
				SetVehicleToRespawn(GetPlayerVehicleID(playerid));
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ehliyet Kuniz, testi başaramadınız.");
   			}
  		}
 	}
        else DisablePlayerCheckpoint(playerid); ( Problem is at that line)
	if(PP[playerid] == 1) // Pizza taşıma
	{
  		if(IsPlayerInRangeOfPoint(playerid, 2, 2069.2146,-1656.5670,13.5469)) // Checkpoint 1
		{
      		SetPlayerCheckpoint(playerid,1824.7229,-1538.7413,13.5469, 2);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 2, 1824.7229,-1538.7413,13.5469)) // Checkpoint 2
		{
		    SetPlayerCheckpoint(playerid,1467.9995,-1013.2706,26.8438, 2);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 2, 1467.9995,-1013.2706,26.8438)) // Checkpoint 3
		{
			SetPlayerCheckpoint(playerid,2115.6670,-1789.8052,20.5547, 2);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 2, 2115.6670,-1789.8052,20.5547)) // Checkpoint 4
		{
		    new Float:Health;
		    GetVehicleHealth(GetPlayerVehicleID(playerid), Health);
		    if(Health > 700)
			{
				DisablePlayerCheckpoint(playerid);
				PizzaTasima[playerid] = 0;
				PP[playerid] = 0;
                                GiveZaiatMoney(playerid, 750);
				SetVehicleToRespawn(GetPlayerVehicleID(playerid));
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Pizzacı Nuri: Apat temiş 750 doların.");
			}
			else
			{
				DisablePlayerCheckpoint(playerid);
				PizzaTasima[playerid] = 0;
				PP[playerid] = 0;
				SetVehicleToRespawn(GetPlayerVehicleID(playerid));
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Pizzacı Nuri: Ula hayosını sınan mara!");
			}
		}
	}
	else DisablePlayerCheckpoint(playerid);
	return 1;
}
Reply


Messages In This Thread
Help About Checkpoints - by michale - 19.07.2012, 14:36
Re: Help About Checkpoints - by [KHK]Khalid - 19.07.2012, 14:45
Re: Help About Checkpoints - by michale - 19.07.2012, 14:50
Re: Help About Checkpoints - by [KHK]Khalid - 19.07.2012, 14:56
Re: Help About Checkpoints - by michale - 19.07.2012, 15:15
Re: Help About Checkpoints - by [KHK]Khalid - 19.07.2012, 15:26
Re: Help About Checkpoints - by michale - 19.07.2012, 16:02

Forum Jump:


Users browsing this thread: 1 Guest(s)