[Help] Issue with Checkpoints
#1

Hey guys,

I have an issue with my checkpoints, checkpoints doesn't appear at all on the server.
Cant find the issue but I know it's in this code some where.

pawn Код:
if(Busline3[playerid][0] != 0)
    {
        if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2)
        {
            new nextstop[64];
            //BusrouteWest[playerid][0] = 0;
            switch(Busline3[playerid][0])
            {
                case 1:
                {
                    nextstop = "S. Doherty";
                    SetPlayerCheckpoint(playerid, -1903.6856689453, -240.85559082031, 25.271671295166, 5.0);
                    AdvertiseToPlayersAtBusStop(-1903.6856689453, -240.85559082031, 25.271671295166, 0);
                }
                case 2:
                {
                    nextstop = "Beacon Camping";
                    SetPlayerCheckpoint(playerid, -559.31512451172, -1051.3819580078, 23.935581207275, 5.0);
                    AdvertiseToPlayersAtBusStop(-559.31512451172, -1051.3819580078, 23.935581207275, 0);
                }
                case 3:
                {
                    nextstop = "Flint Gas Station";
                    SetPlayerCheckpoint(playerid, -116.89356231689, -1164.4943847656, 2.5630531311035, 5.0);
                    AdvertiseToPlayersAtBusStop(-116.89356231689, -1164.4943847656, 2.5630531311035, 0);
                }
                case 4:
                {
                    nextstop = "Redeo Street";
                    SetPlayerCheckpoint(playerid, 200.98184204102, -1496.5378417969, 12.737367630005, 5.0);
                    AdvertiseToPlayersAtBusStop(200.98184204102, -1496.5378417969, 12.737367630005, 0);
                }
                case 5:
                {
                    nextstop = "Grotti Dealership";
                    SetPlayerCheckpoint(playerid, 574.88061523438, -1238.8054199219, 17.43337059021, 5.0);
                    AdvertiseToPlayersAtBusStop(574.88061523438, -1238.8054199219, 17.43337059021, 0);
                }
                case 6:
                {
                    nextstop = "Market Street";
                    SetPlayerCheckpoint(playerid, 624.81854248047, -1348.6345214844, 13.390312194824, 5.0);
                    AdvertiseToPlayersAtBusStop(624.81854248047, -1348.6345214844, 13.390312194824, 0);
                }
                case 7:
                {
                    nextstop = "W. Market";
                    SetPlayerCheckpoint(playerid, 999.94342041016, -1408.5421142578, 13.029285430908, 5.0);
                    AdvertiseToPlayersAtBusStop(999.94342041016, -1408.5421142578, 13.029285430908, 0);
                }
                case 8:
                {
                    nextstop = "E. Market";
                    SetPlayerCheckpoint(playerid, 1233.3177490234, -1408.3221435547, 13.052928924561, 5.0);
                    AdvertiseToPlayersAtBusStop(1233.3177490234, -1408.3221435547, 13.052928924561, 0);
                }
                case 9:
                {
                    nextstop = "S. Main Street";
                    SetPlayerCheckpoint(playerid, 1294.9660644531, -1625.1484375, 13.3828125, 5.0);
                    AdvertiseToPlayersAtBusStop(1294.9660644531, -1625.1484375, 13.3828125, 0);
                }
                case 10:
                {
                    nextstop = "Ruse Street";
                    SetPlayerCheckpoint(playerid, 1208.7830810547, -1709.8021240234, 13.3828125, 5.0);
                    AdvertiseToPlayersAtBusStop(1208.7830810547, -1709.8021240234, 13.3828125, 0);
                }
                case 11:
                {
                    nextstop = "Buss Station";
                    SetPlayerCheckpoint(playerid, 1223.5721435547, -1834.0794677734, 13.390892028809, 5.0);
                    AdvertiseToPlayersAtBusStop(1223.5721435547, -1834.0794677734, 13.390892028809, 0);
                }
                case 13:
                {
                    nextstop = "end";
                    SendClientMessage(playerid, COLOR_YELLOW, "Bus route completed.");
                    DisablePlayerCheckpoint(playerid);
                    ConsumingMoney[playerid] = 1;
                    GivePlayerMoney(playerid, 250);
                }
            }
            Busline3[playerid][0]++;
            if (strcmp(nextstop, "end", true) != 0)
            {
                format(string, sizeof(string), "          ~g~Bus Line 1~n~~n~~w~Next Stop: %s", nextstop);
                format(string2, sizeof(string2), "          ~g~Bus Line 1~n~~n~~w~Next Stop: %s", nextstop);
            }
            else
            {
                string = "~n~~g~End of Route";
                string2 = "~n~~g~End of Route~n~~n~~w~Please leave the bus or wait for the next route";
                Busline3[playerid][0] = 0;
            }
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
            for (new i=0; i<=MAX_PLAYERS; i++)
            {
                if (IsPlayerConnected(i) &&  GetPlayerVehicleID(i) == Busline3[playerid][1])
                {
                    if (Busline3[i][0] != 0) InfoBoxForPlayerStart(i, string);
                    else InfoBoxForPlayerStart(i, string2);
                }
            }
        }
        return 1;
    }
Thanks for all help!
Reply
#2

Use a streamer for the checkpoints.
Reply
#3

Quote:
Originally Posted by suhrab_mujeeb
Посмотреть сообщение
Use a streamer for the checkpoints.
Okey, will that help or isn't it anything wrong with my code?
Cause really it worked perfect on 0.3c but now in 0.3d most commands are bugged as well this code.

I have got most things to run perfect but not this one atm.
Reply
#4

Quote:
Originally Posted by tony_fitto
Посмотреть сообщение
Okey, will that help or isn't it anything wrong with my code?
Cause really it worked perfect on 0.3c but now in 0.3d most commands are bugged as well this code.

I have got most things to run perfect but not this one atm.
Well if it used to work then that's something u are missing. You might look at this topic:
https://sampforum.blast.hk/showthread.php?tid=102865
Reply
#5

Quote:
Originally Posted by suhrab_mujeeb
Посмотреть сообщение
Well if it used to work then that's something u are missing. You might look at this topic:
https://sampforum.blast.hk/showthread.php?tid=102865
The funny part is that it doesnt work on 0.3d and I havent change it since it was created.
As well it works with the driving test but I use PlayerToPoint insted of "case" there...

Going to test now with PlayerToPoint and see if it works :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)