Checkpoint problem, need help.
#1

hi there the problem is when I take the work of the bus driver, choose the route and after a drive through all the checkpoints and at the last, nothing happens, he just burn and all.
Please help solve the problem, the code is posted below.
sorry if my english is bad, im russian...

pawn Код:
new Float:Route1[16][3] = {//Los Santos
{1140.4226,-1715.1140,13.8583},
{1545.5533,-1595.5841,13.5158},
{1816.3058,-1673.4960,13.5945},
{1816.4094,-1902.9757,13.6415},
{1956.9583,-2136.6414,13.5948},
{2244.6982,-2215.9529,13.4329},
{2429.8440,-1254.6299,23.9636},
{1673.4246,-1158.2622,23.7896},
{1666.9512,-1163.4913,23.8068},
{2399.8291,-1259.7415,23.9649},
{2236.7375,-2199.7715,13.4591},
{1965.6260,-2148.2788,13.5927},
{1823.9556,-1895.7554,13.4872},
{1822.3669,-1667.7328,13.5161},
{1526.7728,-1653.6466,13.5161},
{1235.4631,-1830.3445,13.5351}
};
//////////////////////////////// WHEN CHOISE ROUTE //////////////////////////////////////////
if(listitem == 0)
{
SetPVarInt(playerid, "bus_way1", 1);
SetPlayerCheckpoint(playerid, Route1[0][0], Route1[0][1], Route1[0][2], 3.0);
}
//////////////////////////////// WHEN CHOISE ROUTE //////////////////////////////////////////

public OnPlayerEnterCheckpoint(playerid)
{
    if(GetPVarInt(playerid, "bus_way1"))
    {
        if(!GetPVarInt(playerid, "bus_way1")) return;
        new check = GetPVarInt(playerid, "bus_way1");
        check++;
        if(check >= sizeof Route1)
        {
            if(!GetPVarInt(playerid, "bus_way1"))
            {
                DeletePVar(playerid, "bus_way1");
                SendClientMessage(playerid, 0x00FF00FF, "Job is done!");
                DisablePlayerCheckpoint(playerid);
            }
        }
        else
        {
            TogglePlayerControllable(playerid, 0);
            SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
            ProxDetector(50.0, playerid, "Bus will go in 10 seconds!",0x00FF00FF,0x00FF00FF,0x00FF00FF,0x00FF00FF,0x00FF00FF);
            GivePlayerMoney(playerid,25);
            SetPlayerCheckpoint(playerid, Route1[check][0], Route1[check][1], Route1[check][2], 3.0);
            SetPVarInt(playerid, "bus_way1", check);
        }
    }
}

forward busroutestoptimer(playerid);
public busroutestoptimer(playerid)
{
    TogglePlayerControllable(playerid, 1);
}
Reply


Messages In This Thread
Checkpoint problem, need help. - by volune - 13.10.2011, 13:52
Re: Checkpoint problem, need help. - by =WoR=G4M3Ov3r - 13.10.2011, 14:03
Re: Checkpoint problem, need help. - by whitedragon - 13.10.2011, 14:09
Re: Checkpoint problem, need help. - by volune - 13.10.2011, 14:10
Re: Checkpoint problem, need help. - by whitedragon - 13.10.2011, 14:12
Re: Checkpoint problem, need help. - by volune - 13.10.2011, 14:28
Re: Checkpoint problem, need help. - by volune - 13.10.2011, 15:15
Re: Checkpoint problem, need help. - by volune - 13.10.2011, 17:41
Re: Checkpoint problem, need help. - by volune - 14.10.2011, 10:57
Re: Checkpoint problem, need help. - by Vince - 14.10.2011, 11:06

Forum Jump:


Users browsing this thread: 1 Guest(s)