PLEASE, I am SO close now! [JOB SCRIPT]
#1

So, now I got all the checkpoints set up, but the thing is that, everytime I go to the checkpoint it doesnt automaticly start the other checkpoint.. help plz?


pawn Код:
#define FILTERSCRIPT
#include <a_samp>





//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
public OnGameModeInit()
{

    CreateVehicle(574, -2273.1279,2306.4246,4.5453,87.7054, 1, 1, 10);
    CreateVehicle(574, -2272.5564,2309.2610,4.5453,91.0751, 1, 1, 10);
    CreateVehicle(574, -2272.8257,2312.2505,4.5454,89.3365, 1, 1, 10);
    CreateVehicle(574, -2273.1941,2315.2334,4.5453,90.2443, 1, 1, 10);

    return 1;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
public OnPlayerEnterCheckpoint(playerid)
{
    if  (IsPlayerInRangeOfPoint(playerid, 2, -2272.1460,2354.0540,4.5454))
    {
   
        SetPlayerCheckpoint(playerid, -2334.6729,2385.2109,5.5064, 3.0);
    }
    else if (IsPlayerInRangeOfPoint(playerid, 2, -2334.6729,2385.2109,5.5064))
    {
   
        SetPlayerCheckpoint(playerid, -2454.7063,2334.3398,4.5608, 3.0);
    }
    if (IsPlayerInRangeOfPoint(playerid, 2, -2454.7063,2334.3398,4.5608))
    {
       
        SetPlayerCheckpoint(playerid, -2468.2590,2322.1565,4.5611, 3.0);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2468.2590,2322.1565,4.5611))
    {
       
        SetPlayerCheckpoint(playerid, -2475.2698,2264.7302,4.5627, 3.0);
    }
    if (IsPlayerInRangeOfPoint(playerid, 2, -2475.2698,2264.7302,4.5627))
    {

        SetPlayerCheckpoint(playerid, -2571.5884,2333.4280,4.5634, 3.0);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2571.5884,2333.4280,4.5634))
    {
       
        SetPlayerCheckpoint(playerid, -2612.8010,2340.5071,7.9364, 3.0);
    }
    if (IsPlayerInRangeOfPoint(playerid, 2, -2612.8010,2340.5071,7.9364))
    {
       
        SetPlayerCheckpoint(playerid, -2536.2373,2400.0557,14.5013, 3.0);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2536.2373,2400.0557,14.5013))
    {
       
        SetPlayerCheckpoint(playerid, -2416.5896,2430.4604,12.1526, 3.0);
    }
    if (IsPlayerInRangeOfPoint(playerid, 2, -2416.5896,2430.4604,12.1526))
    {
     
        SetPlayerCheckpoint(playerid, -2273.8125,2348.2114,4.5434, 3.0);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 2, -2273.8125,2348.2114,4.5434))
    {
       
        SendClientMessage(playerid, 0xAA3333AA, "You have finished your job! Here is 1000 dollars for your effort!");
        GivePlayerMoney(playerid, 1000);
    }
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    if (IsPlayerInRangeOfPoint(playerid, 2, -2273.8125,2348.2114,4.5434))
    {
    IsPlayerInCheckpoint(playerid);
    DisablePlayerCheckpoint(playerid);
    }

    return 1;
}






public OnPlayerCommandText(playerid, cmdtext[])
{

    if(strcmp("/startsweep", cmdtext, true, 6) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            new vehid = GetPlayerVehicleID(playerid);
            if(GetVehicleModel(vehid) == 574)
            {
               
            SetPlayerCheckpoint(playerid, -2272.1460,2354.0540,4.5454, 3.0);
            SendClientMessage(playerid, 0xFFFFFFAA, "Remember to do /startsweep every time your at a checkpoint!");

            }
            else SendClientMessage(playerid, 0xFFFFFFAA, "You need to be in a sweeper, to use this command!");
        }
        else SendClientMessage(playerid, 0xFFFFFFAA, "You need to be in a vehicle, to use this command!");
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)