License Test
#6

pawn Код:
public OnPlayerEnterCheckpoint(playerid){
    if(LicenseTest[playerid] == 1){
        CP[playerid]++;
        DisablePlayerCheckpoint(playerid);
        switch(CP[playerid]){
            case 1:{SetPlayerCheckpoint(playerid,1009.3680,-1407.4510,13.0299,5);}
            case 2:{SetPlayerCheckpoint(playerid,1035.6870,-1407.1594,13.1585,5);}
            case 3:{SetPlayerCheckpoint(playerid,1058.1282,-1412.7396,13.3948,5);}
            case 4:{SetPlayerCheckpoint(playerid,1059.2937,-1435.7738,13.3568,5);}
            case 5:{SetPlayerCheckpoint(playerid,1056.1156,-1456.7148,13.3670,5);}
            case 6:{SetPlayerCheckpoint(playerid,1012.2074,-1438.6262,13.5469,5);}
            case 7:{SetPlayerCheckpoint(playerid,1026.7972,-1443.0872,13.5546,5);}
            case 8:{SetPlayerCheckpoint(playerid,1026.6116,-1433.3167,13.5469,5);}
            case 9:{SetPlayerCheckpoint(playerid,1004.7498,-1439.7341,13.5469,5);}
            case 10:{SetPlayerCheckpoint(playerid,967.4974,-1443.5815,13.5041,5);}
            case 11:{
                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.");
                }
            }
        }
    }
    return 1;
}

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)