SetPlayerCheckpoint not working
#1

one checkpoint is working
Код:
    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,1948.1033,-1930.6860,13.4751)) // Checkpoint 2
		{
		    SetPlayerCheckpoint(playerid,1830.9167,-1930.0353,13.4754,5);
		}
		else if(IsPlayerInRangeOfPoint(playerid,5,1830.9167,-1930.0353,13.4754)) // Checkpoint 3
		{
			SetPlayerCheckpoint(playerid,1823.9110,-1791.2739,13.4752,5);
		}
		else if(IsPlayerInRangeOfPoint(playerid,5,1823.9110,-1791.2739,13.4752)) // Checkpoint 4
		{
			SetPlayerCheckpoint(playerid,1824.1433,-1629.3223,13.4751,5);
		}
		else if(IsPlayerInRangeOfPoint(playerid,5,1824.1433,-1629.3223,13.4751)) // Checkpoint 5
		{
			SetPlayerCheckpoint(playerid,1929.6962,-1614.7090,13.4751,5);
		}
		else if(IsPlayerInRangeOfPoint(playerid,5,1929.6962,-1614.7090,13.4751)) // Checkpoint 6
		{
			SetPlayerCheckpoint(playerid,1938.9127,-1738.9067,13.4751,5);
		}
		else if(IsPlayerInRangeOfPoint(playerid,5,1938.9127,-1738.9067,13.4751)) // Checkpoint 7
		{
			SetPlayerCheckpoint(playerid,1959.0842,-1765.3502,13.4750,5);
		}
		else if(IsPlayerInRangeOfPoint(playerid,5,1959.0842,-1765.3502,13.4750)) // Checkpoint 8
		{
			SetPlayerCheckpoint(playerid,1975.3130,-1814.8724,13.4751,5);
		}
		else if(IsPlayerInRangeOfPoint(playerid,5,1975.3130,-1814.8724,13.4751)) // Checkpoint 9
		{
			SetPlayerCheckpoint(playerid,2066.9341,-1814.9067,13.4751,5);
		}
		else if(IsPlayerInRangeOfPoint(playerid,5,2066.9341,-1814.9067,13.4751 )) // Checkpoint 10
		{
			SetPlayerCheckpoint(playerid,2078.9148,-1897.3009,13.4473,5);
		}
		else if(IsPlayerInRangeOfPoint(playerid,5,2078.9148,-1897.3009,13.4473)) // Checkpoint 11
		{
			SetPlayerCheckpoint(playerid,2074.2095,-1907.4380,13.6393,5);
		}
		else if(IsPlayerInRangeOfPoint(playerid,5,2074.2095,-1907.4380,13.6393)) // Checkpoint 12
		{
		    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, "* Driving Center: You have successfully passed the test and received your license.");
			}
			else
			{
				DisablePlayerCheckpoint(playerid);
				LicenseTest[playerid] = 0;
				CP[playerid] = 0;
				SetVehicleToRespawn(GetPlayerVehicleID(playerid));
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Driving Center: You have damaged your vehicle hardly, therefore you failed the test.");
			}
		}
	}
	else DisablePlayerCheckpoint(playerid);
Reply
#2

sorry understood wrong, comment removed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)