I have bug on my driving test help me
#1

PHP код:
if(CCP[playerid] == 1)
    {
        new 
vehicleid GetPlayerVehicleID(playerid);
        if(
IsATestCar(vehicleid))
        {
            new    
Float:health;
            
GetVehicleHealth(vehicleidhealth);
            if(
health 950.0)
            {
                
DisablePlayerCheckpoint(playerid);
                
CCP[playerid] = 2;
                
SetPlayerCheckpoint(playerid1429.81,-1732.20,13.3810.0);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
                
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
                 
DisablePlayerCheckpoint(playerid);
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleToRespawn(vehicleid);
                
PlayerInfo[playerid][pTakingLesson] = 0;
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
               
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
            
DisablePlayerCheckpoint(playerid);
            
RemovePlayerFromVehicle(playerid);
            
SetVehicleToRespawn(vehicleid);
            
PlayerInfo[playerid][pTakingLesson] = 0;
        }
    }
    else if(
CCP[playerid] == 2)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 3;
        
SetPlayerCheckpoint(playerid1820.42,-1732.44,13.3810.0);
    } 
The is when i going to check point CCP[playerid] == 1 is doing me that the no more checkpoint.
after that if I going to another check point every time is doing me this meesage "Driver Instructor says: The car is to damaged!"
Sorry for my bad english.
Reply
#2

Try this:
pawn Код:
if(CCP[playerid] == 1)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(IsATestCar(vehicleid))
    {
        new Float:health;
        GetVehicleHealth(vehicleid, health);
        if(health < 900.0)
        {
            SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
            SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
            DisablePlayerCheckpoint(playerid);
            RemovePlayerFromVehicle(playerid);
            SetVehicleToRespawn(vehicleid);
            PlayerInfo[playerid][pTakingLesson] = 0;
            return 0;
        }
        DisablePlayerCheckpoint(playerid);
        CCP[playerid] = 2;
        SetPlayerCheckpoint(playerid, 1429.81,-1732.20,13.38, 10.0);
    }
    else
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(vehicleid);
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    return 1;
}
if(CCP[playerid] == 2)
{
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 3;
    SetPlayerCheckpoint(playerid, 1820.42,-1732.44,13.38, 10.0);
    return 1;
}
Reply
#3

Thanks you fixed me little bug but its not tell me the message your car is to damaged on 3 checkpoint
Reply
#4

Wait now it tells you at the third Checkpoint ?
Give me the code of all the checkpoints...
Reply
#5

Here. I that if player crash or not in a car on this checkpoints it will say him "your car is to damage" or "you are not in a car" Hope you understand me
PHP код:
if(CCP[playerid] == 1)
    {
        new 
vehicleid GetPlayerVehicleID(playerid);
        if(
IsATestCar(vehicleid))
        {
            new 
Float:health;
            
GetVehicleHealth(vehicleidhealth);
            if(
health 950.0)
            {
                
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
                
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
                
DisablePlayerCheckpoint(playerid);
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleToRespawn(vehicleid);
                
PlayerInfo[playerid][pTakingLesson] = 0;
                return 
0;
            }
            
DisablePlayerCheckpoint(playerid);
            
CCP[playerid] = 2;
            
SetPlayerCheckpoint(playerid1429.81,-1732.20,13.3810.0);
        }
         else
        {
            
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
            
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
            
DisablePlayerCheckpoint(playerid);
            
RemovePlayerFromVehicle(playerid);
            
SetVehicleToRespawn(vehicleid);
            
PlayerInfo[playerid][pTakingLesson] = 0;
            return 
0;
        }
        return 
1;
    }
    else if(
CCP[playerid] == 2)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 3;
        
SetPlayerCheckpoint(playerid1820.42,-1732.44,13.3810.0);
        return 
1;
    }
    else if(
CCP[playerid] == 3)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 4;
        
SetPlayerCheckpoint(playerid1822.19,-1583.38,13.3510.0);
        return 
1;
    }
    else if(
CCP[playerid] == 4)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 5;
        
SetPlayerCheckpoint(playerid1850.08,-1180.60,23.6410.0);
        return 
1;
    }
    else if(
CCP[playerid] == 5)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 6;
        
SetPlayerCheckpoint(playerid,1454.18,-1160.58,23.6610.0);
        return 
1;
    }
       else if(
CCP[playerid] == 6)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 7;
        
SetPlayerCheckpoint(playerid1195.41,-1144.61,23.7010.0);
        return 
1;
    }
    else if(
CCP[playerid] == 7)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 8;
        
SetPlayerCheckpoint(playerid943.04,-1144.72,23.7910.0);
        return 
1;
    }
    else if(
CCP[playerid] == 8)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 9;
        
SetPlayerCheckpoint(playerid939.98,-1324.30,13.3810.0);
        return 
1;
    }
    else if(
CCP[playerid] == 9)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 10;
        
SetPlayerCheckpoint(playerid1058.40,-1324.46,13.3810.0);
        return 
1;
    }
    else if(
CCP[playerid] == 10)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 11;
        
SetPlayerCheckpoint(playerid1053.15,-1486.43,13.3910.0);
        return 
1;
    }
    else if(
CCP[playerid] == 11)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 12;
        
SetPlayerCheckpoint(playerid1037.01,-1572.37,13.3910.0);
        return 
1;
    }
    else if(
CCP[playerid] == 12)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 13;
        
SetPlayerCheckpoint(playerid,1132.79,-1572.31,13.3210.0);
        return 
1;
    }
    else if(
CCP[playerid] == 13)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 14;
        
SetPlayerCheckpoint(playerid1297.63,-1572.63,13.3810.0);
        return 
1;
    }
    else if(
CCP[playerid] == 14)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 15;
        
SetPlayerCheckpoint(playerid1311.79,-1852.47,13.3810.0);
        return 
1;
    }
    else if(
CCP[playerid] == 15)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 16;
        
SetPlayerCheckpoint(playerid1312.82,-1733.0,13.3810.0);
        return 
1;
    }
    else if(
CCP[playerid] == 16)
    {
        
DisablePlayerCheckpoint(playerid);
        
CCP[playerid] = 17;
        
SetPlayerCheckpoint(playerid1429.12,-1732.33,13.3810.0);
        return 
1;
    }
    else if(
CCP[playerid] == 17)
    {
        
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Driver Instructor says: You pass the car driving test.");
        
RemovePlayerFromVehicle(playerid);
          
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
          
PlayerInfo[playerid][pTakingLesson] = 0;
        
PlayerInfo[playerid][pCarLic] = 1;
        
DisablePlayerCheckpoint(playerid);
        return 
1;
    } 
Reply
#6

Help
Reply
#7

pawn Код:
if(CCP[playerid] == 1)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 2;
    SetPlayerCheckpoint(playerid, 1429.81,-1732.20,13.38, 10.0);
    return 1;
}
if(CCP[playerid] == 2)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 3;
    SetPlayerCheckpoint(playerid, 1820.42,-1732.44,13.38, 10.0);
    return 1;
}
if(CCP[playerid] == 3)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 4;
    SetPlayerCheckpoint(playerid, 1822.19,-1583.38,13.35, 10.0);
    return 1;
}
if(CCP[playerid] == 4)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 5;
    SetPlayerCheckpoint(playerid, 1850.08,-1180.60,23.64, 10.0);
    return 1;
}
if(CCP[playerid] == 5)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 6;
    SetPlayerCheckpoint(playerid,1454.18,-1160.58,23.66, 10.0);
    return 1;
}
if(CCP[playerid] == 6)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 7;
    SetPlayerCheckpoint(playerid, 1195.41,-1144.61,23.70, 10.0);
    return 1;
}
if(CCP[playerid] == 7)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 8;
    SetPlayerCheckpoint(playerid, 943.04,-1144.72,23.79, 10.0);
    return 1;
}
if(CCP[playerid] == 8)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 9;
    SetPlayerCheckpoint(playerid, 939.98,-1324.30,13.38, 10.0);
    return 1;
}
if(CCP[playerid] == 9)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 10;
    SetPlayerCheckpoint(playerid, 1058.40,-1324.46,13.38, 10.0);
    return 1;
}
if(CCP[playerid] == 10)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 11;
    SetPlayerCheckpoint(playerid, 1053.15,-1486.43,13.39, 10.0);
    return 1;
}
if(CCP[playerid] == 11)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 12;
    SetPlayerCheckpoint(playerid, 1037.01,-1572.37,13.39, 10.0);
    return 1;
}
if(CCP[playerid] == 12)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 13;
    SetPlayerCheckpoint(playerid,1132.79,-1572.31,13.32, 10.0);
    return 1;
}
if(CCP[playerid] == 13)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 14;
    SetPlayerCheckpoint(playerid, 1297.63,-1572.63,13.38, 10.0);
    return 1;
}
if(CCP[playerid] == 14)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 15;
    SetPlayerCheckpoint(playerid, 1311.79,-1852.47,13.38, 10.0);
    return 1;
}
if(CCP[playerid] == 15)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 16;
    SetPlayerCheckpoint(playerid, 1312.82,-1733.0,13.38, 10.0);
    return 1;
}
if(CCP[playerid] == 16)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    DisablePlayerCheckpoint(playerid);
    CCP[playerid] = 17;
    SetPlayerCheckpoint(playerid, 1429.12,-1732.33,13.38, 10.0);
    return 1;
}
if(CCP[playerid] == 17)
{
    if(!IsATestCar(GetPlayerVehicleID(playerid)))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You are not in a car!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't pass the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    new Float:health;
    GetVehicleHealth(GetPlayerVehicleID(playerid), health);
    if(health < 950.0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: The car is to damaged!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You didn't passed the test, please try again!");
        DisablePlayerCheckpoint(playerid);
        RemovePlayerFromVehicle(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        PlayerInfo[playerid][pTakingLesson] = 0;
        return 0;
    }
    SendClientMessage(playerid, COLOR_LIGHTBLUE,"Driver Instructor says: You pass the car driving test.");
    RemovePlayerFromVehicle(playerid);
    SetVehicleToRespawn(GetPlayerGetPlayerVehicleID(playerid)(playerid));
    PlayerInfo[playerid][pTakingLesson] = 0;
    PlayerInfo[playerid][pCarLic] = 1;
    DisablePlayerCheckpoint(playerid);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)