Checkpoint wont show up.
#1

Hello!
This is my code:
pawn Код:
else if (BusrouteLV[playerid][0] != 0)
    {
        if (IsPlayerInAnyVehicle(playerid))
        {
            new nextstop[64];
            BusrouteLV[playerid][0] = 0;
          switch(BusrouteLV[playerid][0])
          {
            case 1:
            {
                    nextstop = "Stop #1";
              SetPlayerCheckpoint(playerid, 2559.4351,1318.5856,10.8775, 5.0);
                    AdvertiseToPlayersAtBusStop(2559.4351,1318.5856,10.8775, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
                }
                case 2:
                {
                    nextstop = "Stop #2";
                  SetPlayerCheckpoint(playerid, 2304.1731,978.3480,10.8678, 5.0);
                    AdvertiseToPlayersAtBusStop(2304.1731,978.3480,10.8678, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
                }
                case 3:
                {
                    nextstop = "Stop #3";
                    PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
                  SetPlayerCheckpoint(playerid, 2118.8350,978.4446,10.8797, 5.0);
                    AdvertiseToPlayersAtBusStop(2118.8350,978.4446,10.8797, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
                }
                case 4:
                {
                    nextstop = "Stop #4";
                  SetPlayerCheckpoint(playerid, 2077.0449,1456.2797,10.8774, 5.0);
                    AdvertiseToPlayersAtBusStop(2077.0449,1456.2797,10.8774, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
                }
                case 5:
                {
                    nextstop = "Stop #5";
                    SetPlayerCheckpoint(playerid, 2160.7966,1675.5681,10.8953, 5.0);
                    AdvertiseToPlayersAtBusStop(2160.7966,1675.5681,10.8953, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
                }
                case 6:
                {
                    nextstop = "Stop #6";
                  SetPlayerCheckpoint(playerid, 526.6218,-1480.9631,14.5567, 5.0);
                    AdvertiseToPlayersAtBusStop(526.6218,-1480.9631,14.5567, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
                }
                case 7:
                {
                    nextstop = "Stop #7";
                  SetPlayerCheckpoint(playerid, 2156.3657,1859.7087,10.8961, 5.0);
                    AdvertiseToPlayersAtBusStop(2156.3657,1859.7087,10.8961, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
                }
                case 8:
                {
                    nextstop = "Stop #8";
                  SetPlayerCheckpoint(playerid, 2232.7742,2433.6904,10.8788, 5.0);
                    AdvertiseToPlayersAtBusStop(2232.7742,2433.6904,10.8788, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
                }
                case 9:
                {
                    nextstop = "Stop #9";
                  SetPlayerCheckpoint(playerid, 1922.1530,2317.8958,10.8772, 5.0);
                    AdvertiseToPlayersAtBusStop(1922.1530,2317.8958,10.8772, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
                }
                case 10:
                {
                    nextstop = "Stop #10";
                  SetPlayerCheckpoint(playerid, 1724.0765,2252.5994,10.8047, 5.0);
                    AdvertiseToPlayersAtBusStop(1724.0765,2252.5994,10.8047, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
                }
                case 11:
                {
                    nextstop = "Stop #11";
                  SetPlayerCheckpoint(playerid, 1637.8541,2178.1597,10.8736, 5.0);
                    AdvertiseToPlayersAtBusStop(1637.8541,2178.1597,10.8736, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
            }
                case 12:
                {
                    nextstop = "Stop #12";
                  SetPlayerCheckpoint(playerid, 1561.6991,1826.8036,10.8758, 5.0);
                    AdvertiseToPlayersAtBusStop(1561.6991,1826.8036,10.8758, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
            }
            case 13:
                {
                    nextstop = "Stop #13";
                  SetPlayerCheckpoint(playerid, 1726.9951,1530.4622,10.8906, 5.0);
                    AdvertiseToPlayersAtBusStop(1726.9951,1530.4622,10.8906, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
            }
            case 14:
                {
                  SetPlayerCheckpoint(playerid, 2121.3030,1368.3478,10.8790, 5.0);
                    AdvertiseToPlayersAtBusStop(2121.3030,1368.3478,10.8790, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
            }
            case 15:
                {
                    SetPlayerCheckpoint(playerid, 2788.1233,1283.3539,10.8834, 5.0);
                    nextstop = "End";
                    TogglePlayerControllable(playerid, 0);
            SendClientMessage(playerid, COLOR_YELLOW, "Bus route completed, use /startlv to do a new round.");
                    SendClientMessage(playerid, COLOR_YELLOW, "Use /exit to leave the bus.");
                  DisablePlayerCheckpoint(playerid);
            }
            }
            BusrouteLV[playerid][0]++;
            if (strcmp(nextstop, "end", true) != 0)
            {
                format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~r~$3 Bonus~n~~n~~g~Next Stop: %s", nextstop);
                format(string2, sizeof(string2), "~n~~n~~n~~n~~n~~n~~n~~g~Next Stop: %s", nextstop);
            }
            else
            {
                string = "~g~End of Route~n~~n~~r~$50 completion bonus~n~~n~~w~/startwest to continue the route";
                string2 = "~n~~g~End of Route~n~~n~~w~Please leave the bus or wait for the next route";
                //BusrouteWest[playerid][0] = 0;
                SafeGivePlayerMoney(playerid, 47);
            }
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
            for (new i=0; i<=MAX_PLAYERS; i++)
            {
                if (IsPlayerConnected(i) && GetPlayerVehicleID(i) == BusrouteWest[playerid][1])
                {
                    if (BusrouteLV[i][0] != 0) GameTextForPlayer(i, string, 10000, 3);
                    else GameTextForPlayer(i, string2, 10000, 3);
                }
            }
            SafeGivePlayerMoney(playerid, 3);
            return 1;
        }
    }
the checkpoints doesn't show up. what is wrong?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)