Driving test checkpoint problem
#1

When i drive into the checkpoint wonts disappear so the next one can come up

pawn Код:
}
    //==========================================================================
    if(strcmp(cmd, "/takedrivingtest", true) == 0)
    {
        for(new i = 0; i < sizeof(Businesses); i++)
        {
            if(PlayerToPoint(700.0,playerid,Businesses[12][EnterX], Businesses[12][EnterY], Businesses[12][EnterZ]))
            {
                if(GetPlayerVirtualWorld(playerid) == 0)
                {
                    if(Businesses[12][BizType] == 12)
                    {
                        if(Businesses[12][Products] != 0)
                        {
                            if(GetPlayerCash(playerid) >= Businesses[12][EntranceCost])
                            {
                                new tmpcar = GetPlayerVehicleID(playerid);
                                new carid = GetPlayerVehicleID(playerid);
                                if(IsADMVCar(carid))
                                //if(DynamicCars[tmpcar][CarType] == 1)
                                {
                                    SendClientMessage(playerid, COLOR_WHITE, "The driving test has started, good luck!");
                                    TakingDrivingTest[playerid] = 1;
                                    DrivingTestStep[playerid] = 1;
                                    SetPlayerCheckpoint(playerid, 2068.7415,-1913.5304,13.3192, 5.0);
                                    EngineStatus[GetPlayerVehicleID(playerid)] = 1;
                                    GetVehicleParamsEx(tmpcar,engine,lights,alarm,doors,bonnet,boot,objective);
                                    if(engine != VEHICLE_PARAMS_ON) { SetVehicleParamsEx(tmpcar,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective); }
                                    new form[128];
                                    format(form, sizeof(form), "starts engine of the %s.", VehicleNames[GetVehicleModel(idcar)-400]);
                                    PlayerActionMessage(playerid,20.0,form);
                                }
                                else
                                {
                                    SendClientMessage(playerid, COLOR_GREY, "You need to be in a driving test car.");
                                }
                            }
                            else
                            {
                                SendClientMessage(playerid, COLOR_GREY, "You do not have enough money.");
                            }
                        }
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "You are not at the driving school");
                    }
                    return 1;
                }
            }
        }
    }
pawn Код:
}
    for(new h = 0; h < sizeof(DynamicCars); h++)
    {
            //if(DynamicCars[updatedvehicleid][CarType] == 1)
            new carid = GetPlayerVehicleID(playerid);
            if(IsADMVCar(carid))
            {
            if(TakingDrivingTest[playerid] == 1)
            {
                if(PlayerToPoint(5.0,playerid,2068.7415,-1913.5304,13.3192) && DrivingTestStep[playerid] == 1)
                {
                    DrivingTestStep[playerid] = 2;
                    SetPlayerCheckpoint(playerid, 2068.7415,-1913.5304,13.3192, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2084.2441,-1879.5679,13.0991) && DrivingTestStep[playerid] == 2)
                {
                    DrivingTestStep[playerid] = 3;
                    SetPlayerCheckpoint(playerid, 2087.5696,-1778.1520,13.1532, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2087.5696,-1778.1520,13.1532) && DrivingTestStep[playerid] == 3)
                {
                    DrivingTestStep[playerid] = 4;
                    SetPlayerCheckpoint(playerid, 2032.9459,-1749.4602,13.1555, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2032.9459,-1749.4602,13.1555) && DrivingTestStep[playerid] == 4)
                {
                    DrivingTestStep[playerid] = 5;
                    SetPlayerCheckpoint(playerid, 1922.5228,-1749.9053,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1922.5228,-1749.9053,13.1541) && DrivingTestStep[playerid] == 5)
                {
                    DrivingTestStep[playerid] = 6;
                    SetPlayerCheckpoint(playerid, 1824.5392,-1727.6184,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1824.5392,-1727.6184,13.1554) && DrivingTestStep[playerid] == 6)
                {
                    DrivingTestStep[playerid] = 7;
                    SetPlayerCheckpoint(playerid, 1784.2493,-1606.8083,13.1385, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1784.2493,-1606.8083,13.1385) && DrivingTestStep[playerid] == 7)
                {
                    DrivingTestStep[playerid] = 8;
                    SetPlayerCheckpoint(playerid, 1684.3798,-1590.0769,13.1560, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1684.3798,-1590.0769,13.1560) && DrivingTestStep[playerid] == 8)
                {
                    DrivingTestStep[playerid] = 9;
                    SetPlayerCheckpoint(playerid, 1570.4451,-1589.5077,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1570.4451,-1589.5077,13.1541) && DrivingTestStep[playerid] == 9)
                {
                    DrivingTestStep[playerid] = 10;
                    SetPlayerCheckpoint(playerid, 1527.8423,-1619.7291,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1527.8423,-1619.7291,13.1554) && DrivingTestStep[playerid] == 10)
                {
                    DrivingTestStep[playerid] = 11;
                    SetPlayerCheckpoint(playerid, 1527.2231,-1705.9948,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1527.2231,-1705.9948,13.1554) && DrivingTestStep[playerid] == 11)
                {
                    DrivingTestStep[playerid] = 12;
                    SetPlayerCheckpoint(playerid, 1494.3622,-1729.9639,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1494.3622,-1729.9639,13.1554) && DrivingTestStep[playerid] == 12)
                {
                    DrivingTestStep[playerid] = 13;
                    SetPlayerCheckpoint(playerid, 1417.2826,-1729.6477,13.1633, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1417.2826,-1729.6477,13.1633) && DrivingTestStep[playerid] == 13)
                {
                    DrivingTestStep[playerid] = 14;
                    SetPlayerCheckpoint(playerid, 1386.8727,-1840.9457,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1386.8727,-1840.9457,13.1541) && DrivingTestStep[playerid] == 14)
                {
                    DrivingTestStep[playerid] = 15;
                    SetPlayerCheckpoint(playerid, 1463.2797,-1875.0575,13.1547, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1463.2797,-1875.0575,13.1547) && DrivingTestStep[playerid] == 15)
                {
                    DrivingTestStep[playerid] = 16;
                    SetPlayerCheckpoint(playerid, 1637.7559,-1875.4866,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1637.7559,-1875.4866,13.1541) && DrivingTestStep[playerid] == 16)
                {
                    DrivingTestStep[playerid] = 17;
                    SetPlayerCheckpoint(playerid, 1692.3719,-1838.1967,13.1555, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1692.3719,-1838.1967,13.1555) && DrivingTestStep[playerid] == 17)
                {
                    DrivingTestStep[playerid] = 18;
                    SetPlayerCheckpoint(playerid, 1731.2744,-1818.6259,13.1376, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1731.2744,-1818.6259,13.1376) && DrivingTestStep[playerid] == 18)
                {
                    DrivingTestStep[playerid] = 19;
                    SetPlayerCheckpoint(playerid, 1798.4176,-1834.8743,13.1604, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1798.4176,-1834.8743,13.1604) && DrivingTestStep[playerid] == 19)
                {
                    DrivingTestStep[playerid] = 20;
                    SetPlayerCheckpoint(playerid, 1819.6390,-1872.5280,13.1837, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1819.6390,-1872.5280,13.1837) && DrivingTestStep[playerid] == 20)
                {
                    DrivingTestStep[playerid] = 21;
                    SetPlayerCheckpoint(playerid, 1936.6617,-1934.8263,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1936.6617,-1934.8263,13.1541) && DrivingTestStep[playerid] == 21)
                {
                    DrivingTestStep[playerid] = 22;
                    SetPlayerCheckpoint(playerid, 2056.2322,-1912.3051,13.3194, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2056.2322,-1912.3051,13.3194) && DrivingTestStep[playerid] == 22)
                {
                    new Float:health;
                    veh = GetPlayerVehicleID(playerid);
                    GetVehicleHealth(veh, health);

                    if(health >= 950.0)
                    {
                        new Float:x, Float:y, Float:z,Float:distance = 3.0;
                        GetPlayerPos(playerid,x,y,z);
                        if(IsPlayerInRangeOfPoint(playerid,3.0,x,y,z))
                        PlayAudioStreamForPlayer(playerid,"http://www.fileden.com/files/2012/4/18/3293679/Gta%20San%20Andreas%20Mission%20Complete%20Sound%20HQ.mp3",x,y,z,distance,0);
                        GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                        if(engine == VEHICLE_PARAMS_ON) { SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); }
                        SendClientMessage(playerid, COLOR_GREEN, "Congratulations! You have passed the drivers license test!");
                        //GameTextForPlayer(playerid, "~g~Passed", 3000, 1);
                        GameDrawForPlayer(playerid,"~g~Passed", 2000);
                        PlayerInfo[playerid][pCarLic] = 1;
                        EngineStatus[veh] = 0;
                        SetVehicleToRespawn(veh);
                        EngineStatus[veh] = 0;
                        TakingDrivingTest[playerid] = 0;
                        DisablePlayerCheckpoint(playerid);
                        ActiveCP[playerid] = 0;
                        GivePlayerCash(playerid,-Businesses[12][EntranceCost]);
                        Businesses[12][Till] += Businesses[12][EntranceCost];
                    }
                    else
                    {
                        GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                        if(engine == VEHICLE_PARAMS_ON) { SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); }
                        SendClientMessage(playerid, COLOR_LIGHTRED, "Bad Luck! You have failed the drivers license test, please try again.");
                        SendClientMessage(playerid, COLOR_LIGHTRED, "You have been charged $50 for the attempting and failing your test.");
                        //GameTextForPlayer(playerid, "~r~Failed", 3000, 1);
                        GameDrawForPlayer(playerid,"~r~Failed", 2000);
                        EngineStatus[veh] = 0;
                        SetVehicleToRespawn(veh);
                        EngineStatus[veh] = 0;
                        TakingDrivingTest[playerid] = 0;
                        DisablePlayerCheckpoint(playerid);
                        ActiveCP[playerid] = 0;
                        GivePlayerCash(playerid,-50);
                        Businesses[12][Till] += 50;
                    }
                    DrivingTestStep[playerid] = 0;
                    ActiveCP[playerid] = 0;
                }
                return 1;
            }
        }
    }
    return 1;
}
Reply
#2

Edit your onplayerentercheckpoint.
Reply
#3

Show your
Код:
public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}
Reply
#4

Quote:
Originally Posted by [MM]RoXoR[FS]
Посмотреть сообщение
Show your
Код:
public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}
I dont even using public OnPlayerEnterCheckpoint(playerid)
Reply
#5

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
I dont even using public OnPlayerEnterCheckpoint(playerid)
There's your problem.
Reply
#6

Quote:
Originally Posted by cosbraa
Посмотреть сообщение
There's your problem.
nvm i already had onplayerenterecheckpoint, so still same problem..
Reply
#7

Here is

pawn Код:
}

public OnPlayerEnterCheckpoint(playerid)
{
    new string[128];
    if(VCP[playerid] == 1)
    {
        new Float:x, Float:y, Float:z;
        GetVehiclePos(PlayerInfo[playerid][pCarKey], x, y, z);
        if(PlayerToPoint(6.5,playerid,x,y,z))
        {
            GameTextForPlayer(playerid, "~p~You have found it", 2000, 4);
            VCP[playerid] = 0;
            DisablePlayerCheckpoint(playerid);
            ActiveCP[playerid] = 0;
        }
        else if(PlayerInfo[playerid][pGarageKey] != 0 && PlayerToPoint(6.5,playerid,Garages[PlayerInfo[playerid][pGarageKey]][EnterX],Garages[PlayerInfo[playerid][pGarageKey]][EnterY],Garages[PlayerInfo[playerid][pGarageKey]][EnterZ]))
        {
            GameTextForPlayer(playerid, "~p~You have found it", 2000, 4);
            VCP[playerid] = 0;
            DisablePlayerCheckpoint(playerid);
            ActiveCP[playerid] = 0;
        }
    }
    new veh = GetPlayerVehicleID(playerid);
    if(TruckDelivering[playerid] == 2)
    {
        {
            if(PlayerInfo[playerid][pCanJob] <= 10)
            {
                if(IsTrailerAttachedToVehicle(veh))
                {
                    if(PlayerInfo[playerid][pJob] == 9)
                    {
                        new randmoney = 30 + random(70);
                        switch(TruckerPickup[playerid][0])
                        {
                            case 0: // This is the first place, factory at flint.
                            {
                                TruckerPickup[playerid][0]++;
                                SendClientMessage(playerid, COLOR_WHITE, "Alright, my name is Earl and I'll be on the trucker radio with you.");
                                SendClientMessage(playerid, COLOR_WHITE, "To keep you updated, now head to the Blueberry Factory and load up the trailer.");
                                PlayerInfo[playerid][TruckDelivX] = -15.2205;
                                PlayerInfo[playerid][TruckDelivY] = -273.2395;
                                PlayerInfo[playerid][TruckDelivZ] = 5.4297;
                                SetPlayerCheckpoint(playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ],3.0);
                            }
                            case 1: // This is the first place, blueberry factory.
                            {
                                if(PlayerToPoint(6.5,playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ]))
                                {
                                    TruckerPickup[playerid][0]++;
                                    PlayerInfo[playerid][TruckDelivX] = 6.7159;
                                    PlayerInfo[playerid][TruckDelivY] = 1175.9274;
                                    PlayerInfo[playerid][TruckDelivZ] = 19.4657;
                                    SetPlayerCheckpoint(playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ],3.0);
                                    PlayerInfo[playerid][pCanJob] += 1;
                                    PlayerInfo[playerid][pPayCheck] += 100;
                                    SendClientMessage(playerid, COLOR_WHITE, "Your trailer is now loaded up with different food packages.");
                                    SendClientMessage(playerid, COLOR_WHITE, "Head to the Motel in Fort Carson and deliver it.");
                                }
                            }
                            case 2: // The motel in fort carson
                            {
                                if(PlayerToPoint(6.5,playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ]))
                                {
                                    TruckerPickup[playerid][0]++;
                                    PlayerInfo[playerid][TruckDelivX] = 272.7906;
                                    PlayerInfo[playerid][TruckDelivY] = 1409.7909;
                                    PlayerInfo[playerid][TruckDelivZ] = 10.4578;
                                    SetPlayerCheckpoint(playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ],3.0);
                                    SendClientMessage(playerid, COLOR_WHITE, "You have delivered the food to the Motel, now head to the Factory");
                                    SendClientMessage(playerid, COLOR_WHITE, "in Green Palms and load up your trailer with metal parts.");
                                    PlayerInfo[playerid][pPayCheck] += randmoney;
                                    PlayerInfo[playerid][pCanJob] += 1;
                                }
                            }
                            case 3: // Oil factory - Green palms
                            {
                                if(PlayerToPoint(6.5,playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ]))
                                {
                                    TruckerPickup[playerid][0]++;
                                    PlayerInfo[playerid][TruckDelivX] = 2561.8286;
                                    PlayerInfo[playerid][TruckDelivY] = 2060.5769;
                                    PlayerInfo[playerid][TruckDelivZ] = 10.8203;
                                    PlayerInfo[playerid][pPayCheck] += 50;
                                    SetPlayerCheckpoint(playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ],3.0);
                                    SendClientMessage(playerid, COLOR_WHITE, "Your trailer is now loaded up with metal parts, drive carefully.");
                                    SendClientMessage(playerid, COLOR_WHITE, "Head to the Ammunation in Las Venturas and deliver this.");
                                    PlayerInfo[playerid][pCanJob] += 1;
                                }
                            }
                            case 4: // Oil factory - Green palms
                            {
                                if(PlayerToPoint(6.5,playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ]))
                                {
                                    TruckerPickup[playerid][0]++;
                                    PlayerInfo[playerid][TruckDelivX] = -66.4511;
                                    PlayerInfo[playerid][TruckDelivY] = -1120.7473;
                                    PlayerInfo[playerid][TruckDelivZ] = 1.0781;
                                    SetPlayerCheckpoint(playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ],3.0);
                                    SendClientMessage(playerid, COLOR_WHITE, "You have delivered the materials to the Ammunation, now head back to LS.");
                                    PlayerInfo[playerid][pPayCheck] += randmoney;
                                    PlayerInfo[playerid][pCanJob] += 1;
                                }
                            }
                            case 5: // Back in LS
                            {
                                if(PlayerToPoint(6.5,playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ]))
                                {
                                    TruckerPickup[playerid][0]++;
                                    PlayerInfo[playerid][TruckDelivX] = 0;
                                    PlayerInfo[playerid][TruckDelivY] = 0;
                                    PlayerInfo[playerid][TruckDelivZ] = 0;
                                    SendClientMessage(playerid, COLOR_WHITE, "Earl: Thanks for helping me! I have banked you the money, they'll be in your");
                                    SendClientMessage(playerid, COLOR_WHITE, "pay cheque, come back soon for some more things to do!");
                                    DisablePlayerCheckpoint(playerid);
                                    PlayerInfo[playerid][pPayCheck] += randmoney;
                                    PlayerInfo[playerid][pCanJob] += 1;
                                    TruckDelivering[playerid] = 0;
                                }
                            }
                        }
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "Where is your trailer?");
                }
            }
        }
    }
    if(FarmerVar[playerid] == 1)
    {
        if (IsPlayerInAnyVehicle(playerid))
        {
            new carid = GetPlayerVehicleID(playerid);
            new cash=(random(5)+5);
            if(IsAHarvest(carid))
            {
                switch(FarmerPickup[playerid][0])
                {
                    case 0:
                    {
                        SetPlayerCheckpoint(playerid, -310.9348,-1527.6194,11.9171, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 1:
                    {
                        SetPlayerCheckpoint(playerid, -356.4102,-1279.9491,27.2145, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 2:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -451.8795,-1366.8473,27.8536, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 3:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 4:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -412.9661,-1343.8303,25.2515, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 5:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop Crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 6:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -222.0330,-1326.2947,11.3960, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 7:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 8:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -213.9147,-1412.1311,5.3441, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 9:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 10:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -571.5322,-1314.6523,22.1043, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 11:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop corps
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 12:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -315.1721,-1539.1395,12.6444, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 13:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 14:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -237.7299,-1496.0952,7.4135, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 15:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0);// Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }// Her
                    case 16:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -222.0330,-1326.2947,11.3960, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 17:
                    {
                        SetPlayerCheckpoint(playerid, -376.7750,-1437.6874,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 18:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -451.8795,-1366.8473,27.8536, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 19:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 20:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -213.9147,-1412.1311,5.3441, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 21:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 22:
                    {
                        DisablePlayerCheckpoint(playerid);
                        GameTextForPlayer(playerid, "~r~Good job! Heres a ~g~10 dollar bill, ~r~for some good working.", 5000, 1);
                        GivePlayerCash(playerid, 10);
                        PlayerInfo[playerid][pCanJob] += 1;
                        FlintFarm[Ammount]  += 97;
                        FarmerVar[playerid] = 0;
                        SaveFarmSystem();
                    }
                }
                FarmerPickup[playerid][0]++;
                PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
            }
        }
        return 1;
    }
    if(DrugRunning[playerid] == 1)
    {
        if(PlayerToPoint(5.0,playerid,719.5071,-444.9160,16.3359) && DrugStep[playerid] == 1) // Pay&Spray Dillimore
        {
            SendClientMessage(playerid, COLOR_WHITE, "Good job, now head to the next spot.");
            DrugStep[playerid] = 2;
            SetPlayerCheckpoint(playerid, 2795.8030,-1619.2686,10.9219, 5.0);
        }
        if(PlayerToPoint(5.0,playerid,2795.8030,-1619.2686,10.9219) && DrugStep[playerid] == 2) // The fake licenses place on LS:RP lol
        {
            SendClientMessage(playerid, COLOR_WHITE, "Going good, now head back to the farm.");
            DrugStep[playerid] = 3;
            SetPlayerCheckpoint(playerid, -1425.6927,-1528.2820,101.9709, 5.0);
        }
        if(PlayerToPoint(5.0,playerid,-1425.6927,-1528.2820,101.9709) && DrugStep[playerid] == 3) // Back to the farm
        {
            DrugStep[playerid] = 0;
            DrugRunning[playerid] = 0;
            DisablePlayerCheckpoint(playerid);
            ActiveCP[playerid] = 0;
            Businesses[14][Till] -= 450;
            PlayerInfo[playerid][pPayCheck] += 450;
            DrugFarm[Ammount] += 7;
            SaveDrugSystem();
            SendClientMessage(playerid, COLOR_WHITE, "Thanks, here is a payment for your job 450$ added to your paycheck.");
            DrugTimer[playerid] = 1;
            SetTimerEx("DrugDeliveryReset", 240000, false, "i", playerid);
        }
        return 1;
    }
    for(new i = 0; i < 247; i++)
    {
        if(PlayerToPoint(1.0,playerid,2.1507,-29.0139,1003.5494))
        {
            ShowPlayerDialog(playerid, 752, DIALOG_STYLE_LIST, "Welcome to 24/7", "Portable Radio($150) \nBaseballbat($10) \nToolkit($35) \nCigarettes($7) \nLighter($5) \nScratch Card($35) \nGas Can($50) \nMask($250) \nShovel($7) \nCellphone($50) \nCards($25) \nDice($2) \nParachute($15)\nCane($5)\nCamera($45)\nBag($50)\nSeeds($100)", "Buy", "Cancel");
        }
    }
    for(new i = 0; i < 247; i++)
    {
        if(PlayerToPoint(1.0,playerid,-28.1577,-89.9538,1003.5469))
        {
            ShowPlayerDialog(playerid, 752, DIALOG_STYLE_LIST, "Welcome to 24/7", "Portable Radio($150) \nBaseballbat($10) \nToolkit($35) \nCigarettes($7) \nLighter($5) \nScratch Card($35) \nGas Can($50) \nMask($250) \nShovel($7) \nCellphone($50) \nCards($25) \nDice($2) \nParachute($15)\nCane($5)\nCamera($45)\nBag($50)\nSeeds($100)", "Buy", "Cancel");
        }
    }
    for(new i = 0; i < 247; i++)
    {
        if(PlayerToPoint(1.0,playerid,-29.0530,-185.1293,1003.5469))
        {
            ShowPlayerDialog(playerid, 752, DIALOG_STYLE_LIST, "Welcome to 24/7", "Portable Radio($150) \nBaseballbat($10) \nToolkit($35) \nCigarettes($7) \nLighter($5) \nScratch Card($35) \nGas Can($50) \nMask($250) \nShovel($7) \nCellphone($50) \nCards($25) \nDice($2) \nParachute($15)\nCane($5)\nCamera($45)\nBag($50)\nSeeds($100)", "Buy", "Cancel");
        }
    }
    for(new i = 0; i < 1; i++)
    {
        if(PlayerToPoint(1.0,playerid,373.9234,-118.8064,1001.4922))
        {
            ShowPlayerDialog(playerid, 757, DIALOG_STYLE_LIST, "Welcome to Pizza Stuck", "Pizza($10) \nFries($5) \nPizza With a Soda($15) \nSalad($15)", "Buy", "Cancel");
        }
    }
    for(new i = 0; i < 2; i++)
    {
        if(PlayerToPoint(1.0,playerid,2031.5616,-1831.1558,13.6469))
        {
            ShowPlayerDialog(playerid, 758, DIALOG_STYLE_LIST, "Welcome to Restaurang", "Hamburger($10) \nSoda($5) \nHamburger With Fries($15) \nSalad with chicken($15)", "Buy", "Cancel");
        }
    }
    for(new i = 0; i < 3; i++)
    {
        if(PlayerToPoint(1.0,playerid,753.9210,2.8432,1083.3824))
        {
            ShowPlayerDialog(playerid, 760, DIALOG_STYLE_LIST, "Welcome to LS Gym", "Boxing ($50) \nKung Fu ($65) \nKneehead ($85) \nElbow ($80) \nGrabkick ($115)", "Buy", "Cancel");
        }
    /*}
    for(new i = 0; i < 4; i++)
    {
        if(PlayerToPoint(1.0,playerid,290.2976,-109.7823,1001.5156))
        if(PlayerInfo[playerid][pWepLic] == 0) { SendClientMessage(playerid, COLOR_RED, "You need gun license."); return 1; }
        {
            ShowPlayerDialog(playerid, 759, DIALOG_STYLE_LIST, "Welcome to Ammunation", "Deagle($900) \nColt($500) \nUzi($1000) \nTec9($1000) \nAK47($5000)", "Buy", "Cancel");
            return 1;
        }*/

    }
    for(new h = 0; h < sizeof(DynamicCars); h++)
    {
            //if(DynamicCars[updatedvehicleid][CarType] == 1)
            new carid = GetPlayerVehicleID(playerid);
            if(GetPlayerVehicleID(playerid) == 67 || GetPlayerVehicleID(playerid) == 68)
            if(IsADMVCar(carid))
            {
            if(TakingDrivingTest[playerid] == 1)
            {
                if(PlayerToPoint(5.0,playerid,2068.7415,-1913.5304,13.3192) && DrivingTestStep[playerid] == 1)
                {
                    DrivingTestStep[playerid] = 2;
                    SetPlayerCheckpoint(playerid, 2068.7415,-1913.5304,13.3192, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2084.2441,-1879.5679,13.0991) && DrivingTestStep[playerid] == 2)
                {
                    DrivingTestStep[playerid] = 3;
                    SetPlayerCheckpoint(playerid, 2087.5696,-1778.1520,13.1532, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2087.5696,-1778.1520,13.1532) && DrivingTestStep[playerid] == 3)
                {
                    DrivingTestStep[playerid] = 4;
                    SetPlayerCheckpoint(playerid, 2032.9459,-1749.4602,13.1555, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2032.9459,-1749.4602,13.1555) && DrivingTestStep[playerid] == 4)
                {
                    DrivingTestStep[playerid] = 5;
                    SetPlayerCheckpoint(playerid, 1922.5228,-1749.9053,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1922.5228,-1749.9053,13.1541) && DrivingTestStep[playerid] == 5)
                {
                    DrivingTestStep[playerid] = 6;
                    SetPlayerCheckpoint(playerid, 1824.5392,-1727.6184,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1824.5392,-1727.6184,13.1554) && DrivingTestStep[playerid] == 6)
                {
                    DrivingTestStep[playerid] = 7;
                    SetPlayerCheckpoint(playerid, 1784.2493,-1606.8083,13.1385, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1784.2493,-1606.8083,13.1385) && DrivingTestStep[playerid] == 7)
                {
                    DrivingTestStep[playerid] = 8;
                    SetPlayerCheckpoint(playerid, 1684.3798,-1590.0769,13.1560, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1684.3798,-1590.0769,13.1560) && DrivingTestStep[playerid] == 8)
                {
                    DrivingTestStep[playerid] = 9;
                    SetPlayerCheckpoint(playerid, 1570.4451,-1589.5077,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1570.4451,-1589.5077,13.1541) && DrivingTestStep[playerid] == 9)
                {
                    DrivingTestStep[playerid] = 10;
                    SetPlayerCheckpoint(playerid, 1527.8423,-1619.7291,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1527.8423,-1619.7291,13.1554) && DrivingTestStep[playerid] == 10)
                {
                    DrivingTestStep[playerid] = 11;
                    SetPlayerCheckpoint(playerid, 1527.2231,-1705.9948,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1527.2231,-1705.9948,13.1554) && DrivingTestStep[playerid] == 11)
                {
                    DrivingTestStep[playerid] = 12;
                    SetPlayerCheckpoint(playerid, 1494.3622,-1729.9639,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1494.3622,-1729.9639,13.1554) && DrivingTestStep[playerid] == 12)
                {
                    DrivingTestStep[playerid] = 13;
                    SetPlayerCheckpoint(playerid, 1417.2826,-1729.6477,13.1633, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1417.2826,-1729.6477,13.1633) && DrivingTestStep[playerid] == 13)
                {
                    DrivingTestStep[playerid] = 14;
                    SetPlayerCheckpoint(playerid, 1386.8727,-1840.9457,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1386.8727,-1840.9457,13.1541) && DrivingTestStep[playerid] == 14)
                {
                    DrivingTestStep[playerid] = 15;
                    SetPlayerCheckpoint(playerid, 1463.2797,-1875.0575,13.1547, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1463.2797,-1875.0575,13.1547) && DrivingTestStep[playerid] == 15)
                {
                    DrivingTestStep[playerid] = 16;
                    SetPlayerCheckpoint(playerid, 1637.7559,-1875.4866,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1637.7559,-1875.4866,13.1541) && DrivingTestStep[playerid] == 16)
                {
                    DrivingTestStep[playerid] = 17;
                    SetPlayerCheckpoint(playerid, 1692.3719,-1838.1967,13.1555, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1692.3719,-1838.1967,13.1555) && DrivingTestStep[playerid] == 17)
                {
                    DrivingTestStep[playerid] = 18;
                    SetPlayerCheckpoint(playerid, 1731.2744,-1818.6259,13.1376, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1731.2744,-1818.6259,13.1376) && DrivingTestStep[playerid] == 18)
                {
                    DrivingTestStep[playerid] = 19;
                    SetPlayerCheckpoint(playerid, 1798.4176,-1834.8743,13.1604, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1798.4176,-1834.8743,13.1604) && DrivingTestStep[playerid] == 19)
                {
                    DrivingTestStep[playerid] = 20;
                    SetPlayerCheckpoint(playerid, 1819.6390,-1872.5280,13.1837, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1819.6390,-1872.5280,13.1837) && DrivingTestStep[playerid] == 20)
                {
                    DrivingTestStep[playerid] = 21;
                    SetPlayerCheckpoint(playerid, 1936.6617,-1934.8263,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1936.6617,-1934.8263,13.1541) && DrivingTestStep[playerid] == 21)
                {
                    DrivingTestStep[playerid] = 22;
                    SetPlayerCheckpoint(playerid, 2056.2322,-1912.3051,13.3194, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2056.2322,-1912.3051,13.3194) && DrivingTestStep[playerid] == 22)
                {
                    new Float:health;
                    veh = GetPlayerVehicleID(playerid);
                    GetVehicleHealth(veh, health);

                    if(health >= 950.0)
                    {
                        new Float:x, Float:y, Float:z,Float:distance = 3.0;
                        GetPlayerPos(playerid,x,y,z);
                        if(IsPlayerInRangeOfPoint(playerid,3.0,x,y,z))
                        PlayAudioStreamForPlayer(playerid,"http://www.fileden.com/files/2012/4/18/3293679/Gta%20San%20Andreas%20Mission%20Complete%20Sound%20HQ.mp3",x,y,z,distance,0);
                        GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                        if(engine == VEHICLE_PARAMS_ON) { SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); }
                        SendClientMessage(playerid, COLOR_GREEN, "Congratulations! You have passed the drivers license test!");
                        //GameTextForPlayer(playerid, "~g~Passed", 3000, 1);
                        GameDrawForPlayer(playerid,"~g~Passed", 2000);
                        PlayerInfo[playerid][pCarLic] = 1;
                        EngineStatus[veh] = 0;
                        SetVehicleToRespawn(veh);
                        EngineStatus[veh] = 0;
                        TakingDrivingTest[playerid] = 0;
                        DisablePlayerCheckpoint(playerid);
                        ActiveCP[playerid] = 0;
                        GivePlayerCash(playerid,-Businesses[12][EntranceCost]);
                        Businesses[12][Till] += Businesses[12][EntranceCost];
                    }
                    else
                    {
                        GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                        if(engine == VEHICLE_PARAMS_ON) { SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); }
                        SendClientMessage(playerid, COLOR_LIGHTRED, "Bad Luck! You have failed the drivers license test, please try again.");
                        SendClientMessage(playerid, COLOR_LIGHTRED, "You have been charged $50 for the attempting and failing your test.");
                        //GameTextForPlayer(playerid, "~r~Failed", 3000, 1);
                        GameDrawForPlayer(playerid,"~r~Failed", 2000);
                        EngineStatus[veh] = 0;
                        SetVehicleToRespawn(veh);
                        EngineStatus[veh] = 0;
                        TakingDrivingTest[playerid] = 0;
                        DisablePlayerCheckpoint(playerid);
                        ActiveCP[playerid] = 0;
                        GivePlayerCash(playerid,-50);
                        Businesses[12][Till] += 50;
                    }
                    DrivingTestStep[playerid] = 0;
                    ActiveCP[playerid] = 0;
                }
                return 1;
            }
        }
    }
    return 1;
}
Reply
#8

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
So i just need to add

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}
Well, actually you need to add it and do a lot of coding there.

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
            new carid = GetPlayerVehicleID(playerid);
            if(IsADMVCar(carid))
            {
            if(TakingDrivingTest[playerid] == 1)
            {
                if(PlayerToPoint(5.0,playerid,2068.7415,-1913.5304,13.3192) && DrivingTestStep[playerid] == 1)
                {
                    DrivingTestStep[playerid] = 2;
                    SetPlayerCheckpoint(playerid, 2068.7415,-1913.5304,13.3192, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2084.2441,-1879.5679,13.0991) && DrivingTestStep[playerid] == 2)
                {
                    DrivingTestStep[playerid] = 3;
                    SetPlayerCheckpoint(playerid, 2087.5696,-1778.1520,13.1532, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2087.5696,-1778.1520,13.1532) && DrivingTestStep[playerid] == 3)
                {
                    DrivingTestStep[playerid] = 4;
                    SetPlayerCheckpoint(playerid, 2032.9459,-1749.4602,13.1555, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2032.9459,-1749.4602,13.1555) && DrivingTestStep[playerid] == 4)
                {
                    DrivingTestStep[playerid] = 5;
                    SetPlayerCheckpoint(playerid, 1922.5228,-1749.9053,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1922.5228,-1749.9053,13.1541) && DrivingTestStep[playerid] == 5)
                {
                    DrivingTestStep[playerid] = 6;
                    SetPlayerCheckpoint(playerid, 1824.5392,-1727.6184,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1824.5392,-1727.6184,13.1554) && DrivingTestStep[playerid] == 6)
                {
                    DrivingTestStep[playerid] = 7;
                    SetPlayerCheckpoint(playerid, 1784.2493,-1606.8083,13.1385, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1784.2493,-1606.8083,13.1385) && DrivingTestStep[playerid] == 7)
                {
                    DrivingTestStep[playerid] = 8;
                    SetPlayerCheckpoint(playerid, 1684.3798,-1590.0769,13.1560, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1684.3798,-1590.0769,13.1560) && DrivingTestStep[playerid] == 8)
                {
                    DrivingTestStep[playerid] = 9;
                    SetPlayerCheckpoint(playerid, 1570.4451,-1589.5077,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1570.4451,-1589.5077,13.1541) && DrivingTestStep[playerid] == 9)
                {
                    DrivingTestStep[playerid] = 10;
                    SetPlayerCheckpoint(playerid, 1527.8423,-1619.7291,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1527.8423,-1619.7291,13.1554) && DrivingTestStep[playerid] == 10)
                {
                    DrivingTestStep[playerid] = 11;
                    SetPlayerCheckpoint(playerid, 1527.2231,-1705.9948,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1527.2231,-1705.9948,13.1554) && DrivingTestStep[playerid] == 11)
                {
                    DrivingTestStep[playerid] = 12;
                    SetPlayerCheckpoint(playerid, 1494.3622,-1729.9639,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1494.3622,-1729.9639,13.1554) && DrivingTestStep[playerid] == 12)
                {
                    DrivingTestStep[playerid] = 13;
                    SetPlayerCheckpoint(playerid, 1417.2826,-1729.6477,13.1633, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1417.2826,-1729.6477,13.1633) && DrivingTestStep[playerid] == 13)
                {
                    DrivingTestStep[playerid] = 14;
                    SetPlayerCheckpoint(playerid, 1386.8727,-1840.9457,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1386.8727,-1840.9457,13.1541) && DrivingTestStep[playerid] == 14)
                {
                    DrivingTestStep[playerid] = 15;
                    SetPlayerCheckpoint(playerid, 1463.2797,-1875.0575,13.1547, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1463.2797,-1875.0575,13.1547) && DrivingTestStep[playerid] == 15)
                {
                    DrivingTestStep[playerid] = 16;
                    SetPlayerCheckpoint(playerid, 1637.7559,-1875.4866,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1637.7559,-1875.4866,13.1541) && DrivingTestStep[playerid] == 16)
                {
                    DrivingTestStep[playerid] = 17;
                    SetPlayerCheckpoint(playerid, 1692.3719,-1838.1967,13.1555, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1692.3719,-1838.1967,13.1555) && DrivingTestStep[playerid] == 17)
                {
                    DrivingTestStep[playerid] = 18;
                    SetPlayerCheckpoint(playerid, 1731.2744,-1818.6259,13.1376, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1731.2744,-1818.6259,13.1376) && DrivingTestStep[playerid] == 18)
                {
                    DrivingTestStep[playerid] = 19;
                    SetPlayerCheckpoint(playerid, 1798.4176,-1834.8743,13.1604, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1798.4176,-1834.8743,13.1604) && DrivingTestStep[playerid] == 19)
                {
                    DrivingTestStep[playerid] = 20;
                    SetPlayerCheckpoint(playerid, 1819.6390,-1872.5280,13.1837, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1819.6390,-1872.5280,13.1837) && DrivingTestStep[playerid] == 20)
                {
                    DrivingTestStep[playerid] = 21;
                    SetPlayerCheckpoint(playerid, 1936.6617,-1934.8263,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1936.6617,-1934.8263,13.1541) && DrivingTestStep[playerid] == 21)
                {
                    DrivingTestStep[playerid] = 22;
                    SetPlayerCheckpoint(playerid, 2056.2322,-1912.3051,13.3194, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2056.2322,-1912.3051,13.3194) && DrivingTestStep[playerid] == 22)
                {
                    new Float:health;
                    veh = GetPlayerVehicleID(playerid);
                    GetVehicleHealth(veh, health);

                    if(health >= 950.0)
                    {
                        new Float:x, Float:y, Float:z,Float:distance = 3.0;
                        GetPlayerPos(playerid,x,y,z);
                        if(IsPlayerInRangeOfPoint(playerid,3.0,x,y,z))
                        PlayAudioStreamForPlayer(playerid,"http://www.fileden.com/files/2012/4/18/3293679/Gta%20San%20Andreas%20Mission%20Complete%20Sound%20HQ.mp3",x,y,z,distance,0);
                        GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                        if(engine == VEHICLE_PARAMS_ON) { SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); }
                        SendClientMessage(playerid, COLOR_GREEN, "Congratulations! You have passed the drivers license test!");
                        //GameTextForPlayer(playerid, "~g~Passed", 3000, 1);
                        GameDrawForPlayer(playerid,"~g~Passed", 2000);
                        PlayerInfo[playerid][pCarLic] = 1;
                        EngineStatus[veh] = 0;
                        SetVehicleToRespawn(veh);
                        EngineStatus[veh] = 0;
                        TakingDrivingTest[playerid] = 0;
                        DisablePlayerCheckpoint(playerid);
                        ActiveCP[playerid] = 0;
                        GivePlayerCash(playerid,-Businesses[12][EntranceCost]);
                        Businesses[12][Till] += Businesses[12][EntranceCost];
                    }
                    else
                    {
                        GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                        if(engine == VEHICLE_PARAMS_ON) { SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); }
                        SendClientMessage(playerid, COLOR_LIGHTRED, "Bad Luck! You have failed the drivers license test, please try again.");
                        SendClientMessage(playerid, COLOR_LIGHTRED, "You have been charged $50 for the attempting and failing your test.");
                        //GameTextForPlayer(playerid, "~r~Failed", 3000, 1);
                        GameDrawForPlayer(playerid,"~r~Failed", 2000);
                        EngineStatus[veh] = 0;
                        SetVehicleToRespawn(veh);
                        EngineStatus[veh] = 0;
                        TakingDrivingTest[playerid] = 0;
                        DisablePlayerCheckpoint(playerid);
                        ActiveCP[playerid] = 0;
                        GivePlayerCash(playerid,-50);
                        Businesses[12][Till] += 50;
                    }
                    DrivingTestStep[playerid] = 0;
                    ActiveCP[playerid] = 0;
                }
        }
        return 1;
}
Reply
#9

Here is

pawn Код:
}

public OnPlayerEnterCheckpoint(playerid)
{
    new string[128];
    if(VCP[playerid] == 1)
    {
        new Float:x, Float:y, Float:z;
        GetVehiclePos(PlayerInfo[playerid][pCarKey], x, y, z);
        if(PlayerToPoint(6.5,playerid,x,y,z))
        {
            GameTextForPlayer(playerid, "~p~You have found it", 2000, 4);
            VCP[playerid] = 0;
            DisablePlayerCheckpoint(playerid);
            ActiveCP[playerid] = 0;
        }
        else if(PlayerInfo[playerid][pGarageKey] != 0 && PlayerToPoint(6.5,playerid,Garages[PlayerInfo[playerid][pGarageKey]][EnterX],Garages[PlayerInfo[playerid][pGarageKey]][EnterY],Garages[PlayerInfo[playerid][pGarageKey]][EnterZ]))
        {
            GameTextForPlayer(playerid, "~p~You have found it", 2000, 4);
            VCP[playerid] = 0;
            DisablePlayerCheckpoint(playerid);
            ActiveCP[playerid] = 0;
        }
    }
    new veh = GetPlayerVehicleID(playerid);
    if(TruckDelivering[playerid] == 2)
    {
        {
            if(PlayerInfo[playerid][pCanJob] <= 10)
            {
                if(IsTrailerAttachedToVehicle(veh))
                {
                    if(PlayerInfo[playerid][pJob] == 9)
                    {
                        new randmoney = 30 + random(70);
                        switch(TruckerPickup[playerid][0])
                        {
                            case 0: // This is the first place, factory at flint.
                            {
                                TruckerPickup[playerid][0]++;
                                SendClientMessage(playerid, COLOR_WHITE, "Alright, my name is Earl and I'll be on the trucker radio with you.");
                                SendClientMessage(playerid, COLOR_WHITE, "To keep you updated, now head to the Blueberry Factory and load up the trailer.");
                                PlayerInfo[playerid][TruckDelivX] = -15.2205;
                                PlayerInfo[playerid][TruckDelivY] = -273.2395;
                                PlayerInfo[playerid][TruckDelivZ] = 5.4297;
                                SetPlayerCheckpoint(playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ],3.0);
                            }
                            case 1: // This is the first place, blueberry factory.
                            {
                                if(PlayerToPoint(6.5,playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ]))
                                {
                                    TruckerPickup[playerid][0]++;
                                    PlayerInfo[playerid][TruckDelivX] = 6.7159;
                                    PlayerInfo[playerid][TruckDelivY] = 1175.9274;
                                    PlayerInfo[playerid][TruckDelivZ] = 19.4657;
                                    SetPlayerCheckpoint(playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ],3.0);
                                    PlayerInfo[playerid][pCanJob] += 1;
                                    PlayerInfo[playerid][pPayCheck] += 100;
                                    SendClientMessage(playerid, COLOR_WHITE, "Your trailer is now loaded up with different food packages.");
                                    SendClientMessage(playerid, COLOR_WHITE, "Head to the Motel in Fort Carson and deliver it.");
                                }
                            }
                            case 2: // The motel in fort carson
                            {
                                if(PlayerToPoint(6.5,playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ]))
                                {
                                    TruckerPickup[playerid][0]++;
                                    PlayerInfo[playerid][TruckDelivX] = 272.7906;
                                    PlayerInfo[playerid][TruckDelivY] = 1409.7909;
                                    PlayerInfo[playerid][TruckDelivZ] = 10.4578;
                                    SetPlayerCheckpoint(playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ],3.0);
                                    SendClientMessage(playerid, COLOR_WHITE, "You have delivered the food to the Motel, now head to the Factory");
                                    SendClientMessage(playerid, COLOR_WHITE, "in Green Palms and load up your trailer with metal parts.");
                                    PlayerInfo[playerid][pPayCheck] += randmoney;
                                    PlayerInfo[playerid][pCanJob] += 1;
                                }
                            }
                            case 3: // Oil factory - Green palms
                            {
                                if(PlayerToPoint(6.5,playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ]))
                                {
                                    TruckerPickup[playerid][0]++;
                                    PlayerInfo[playerid][TruckDelivX] = 2561.8286;
                                    PlayerInfo[playerid][TruckDelivY] = 2060.5769;
                                    PlayerInfo[playerid][TruckDelivZ] = 10.8203;
                                    PlayerInfo[playerid][pPayCheck] += 50;
                                    SetPlayerCheckpoint(playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ],3.0);
                                    SendClientMessage(playerid, COLOR_WHITE, "Your trailer is now loaded up with metal parts, drive carefully.");
                                    SendClientMessage(playerid, COLOR_WHITE, "Head to the Ammunation in Las Venturas and deliver this.");
                                    PlayerInfo[playerid][pCanJob] += 1;
                                }
                            }
                            case 4: // Oil factory - Green palms
                            {
                                if(PlayerToPoint(6.5,playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ]))
                                {
                                    TruckerPickup[playerid][0]++;
                                    PlayerInfo[playerid][TruckDelivX] = -66.4511;
                                    PlayerInfo[playerid][TruckDelivY] = -1120.7473;
                                    PlayerInfo[playerid][TruckDelivZ] = 1.0781;
                                    SetPlayerCheckpoint(playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ],3.0);
                                    SendClientMessage(playerid, COLOR_WHITE, "You have delivered the materials to the Ammunation, now head back to LS.");
                                    PlayerInfo[playerid][pPayCheck] += randmoney;
                                    PlayerInfo[playerid][pCanJob] += 1;
                                }
                            }
                            case 5: // Back in LS
                            {
                                if(PlayerToPoint(6.5,playerid,PlayerInfo[playerid][TruckDelivX],PlayerInfo[playerid][TruckDelivY],PlayerInfo[playerid][TruckDelivZ]))
                                {
                                    TruckerPickup[playerid][0]++;
                                    PlayerInfo[playerid][TruckDelivX] = 0;
                                    PlayerInfo[playerid][TruckDelivY] = 0;
                                    PlayerInfo[playerid][TruckDelivZ] = 0;
                                    SendClientMessage(playerid, COLOR_WHITE, "Earl: Thanks for helping me! I have banked you the money, they'll be in your");
                                    SendClientMessage(playerid, COLOR_WHITE, "pay cheque, come back soon for some more things to do!");
                                    DisablePlayerCheckpoint(playerid);
                                    PlayerInfo[playerid][pPayCheck] += randmoney;
                                    PlayerInfo[playerid][pCanJob] += 1;
                                    TruckDelivering[playerid] = 0;
                                }
                            }
                        }
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "Where is your trailer?");
                }
            }
        }
    }
    if(FarmerVar[playerid] == 1)
    {
        if (IsPlayerInAnyVehicle(playerid))
        {
            new carid = GetPlayerVehicleID(playerid);
            new cash=(random(5)+5);
            if(IsAHarvest(carid))
            {
                switch(FarmerPickup[playerid][0])
                {
                    case 0:
                    {
                        SetPlayerCheckpoint(playerid, -310.9348,-1527.6194,11.9171, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 1:
                    {
                        SetPlayerCheckpoint(playerid, -356.4102,-1279.9491,27.2145, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 2:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -451.8795,-1366.8473,27.8536, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 3:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 4:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -412.9661,-1343.8303,25.2515, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 5:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop Crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 6:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -222.0330,-1326.2947,11.3960, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 7:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 8:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -213.9147,-1412.1311,5.3441, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 9:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 10:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -571.5322,-1314.6523,22.1043, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 11:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop corps
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 12:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -315.1721,-1539.1395,12.6444, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 13:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 14:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -237.7299,-1496.0952,7.4135, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 15:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0);// Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }// Her
                    case 16:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -222.0330,-1326.2947,11.3960, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 17:
                    {
                        SetPlayerCheckpoint(playerid, -376.7750,-1437.6874,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 18:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -451.8795,-1366.8473,27.8536, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 19:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 20:
                    {
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            format(string, sizeof(string), "~w~Good work~n~~g~$%d added to your paycheck.",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -213.9147,-1412.1311,5.3441, 5.0); // Farm
                        PlayerInfo[playerid][pCanJob] += 1;
                    }
                    case 21:
                    {
                        SetPlayerCheckpoint(playerid, -374.5721,-1427.4125,25.7266, 5.0); // Drop crops
                        PlayerInfo[playerid][pCanJob] += 1;
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 22:
                    {
                        DisablePlayerCheckpoint(playerid);
                        GameTextForPlayer(playerid, "~r~Good job! Heres a ~g~10 dollar bill, ~r~for some good working.", 5000, 1);
                        GivePlayerCash(playerid, 10);
                        PlayerInfo[playerid][pCanJob] += 1;
                        FlintFarm[Ammount]  += 97;
                        FarmerVar[playerid] = 0;
                        SaveFarmSystem();
                    }
                }
                FarmerPickup[playerid][0]++;
                PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
            }
        }
        return 1;
    }
    if(DrugRunning[playerid] == 1)
    {
        if(PlayerToPoint(5.0,playerid,719.5071,-444.9160,16.3359) && DrugStep[playerid] == 1) // Pay&Spray Dillimore
        {
            SendClientMessage(playerid, COLOR_WHITE, "Good job, now head to the next spot.");
            DrugStep[playerid] = 2;
            SetPlayerCheckpoint(playerid, 2795.8030,-1619.2686,10.9219, 5.0);
        }
        if(PlayerToPoint(5.0,playerid,2795.8030,-1619.2686,10.9219) && DrugStep[playerid] == 2) // The fake licenses place on LS:RP lol
        {
            SendClientMessage(playerid, COLOR_WHITE, "Going good, now head back to the farm.");
            DrugStep[playerid] = 3;
            SetPlayerCheckpoint(playerid, -1425.6927,-1528.2820,101.9709, 5.0);
        }
        if(PlayerToPoint(5.0,playerid,-1425.6927,-1528.2820,101.9709) && DrugStep[playerid] == 3) // Back to the farm
        {
            DrugStep[playerid] = 0;
            DrugRunning[playerid] = 0;
            DisablePlayerCheckpoint(playerid);
            ActiveCP[playerid] = 0;
            Businesses[14][Till] -= 450;
            PlayerInfo[playerid][pPayCheck] += 450;
            DrugFarm[Ammount] += 7;
            SaveDrugSystem();
            SendClientMessage(playerid, COLOR_WHITE, "Thanks, here is a payment for your job 450$ added to your paycheck.");
            DrugTimer[playerid] = 1;
            SetTimerEx("DrugDeliveryReset", 240000, false, "i", playerid);
        }
        return 1;
    }
    for(new i = 0; i < 247; i++)
    {
        if(PlayerToPoint(1.0,playerid,2.1507,-29.0139,1003.5494))
        {
            ShowPlayerDialog(playerid, 752, DIALOG_STYLE_LIST, "Welcome to 24/7", "Portable Radio($150) \nBaseballbat($10) \nToolkit($35) \nCigarettes($7) \nLighter($5) \nScratch Card($35) \nGas Can($50) \nMask($250) \nShovel($7) \nCellphone($50) \nCards($25) \nDice($2) \nParachute($15)\nCane($5)\nCamera($45)\nBag($50)\nSeeds($100)", "Buy", "Cancel");
        }
    }
    for(new i = 0; i < 247; i++)
    {
        if(PlayerToPoint(1.0,playerid,-28.1577,-89.9538,1003.5469))
        {
            ShowPlayerDialog(playerid, 752, DIALOG_STYLE_LIST, "Welcome to 24/7", "Portable Radio($150) \nBaseballbat($10) \nToolkit($35) \nCigarettes($7) \nLighter($5) \nScratch Card($35) \nGas Can($50) \nMask($250) \nShovel($7) \nCellphone($50) \nCards($25) \nDice($2) \nParachute($15)\nCane($5)\nCamera($45)\nBag($50)\nSeeds($100)", "Buy", "Cancel");
        }
    }
    for(new i = 0; i < 247; i++)
    {
        if(PlayerToPoint(1.0,playerid,-29.0530,-185.1293,1003.5469))
        {
            ShowPlayerDialog(playerid, 752, DIALOG_STYLE_LIST, "Welcome to 24/7", "Portable Radio($150) \nBaseballbat($10) \nToolkit($35) \nCigarettes($7) \nLighter($5) \nScratch Card($35) \nGas Can($50) \nMask($250) \nShovel($7) \nCellphone($50) \nCards($25) \nDice($2) \nParachute($15)\nCane($5)\nCamera($45)\nBag($50)\nSeeds($100)", "Buy", "Cancel");
        }
    }
    for(new i = 0; i < 1; i++)
    {
        if(PlayerToPoint(1.0,playerid,373.9234,-118.8064,1001.4922))
        {
            ShowPlayerDialog(playerid, 757, DIALOG_STYLE_LIST, "Welcome to Pizza Stuck", "Pizza($10) \nFries($5) \nPizza With a Soda($15) \nSalad($15)", "Buy", "Cancel");
        }
    }
    for(new i = 0; i < 2; i++)
    {
        if(PlayerToPoint(1.0,playerid,2031.5616,-1831.1558,13.6469))
        {
            ShowPlayerDialog(playerid, 758, DIALOG_STYLE_LIST, "Welcome to Restaurang", "Hamburger($10) \nSoda($5) \nHamburger With Fries($15) \nSalad with chicken($15)", "Buy", "Cancel");
        }
    }
    for(new i = 0; i < 3; i++)
    {
        if(PlayerToPoint(1.0,playerid,753.9210,2.8432,1083.3824))
        {
            ShowPlayerDialog(playerid, 760, DIALOG_STYLE_LIST, "Welcome to LS Gym", "Boxing ($50) \nKung Fu ($65) \nKneehead ($85) \nElbow ($80) \nGrabkick ($115)", "Buy", "Cancel");
        }
    /*}
    for(new i = 0; i < 4; i++)
    {
        if(PlayerToPoint(1.0,playerid,290.2976,-109.7823,1001.5156))
        if(PlayerInfo[playerid][pWepLic] == 0) { SendClientMessage(playerid, COLOR_RED, "You need gun license."); return 1; }
        {
            ShowPlayerDialog(playerid, 759, DIALOG_STYLE_LIST, "Welcome to Ammunation", "Deagle($900) \nColt($500) \nUzi($1000) \nTec9($1000) \nAK47($5000)", "Buy", "Cancel");
            return 1;
        }*/

    }
    for(new h = 0; h < sizeof(DynamicCars); h++)
    {
            //if(DynamicCars[updatedvehicleid][CarType] == 1)
            new carid = GetPlayerVehicleID(playerid);
            if(GetPlayerVehicleID(playerid) == 67 || GetPlayerVehicleID(playerid) == 68)
            if(IsADMVCar(carid))
            {
            if(TakingDrivingTest[playerid] == 1)
            {
                if(PlayerToPoint(5.0,playerid,2068.7415,-1913.5304,13.3192) && DrivingTestStep[playerid] == 1)
                {
                    DrivingTestStep[playerid] = 2;
                    SetPlayerCheckpoint(playerid, 2068.7415,-1913.5304,13.3192, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2084.2441,-1879.5679,13.0991) && DrivingTestStep[playerid] == 2)
                {
                    DrivingTestStep[playerid] = 3;
                    SetPlayerCheckpoint(playerid, 2087.5696,-1778.1520,13.1532, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2087.5696,-1778.1520,13.1532) && DrivingTestStep[playerid] == 3)
                {
                    DrivingTestStep[playerid] = 4;
                    SetPlayerCheckpoint(playerid, 2032.9459,-1749.4602,13.1555, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2032.9459,-1749.4602,13.1555) && DrivingTestStep[playerid] == 4)
                {
                    DrivingTestStep[playerid] = 5;
                    SetPlayerCheckpoint(playerid, 1922.5228,-1749.9053,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1922.5228,-1749.9053,13.1541) && DrivingTestStep[playerid] == 5)
                {
                    DrivingTestStep[playerid] = 6;
                    SetPlayerCheckpoint(playerid, 1824.5392,-1727.6184,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1824.5392,-1727.6184,13.1554) && DrivingTestStep[playerid] == 6)
                {
                    DrivingTestStep[playerid] = 7;
                    SetPlayerCheckpoint(playerid, 1784.2493,-1606.8083,13.1385, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1784.2493,-1606.8083,13.1385) && DrivingTestStep[playerid] == 7)
                {
                    DrivingTestStep[playerid] = 8;
                    SetPlayerCheckpoint(playerid, 1684.3798,-1590.0769,13.1560, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1684.3798,-1590.0769,13.1560) && DrivingTestStep[playerid] == 8)
                {
                    DrivingTestStep[playerid] = 9;
                    SetPlayerCheckpoint(playerid, 1570.4451,-1589.5077,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1570.4451,-1589.5077,13.1541) && DrivingTestStep[playerid] == 9)
                {
                    DrivingTestStep[playerid] = 10;
                    SetPlayerCheckpoint(playerid, 1527.8423,-1619.7291,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1527.8423,-1619.7291,13.1554) && DrivingTestStep[playerid] == 10)
                {
                    DrivingTestStep[playerid] = 11;
                    SetPlayerCheckpoint(playerid, 1527.2231,-1705.9948,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1527.2231,-1705.9948,13.1554) && DrivingTestStep[playerid] == 11)
                {
                    DrivingTestStep[playerid] = 12;
                    SetPlayerCheckpoint(playerid, 1494.3622,-1729.9639,13.1554, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1494.3622,-1729.9639,13.1554) && DrivingTestStep[playerid] == 12)
                {
                    DrivingTestStep[playerid] = 13;
                    SetPlayerCheckpoint(playerid, 1417.2826,-1729.6477,13.1633, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1417.2826,-1729.6477,13.1633) && DrivingTestStep[playerid] == 13)
                {
                    DrivingTestStep[playerid] = 14;
                    SetPlayerCheckpoint(playerid, 1386.8727,-1840.9457,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1386.8727,-1840.9457,13.1541) && DrivingTestStep[playerid] == 14)
                {
                    DrivingTestStep[playerid] = 15;
                    SetPlayerCheckpoint(playerid, 1463.2797,-1875.0575,13.1547, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1463.2797,-1875.0575,13.1547) && DrivingTestStep[playerid] == 15)
                {
                    DrivingTestStep[playerid] = 16;
                    SetPlayerCheckpoint(playerid, 1637.7559,-1875.4866,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1637.7559,-1875.4866,13.1541) && DrivingTestStep[playerid] == 16)
                {
                    DrivingTestStep[playerid] = 17;
                    SetPlayerCheckpoint(playerid, 1692.3719,-1838.1967,13.1555, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1692.3719,-1838.1967,13.1555) && DrivingTestStep[playerid] == 17)
                {
                    DrivingTestStep[playerid] = 18;
                    SetPlayerCheckpoint(playerid, 1731.2744,-1818.6259,13.1376, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1731.2744,-1818.6259,13.1376) && DrivingTestStep[playerid] == 18)
                {
                    DrivingTestStep[playerid] = 19;
                    SetPlayerCheckpoint(playerid, 1798.4176,-1834.8743,13.1604, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1798.4176,-1834.8743,13.1604) && DrivingTestStep[playerid] == 19)
                {
                    DrivingTestStep[playerid] = 20;
                    SetPlayerCheckpoint(playerid, 1819.6390,-1872.5280,13.1837, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1819.6390,-1872.5280,13.1837) && DrivingTestStep[playerid] == 20)
                {
                    DrivingTestStep[playerid] = 21;
                    SetPlayerCheckpoint(playerid, 1936.6617,-1934.8263,13.1541, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,1936.6617,-1934.8263,13.1541) && DrivingTestStep[playerid] == 21)
                {
                    DrivingTestStep[playerid] = 22;
                    SetPlayerCheckpoint(playerid, 2056.2322,-1912.3051,13.3194, 5.0);
                }
                else if(PlayerToPoint(5.0,playerid,2056.2322,-1912.3051,13.3194) && DrivingTestStep[playerid] == 22)
                {
                    new Float:health;
                    veh = GetPlayerVehicleID(playerid);
                    GetVehicleHealth(veh, health);

                    if(health >= 950.0)
                    {
                        new Float:x, Float:y, Float:z,Float:distance = 3.0;
                        GetPlayerPos(playerid,x,y,z);
                        if(IsPlayerInRangeOfPoint(playerid,3.0,x,y,z))
                        PlayAudioStreamForPlayer(playerid,"http://www.fileden.com/files/2012/4/18/3293679/Gta%20San%20Andreas%20Mission%20Complete%20Sound%20HQ.mp3",x,y,z,distance,0);
                        GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                        if(engine == VEHICLE_PARAMS_ON) { SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); }
                        SendClientMessage(playerid, COLOR_GREEN, "Congratulations! You have passed the drivers license test!");
                        //GameTextForPlayer(playerid, "~g~Passed", 3000, 1);
                        GameDrawForPlayer(playerid,"~g~Passed", 2000);
                        PlayerInfo[playerid][pCarLic] = 1;
                        EngineStatus[veh] = 0;
                        SetVehicleToRespawn(veh);
                        EngineStatus[veh] = 0;
                        TakingDrivingTest[playerid] = 0;
                        DisablePlayerCheckpoint(playerid);
                        ActiveCP[playerid] = 0;
                        GivePlayerCash(playerid,-Businesses[12][EntranceCost]);
                        Businesses[12][Till] += Businesses[12][EntranceCost];
                    }
                    else
                    {
                        GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                        if(engine == VEHICLE_PARAMS_ON) { SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); }
                        SendClientMessage(playerid, COLOR_LIGHTRED, "Bad Luck! You have failed the drivers license test, please try again.");
                        SendClientMessage(playerid, COLOR_LIGHTRED, "You have been charged $50 for the attempting and failing your test.");
                        //GameTextForPlayer(playerid, "~r~Failed", 3000, 1);
                        GameDrawForPlayer(playerid,"~r~Failed", 2000);
                        EngineStatus[veh] = 0;
                        SetVehicleToRespawn(veh);
                        EngineStatus[veh] = 0;
                        TakingDrivingTest[playerid] = 0;
                        DisablePlayerCheckpoint(playerid);
                        ActiveCP[playerid] = 0;
                        GivePlayerCash(playerid,-50);
                        Businesses[12][Till] += 50;
                    }
                    DrivingTestStep[playerid] = 0;
                    ActiveCP[playerid] = 0;
                }
                return 1;
            }
        }
    }
    return 1;
}
Reply
#10

Check the topic above your.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)