License Test
#1

hello all I made license test system but I have problem in when the player take the car he must go to the first checkpoint and then the second one etc. , but when the player go to the first one the second doesn't appear

here is the code:
pawn Код:
if(CP[playerid] == 1) // Drivers License Test
    {
        if(IsPlayerInRangeOfPoint(playerid,5,980.1932,-1407.9902,13.0956)) // Checkpoint 1
        {
            SetPlayerCheckpoint(playerid,1009.3680,-1407.4510,13.0299,5);
        }
        if(IsPlayerInRangeOfPoint(playerid,5,1009.3680,-1407.4510,13.0299)) // Checkpoint 2
        {
            SetPlayerCheckpoint(playerid,1035.6870,-1407.1594,13.1585,5);
        }
        if(IsPlayerInRangeOfPoint(playerid,5,1035.6870,-1407.1594,13.1585)) // Checkpoint 3
        {
            SetPlayerCheckpoint(playerid,1058.1282,-1412.7396,13.3948,5);
        }
        if(IsPlayerInRangeOfPoint(playerid,5,1058.1282,-1412.7396,13.3948)) // Checkpoint 4
        {
            SetPlayerCheckpoint(playerid,1059.2937,-1435.7738,13.3568,5);
        }
        if(IsPlayerInRangeOfPoint(playerid,5,1059.2937,-1435.7738,13.3568)) // Checkpoint 5
        {
            SetPlayerCheckpoint(playerid,1056.1156,-1456.7148,13.3670,5);
        }
        if(IsPlayerInRangeOfPoint(playerid,5,1056.1156,-1456.7148,13.3670)) // Checkpoint 6
        {
            SetPlayerCheckpoint(playerid,1012.2074,-1438.6262,13.5469,5);
        }
        if(IsPlayerInRangeOfPoint(playerid,5,1012.2074,-1438.6262,13.5469)) // Checkpoint 7
        {
            SetPlayerCheckpoint(playerid,1026.7972,-1443.0872,13.5546,5);
        }
        if(IsPlayerInRangeOfPoint(playerid,5,1026.7972,-1443.0872,13.5546)) // Checkpoint 8
        {
            SetPlayerCheckpoint(playerid,1026.6116,-1433.3167,13.5469,5);
        }
        if(IsPlayerInRangeOfPoint(playerid,5,1026.6116,-1433.3167,13.5469)) // Checkpoint 9
        {
            SetPlayerCheckpoint(playerid,1004.7498,-1439.7341,13.5469,5);
        }
        if(IsPlayerInRangeOfPoint(playerid,5,1004.7498,-1439.7341,13.5469)) // Checkpoint 10
        {
            SetPlayerCheckpoint(playerid,967.4974,-1443.5815,13.5041,5);
        }
        if(IsPlayerInRangeOfPoint(playerid,5,967.4974,-1443.5815,13.5041)) // 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);
    return 1;
}
the command to go in the test:
pawn Код:
CMD:testlic(playerid,params[])
{
  if(LicenseTest[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are already in the License Test");
  if(LicenseTest[playerid] == 0 && IsPlayerInRangeOfPoint(playerid, 5, 957.5546,-1442.5096,14.0535))
  {
      LicenseTest[playerid] = 1;
      SetPlayerCheckpoint(playerid,957.5525,-1421.1719,13.5469, 5);
      SendClientMessage(playerid, COLOR_YELLOW, "Choose a car from these cars behind the CheckPoint");
  }else return SendClientMessage(playerid, COLOR_GREY, "You are not at License Test Pickup");
  return 1;
}
Reply


Messages In This Thread
License Test - by AhmedMohamed - 30.03.2014, 20:21
Re: License Test - by luis_mendoza - 30.03.2014, 20:27
Re: License Test - by AhmedMohamed - 30.03.2014, 20:39
Re: License Test - by luis_mendoza - 30.03.2014, 20:43
Re: License Test - by AhmedMohamed - 30.03.2014, 20:43
Respuesta: License Test - by OTACON - 30.03.2014, 20:55
Re: License Test - by VerticalGaming - 30.03.2014, 21:17
Re: License Test - by AhmedMohamed - 31.03.2014, 10:07
Re: License Test - by AhmedMohamed - 31.03.2014, 10:10

Forum Jump:


Users browsing this thread: 3 Guest(s)