Checkpoint Issue
#1

Basically I am making a job to where if you drive into checkpoints another checkpoint shows. I appear to be having some difficulty with this IG, not in PAWN. I have the following script:

pawn Код:
command(delivery, playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    new PlayerVehicle = GetVehicleFileID(GetPlayerVehicleID(playerid));
    if(IsPlayerInAnyVehicle(playerid))
    {
        if(Vehicles[vehicleid][CarJob] == 1)
        {
            if(Player[playerid][Job] == 1)
            {
                SendClientMessage(playerid, GREEN, "Continue through the {FF0000}CHECKPOINTS{DD00FF} to continue.");
                SetPlayerCheckpoint(playerid, -2067.9963, -2453.5767, 30.7492, 4);
                Player[playerid][Checkpoint] = 101;
            }
            else
            {
                SendClientMessage(playerid, ERROR, "ERROR: You must be a delivery driver!");
            }
        }
    }
    return 1;
}
pawn Код:
if(Player[playerid][Checkpoint] == 101)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -2057.6838,-2484.4604,30.5933, 4);
                Player[playerid][Checkpoint] = 102;
            }
           
            if(Player[playerid][Checkpoint] == 102)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1928.8069,-2608.4351,43.4179, 4);
                Player[playerid][Checkpoint] = 103;
            }

            if(Player[playerid][Checkpoint] == 103)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1830.1281,-2683.0120,54.1285, 4);
                Player[playerid][Checkpoint] = 104;
            }

            if(Player[playerid][Checkpoint] == 104)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1551.7871,-2823.9370,47.0465, 4);
                Player[playerid][Checkpoint] = 105;
            }

            if(Player[playerid][Checkpoint] == 105)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 46.4641,-2832.6216,40.0244, 4);
                Player[playerid][Checkpoint] = 106;
            }

            if(Player[playerid][Checkpoint] == 106)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -28.1374,-1407.8735,11.6105, 4);
                Player[playerid][Checkpoint] = 107;
            }

            if(Player[playerid][Checkpoint] == 107)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -88.9635,-1113.7070,1.5405, 4);
                Player[playerid][Checkpoint] = 108;
            }

            if(Player[playerid][Checkpoint] == 108)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -65.2835,-880.9789,15.1692, 4);
                Player[playerid][Checkpoint] = 109;
            }
            if(Player[playerid][Checkpoint] == 109)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 149.8353,-685.2173,7.5645, 4);
                Player[playerid][Checkpoint] = 110;
            }

            if(Player[playerid][Checkpoint] == 110)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 576.5665,-641.7648,24.2521, 4);
                Player[playerid][Checkpoint] = 111;
            }

            if(Player[playerid][Checkpoint] == 111)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 694.2997,-473.2720,16.4598, 4);
                Player[playerid][Checkpoint] = 112;
            }

            if(Player[playerid][Checkpoint] == 112)
            {
                DisablePlayerCheckpoint(playerid);
                SendClientMessage(playerid, GREEN, "Now reverse your car into the marker.");
                SetPlayerCheckpoint(playerid, 694.8127,-496.9011,16.4329, 4);
                Player[playerid][Checkpoint] = 113;
            }

            if(Player[playerid][Checkpoint] == 113)
            {
                DisablePlayerCheckpoint(playerid);
                TogglePlayerControllable(playerid, false);
                SetTimerEx("DeliveryT", 5000, false, "i", playerid);
                SetPlayerCheckpoint(playerid, 661.6900,-482.6286,16.3120, 4);
                Player[playerid][Checkpoint] = 114;
            }

            if(Player[playerid][Checkpoint] == 114)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 598.8420,-506.4989,16.3134, 4);
                Player[playerid][Checkpoint] = 115;
            }

            if(Player[playerid][Checkpoint] == 115)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 687.1302,-532.8395,16.3061, 4);
                Player[playerid][Checkpoint] = 116;
            }

            if(Player[playerid][Checkpoint] == 116)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 911.7476,-545.3719,27.5930, 4);
                Player[playerid][Checkpoint] = 117;
            }
            if(Player[playerid][Checkpoint] == 117)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 1263.6428,-394.7767,2.7026, 4);
                Player[playerid][Checkpoint] = 118;
            }

            if(Player[playerid][Checkpoint] == 118)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 1968.3303,37.3960,32.6155, 4);
                Player[playerid][Checkpoint] = 119;
            }
           
            if(Player[playerid][Checkpoint] == 119)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 2291.5061,-13.6919,26.4591, 4);
                Player[playerid][Checkpoint] = 120;
            }

            if(Player[playerid][Checkpoint] == 120)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 2287.8181,6.3457,26.5293, 4);
                Player[playerid][Checkpoint] = 103;
            }

            if(Player[playerid][Checkpoint] == 121)
            {
                DisablePlayerCheckpoint(playerid);
                SendClientMessage(playerid, GREEN, "Reverse the transport truck into the marker.");
                SetPlayerCheckpoint(playerid, 2316.1416,6.4153,26.6064, 4);
                Player[playerid][Checkpoint] = 122;
            }

            if(Player[playerid][Checkpoint] == 122)
            {
                DisablePlayerCheckpoint(playerid);
                SetTimerEx("DeliveryT", 5000, false, "i", playerid);
                SetPlayerCheckpoint(playerid, 2291.5061,-13.6919,26.4591, 4);
                Player[playerid][Checkpoint] = 123;
            }

            if(Player[playerid][Checkpoint] == 123)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 2346.6953,57.7859,26.4605, 4);
                Player[playerid][Checkpoint] = 124;
            }

            if(Player[playerid][Checkpoint] == 124)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 2346.9614,161.2969,26.4605, 4);
                Player[playerid][Checkpoint] = 125;
            }

            if(Player[playerid][Checkpoint] == 125)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 2175.7849,236.4709,14.6917, 4);
                Player[playerid][Checkpoint] = 126;
            }

            if(Player[playerid][Checkpoint] == 126)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 2018.8685,327.7358,27.9994, 4);
                Player[playerid][Checkpoint] = 127;
            }

            if(Player[playerid][Checkpoint] == 127)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 1658.4858,386.0140,19.9137, 4);
                Player[playerid][Checkpoint] = 128;
            }

            if(Player[playerid][Checkpoint] == 128)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 1326.8007,473.0091,20.0074, 4);
                Player[playerid][Checkpoint] = 129;
            }

            if(Player[playerid][Checkpoint] == 129)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 993.4920,431.2086,20.0116, 4);
                Player[playerid][Checkpoint] = 130;
            }

            if(Player[playerid][Checkpoint] == 130)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 519.0321,244.0291,14.5120, 4);
                Player[playerid][Checkpoint] = 131;
            }

            if(Player[playerid][Checkpoint] == 131)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 229.9446,9.0904,2.5541, 4);
                Player[playerid][Checkpoint] = 112;
            }

            if(Player[playerid][Checkpoint] == 132)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 255.2044,-66.8613,1.6253, 4);
                Player[playerid][Checkpoint] = 133;
            }
           
            if(Player[playerid][Checkpoint] == 133)
            {
                DisablePlayerCheckpoint(playerid);
                SetTimerEx("DeliveryT", 5000, false, "i", playerid);
                SetPlayerCheckpoint(playerid, 330.3112,-191.2449,1.2103, 4);
                Player[playerid][Checkpoint] = 134;
            }

            if(Player[playerid][Checkpoint] == 134)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, 124.3150,-209.5220,1.5559, 4);
                Player[playerid][Checkpoint] = 135;
            }
            if(Player[playerid][Checkpoint] == 135)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -253.9584,-158.9943,2.4629, 4);
                Player[playerid][Checkpoint] = 136;
            }

            if(Player[playerid][Checkpoint] == 136)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -266.9487,-247.0885,1.4704, 4);
                Player[playerid][Checkpoint] = 137;
            }

            if(Player[playerid][Checkpoint] == 137)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -547.2937,-255.4177,59.6828, 4);
                Player[playerid][Checkpoint] = 138;
            }

            if(Player[playerid][Checkpoint] == 138)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -961.4121,-295.0769,36.5577, 4);
                Player[playerid][Checkpoint] = 139;
            }

            if(Player[playerid][Checkpoint] == 139)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1175.8590,-655.8282,44.9368, 4);
                Player[playerid][Checkpoint] = 140;
            }
            if(Player[playerid][Checkpoint] == 140)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1191.9930,-812.4327,65.3338, 4);
                Player[playerid][Checkpoint] = 141;
            }

            if(Player[playerid][Checkpoint] == 141)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -895.5794,-1212.3518,108.5544, 4);
                Player[playerid][Checkpoint] = 142;
            }

            if(Player[playerid][Checkpoint] == 142)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1013.7765,-1373.6161,130.4946, 4);
                Player[playerid][Checkpoint] = 143;
            }

            if(Player[playerid][Checkpoint] == 143)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1515.8173,-1226.5955,101.7021, 4);
                Player[playerid][Checkpoint] = 144;
            }
            if(Player[playerid][Checkpoint] == 144)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1624.1315,-869.2822,97.1893, 4);
                Player[playerid][Checkpoint] = 145;
            }
            if(Player[playerid][Checkpoint] == 145)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1531.2467,-1418.4752,41.6932, 4);
                Player[playerid][Checkpoint] = 146;
            }

            if(Player[playerid][Checkpoint] == 146)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1624.1338,-1367.0698,46.0742, 4);
                Player[playerid][Checkpoint] = 149;
            }

            if(Player[playerid][Checkpoint] == 147)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1671.6061,-1294.8550,50.0848, 4);
                Player[playerid][Checkpoint] = 148;
            }

            if(Player[playerid][Checkpoint] == 148)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1816.1056,-595.4425,16.4448, 4);
                Player[playerid][Checkpoint] = 149;
            }

            if(Player[playerid][Checkpoint] == 149)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1896.4366,-575.9604,24.5695, 4);
                Player[playerid][Checkpoint] = 150;
            }

            if(Player[playerid][Checkpoint] == 150)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1922.4281,-672.9922,41.1289, 4);
                Player[playerid][Checkpoint] = 151;
            }

            if(Player[playerid][Checkpoint] == 151)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1913.1302,-876.3266,45.0777, 4);
                Player[playerid][Checkpoint] = 152;
            }
            if(Player[playerid][Checkpoint] == 152)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1906.6438,-1244.7004,39.6089, 4);
                Player[playerid][Checkpoint] = 153;
            }

            if(Player[playerid][Checkpoint] == 153)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1873.5758,-1397.2339,39.0939, 4);
                Player[playerid][Checkpoint] = 154;
            }
            if(Player[playerid][Checkpoint] == 154)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1604.0995,-1514.1384,37.8593, 4);
                Player[playerid][Checkpoint] = 155;
            }
            if(Player[playerid][Checkpoint] == 155)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -1669.3718,-1635.2711,36.3824, 4);
                Player[playerid][Checkpoint] = 156;
            }

            if(Player[playerid][Checkpoint] == 156)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -2050.9866,-1941.4701,53.6373, 4);
                Player[playerid][Checkpoint] = 157;
            }

            if(Player[playerid][Checkpoint] == 157)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -2218.0596,-2268.0295,30.5791, 4);
                Player[playerid][Checkpoint] = 158;
            }

            if(Player[playerid][Checkpoint] == 158)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -2118.5125,-2346.3516,30.5933, 4);
                Player[playerid][Checkpoint] = 159;
            }

            if(Player[playerid][Checkpoint] == 159)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -2134.3350,-2392.6323,30.5933, 4);
                Player[playerid][Checkpoint] = 160;
            }

            if(Player[playerid][Checkpoint] == 160)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -2129.4365,-2427.0415,30.5884, 4);
                Player[playerid][Checkpoint] = 161;
            }

            if(Player[playerid][Checkpoint] == 161)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -2107.9355,-2419.0825,30.7495, 4);
                Player[playerid][Checkpoint] = 162;
            }

            if(Player[playerid][Checkpoint] == 162)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -2084.5842,-2417.7092,30.7496, 4);
                Player[playerid][Checkpoint] = 163;
            }

            if(Player[playerid][Checkpoint] == 163)
            {
                DisablePlayerCheckpoint(playerid);
                SetPlayerCheckpoint(playerid, -2066.5623,-2433.1895,30.7493, 4);
                Player[playerid][Checkpoint] = 164;
            }

            if(Player[playerid][Checkpoint] == 164)
            {
                DisablePlayerCheckpoint(playerid);
                SendClientMessage(playerid, GREEN, "You should receive a check shortly from the Bank of San Andreas for your services... (3 minutes)");
                SetTimerEx("CheckTime", 1800000, false, "i", playerid);
                SetVehicleToRespawn(GetPlayerVehicleID(playerid));
                Player[playerid][Checkpoint] = 0;
            }
Basically it is immediately jumping to checkpoint number 112 randomly, I am completely confused on what the issue is...
Reply


Messages In This Thread
Checkpoint Issue - by nmader - 18.09.2012, 19:42
Re: Checkpoint Issue - by [HiC]TheKiller - 18.09.2012, 21:41
Re: Checkpoint Issue - by Vince - 18.09.2012, 23:21

Forum Jump:


Users browsing this thread: 1 Guest(s)