SA-MP Forums Archive
Checkpoint wont show up! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Checkpoint wont show up! (/showthread.php?tid=249538)



Checkpoint wont show up! - csoki2 - 19.04.2011

So i have a problem within this:

pawn Код:
if(PlayerInfo[playerid][pJob] == 24 && HullaOnDuty[playerid] == 1)
    {
        switch(HullaFelveve[playerid])
        {
        case 0:
        {
            return 1;
        }
        case 1:
        {
            DisablePlayerCheckpoint(playerid);
            GameTextForPlayer(playerid, "~g~Felvetted a halottat, most szallisd vissza a ravatalozoba", 5000, 3);
            SetPlayerCheckpoint(playerid,-345.1764,1049.0767,19.7084,8.0);
            HullaFelveve[playerid] = 2;
        }
        case 2:
        {
            DisablePlayerCheckpoint(playerid);
            GameTextForPlayer(playerid, "~g~Leszallitottad a hullat, jutalom: $100", 5000, 3);
            SafeGivePlayerMoney(playerid,100);
            HullaFelveve[playerid] = 0;
            }
        }
   }
The SetPlayerCheckpoint within this piece of code wont show up, even the text for player shows up but not the checkpoint...... Please help!


Re: Checkpoint wont show up! - csoki2 - 19.04.2011

Quote:
Originally Posted by ******
Посмотреть сообщение
The rest of the function would help...
There:
Under OnPlayerDeath

pawn Код:
for (new i= 0; i< MAX_PLAYERS; i++)
    {
    if(PlayerInfo[i][pJob] == 24 && HullaOnDuty[i] == 1)
    {
        SetPlayerCheckpoint(i,DeathX,DeathY,DeathZ,4.0)
        HullaFelveve[i] = 1;
        GameTextForPlayer(i, "~r~Valaki meghalt, siess hogy elszallisd!", 5000, 3);
        }
    }

Cmd:

pawn Код:
if(strcmp(cmd, "/hullaszбllнtбs", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pJob] == 24)
        {
            if(HullaOnDuty[playerid] == 0)
            {
                new playervehicleid = GetPlayerVehicleID(playerid);
                if(IsAHulla(playervehicleid))
                {
                    TogglePlayerControllable(playerid, 1);
                    GameTextForPlayer(playerid, "~g~Hulla szallitas megkezdve", 5000, 3);
                    HullaOnDuty[playerid] = 1;
                    SendClientMessage(playerid, COLOR_RED, " ");
                    SendClientMessage(playerid, COLOR_GREEN, "Vбrj a checkpointokra.");
                    SendClientMessage(playerid, COLOR_GREEN, "Ha valaki meghalt egy piros checkpoint jelzi a poziciуjбt!");
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "Nem vagy hullaszбllнtу kocsiban!");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "Mбr dolgozol!");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "Nem vagy hullaszбllнtу!");
        }
    }
    return 1;
}



Re: Checkpoint wont show up! - csoki2 - 19.04.2011

i dont get u its in da gamemode all over the place


Re: Checkpoint wont show up! - csoki2 - 19.04.2011

Quote:
Originally Posted by ******
Посмотреть сообщение
None of that code contains the original code! Show us the rest of the function in which the original code is contained.
i dont quiet get u dis code is in da gamemode all over the place..


Re: Checkpoint wont show up! - csoki2 - 19.04.2011

Quote:
Originally Posted by ******
Посмотреть сообщение
Firstly, what happened to your typing? It was fine in the first post but has descended in to almost unreadable shorthand! And yes, I meant post OnPlayerEnterCheckpoint, assuming that that is, as requested, the function in which the code you originally posted is found.
allritght I will post it and try typing properly:


pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    new string[128];
    new string2[128];
    new name[MAX_PLAYER_NAME];

    if(PlayerInfo[playerid][pJob] == 24 && HullaOnDuty[playerid] == 1)
    {
        switch(HullaFelveve[playerid])
        {
        case 0:
        {
            return 1;
        }
        case 1:
        {
            DisablePlayerCheckpoint(playerid);
            GameTextForPlayer(playerid, "~g~Felvetted a halottat, most szallisd vissza a ravatalozoba", 5000, 3);
            SetPlayerCheckpoint(playerid,-345.1764,1049.0767,19.7084,8.0);
            HullaFelveve[playerid] = 2;
        }
        case 2:
        {
            DisablePlayerCheckpoint(playerid);
            GameTextForPlayer(playerid, "~g~Leszallitottad a hullat, jutalom: $100", 5000, 3);
            SafeGivePlayerMoney(playerid,100);
            HullaFelveve[playerid] = 0;
            }
        }
   }
   
    if(TaxiCallTime[playerid] > 0 && TaxiAccepted[playerid] < 999)
    {
        TaxiAccepted[playerid] = 999;
        GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
        TaxiCallTime[playerid] = 0;
        DisablePlayerCheckpoint(playerid);
    }
    else if(BusCallTime[playerid] > 0 && BusAccepted[playerid] < 999)
    {
        BusAccepted[playerid] = 999;
        GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
        BusCallTime[playerid] = 0;
        DisablePlayerCheckpoint(playerid);
    }
    else if(CP[playerid]==1)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            PlayerInfo[playerid][pJackSkill] ++;
            if(PlayerInfo[playerid][pJackSkill] == 50)
            { SendClientMessage(playerid, COLOR_YELLOW, "* Az autуtolvaj skilled mбr 2-es, mostantуl tцbb pйnzt keresel йs hamarabb adhatod le a jбrművet."); }
            else if(PlayerInfo[playerid][pJackSkill] == 100)
            { SendClientMessage(playerid, COLOR_YELLOW, "* Az autуtolvaj skilled mбr 3-as, mostantуl tцbb pйnzt keresel йs hamarabb adhatod le a jбrművet."); }
            else if(PlayerInfo[playerid][pJackSkill] == 200)
            { SendClientMessage(playerid, COLOR_YELLOW, "* Az autуtolvaj skilled mбr 4-es, mostantуl tцbb pйnzt keresel йs hamarabb adhatod le a jбrművet."); }
            else if(PlayerInfo[playerid][pJackSkill] == 400)
            { SendClientMessage(playerid, COLOR_YELLOW, "* Az autуtolvaj skilled mбr 5-цs, mostantуl tцbb pйnzt keresel йs hamarabb adhatod le a jбrművet."); }
            new level = PlayerInfo[playerid][pJackSkill];
            if(level >= 0 && level <= 50)
            {
                new rand = random(sizeof(SELLCAR1));
                format(string, sizeof(string), "Jбrmű eladva %d$ -йrt, nйzz vissza egy ъjjal 20 perc mъlva.", SELLCAR1[rand]);
                SendClientMessage(playerid, COLOR_WHITE, string);
                SafeGivePlayerMoney(playerid, SELLCAR1[rand]);
                PlayerInfo[playerid][pCarTime] = 1200;
            }
            else if(level >= 51 && level <= 100)
            {
                new rand = random(sizeof(SELLCAR2));
                format(string, sizeof(string), "Jбrmű eladva %d$ -йrt, nйzz vissza egy ъjjal 18 perc mъlva.", SELLCAR2[rand]);
                SendClientMessage(playerid, COLOR_WHITE, string);
                SafeGivePlayerMoney(playerid, SELLCAR2[rand]);
                PlayerInfo[playerid][pCarTime] = 1080;
            }
            else if(level >= 101 && level <= 200)
            {
                new rand = random(sizeof(SELLCAR3));
                format(string, sizeof(string), "Jбrmű eladva %d$ -йrt, nйzz vissza egy ъjjal 16 perc mъlva.", SELLCAR3[rand]);
                SendClientMessage(playerid, COLOR_WHITE, string);
                SafeGivePlayerMoney(playerid, SELLCAR3[rand]);
                PlayerInfo[playerid][pCarTime] = 960;
            }
            else if(level >= 201 && level <= 400)
            {
                new rand = random(sizeof(SELLCAR4));
                format(string, sizeof(string), "Jбrmű eladva %d$ -йrt, nйzz vissza egy ъjjal 14 perc mъlva.", SELLCAR4[rand]);
                SendClientMessage(playerid, COLOR_WHITE, string);
                SafeGivePlayerMoney(playerid, SELLCAR4[rand]);
                PlayerInfo[playerid][pCarTime] = 840;
            }
            else if(level >= 401)
            {
                new money = 6000;
                format(string, sizeof(string), "Jбrmű eladva %d$ -йrt, nйzz vissza egy ъjjal 12 perc mъlva.", money);
                SendClientMessage(playerid, COLOR_WHITE, string);
                SafeGivePlayerMoney(playerid, money);
                PlayerInfo[playerid][pCarTime] = 720;
            }
            GameTextForPlayer(playerid, "~y~Eladtad", 2500, 1);
            CP[playerid] = 0;
            DisablePlayerCheckpoint(playerid);
            SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        }
        else
        {
            GameTextForPlayer(playerid, "Nem vagy kocsiban", 5000, 1);
        }
    }
    else if(CP[playerid] == 5)
    {
        GameTextForPlayer(playerid, "~y~At the Missions Checkpoint", 2500, 1);
        CP[playerid] = 0;
        DisablePlayerCheckpoint(playerid);
    }
    else if(CP[playerid] == 9)//Karting
    {
        GameTextForPlayer(playerid, "~r~Wait here for more Kart Racers", 4000, 3);
        DisablePlayerCheckpoint(playerid);
    }
    else if(CP[playerid] == 10) { CP[playerid] = 11; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2258.7874,-2402.9712,12.7035,8.0); }
    else if(CP[playerid] == 11) { CP[playerid] = 12; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2225.8755,-2461.3875,12.7190,8.0); }
    else if(CP[playerid] == 12) { CP[playerid] = 13; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2276.9983,-2662.8328,12.8580,8.0); }
    else if(CP[playerid] == 13) { CP[playerid] = 14; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2449.1399,-2663.0562,12.8138,8.0); }
    else if(CP[playerid] == 14) { CP[playerid] = 15; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2566.9814,-2504.5686,12.7692,8.0); }
    else if(CP[playerid] == 15) { CP[playerid] = 16; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2719.0520,-2503.5962,12.7706,8.0); }
    else if(CP[playerid] == 16) { CP[playerid] = 17; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2720.7881,-2405.6589,12.7441,8.0); }
    else if(CP[playerid] == 17) { CP[playerid] = 18; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2571.5195,-2401.1531,12.7528,8.0); }
    else if(CP[playerid] == 18) { CP[playerid] = 19; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2406.6995,-2423.1182,12.6641,8.0); }
    else if(CP[playerid] == 19) { CP[playerid] = 20; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2322.9194,-2341.5715,12.6664,8.0); }
    else if(CP[playerid] == 20)//End of Karting
    {
        CP[playerid] = 0;
        DisablePlayerCheckpoint(playerid);
        GetPlayerName(playerid, name, sizeof(name));
        if(FirstKartWinner == 999)
        {
            FirstKartWinner = playerid;
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
                    {
                        format(string, sizeof(string), "* %s lett az első a go-cart versenyen.",name);
                        SendClientMessage(i, COLOR_WHITE, string);
                    }
                }
            }
        }
        else if(SecondKartWinner == 999)
        {
            SecondKartWinner = playerid;
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
                    {
                        format(string, sizeof(string), "* %s lett a mбsodik a go-cart versenyen.",name);
                        SendClientMessage(i, COLOR_WHITE, string);
                    }
                }
            }
        }
        else if(ThirdKartWinner == 999)
        {
            ThirdKartWinner = playerid;
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
                    {
                        format(string, sizeof(string), "* %s a harmadik helyen vйgzett a go-cart versenyen.",name);
                        SendClientMessage(i, COLOR_WHITE, string);
                        SendClientMessage(i, COLOR_WHITE, "** A Go-cart Verseny Vйget Йrt **");
                        CP[i] = 0;
                        DisablePlayerCheckpoint(i);
                    }
                }
            }
        }
    }
    else if(MissionCheckpoint[playerid] > 0 && PlayMission[kToggle] == 1)//Missions + Checkpoint on toggle
    {
            RingTone[playerid] = 20;
            switch(MissionCheckpoint[playerid])
            {
                case 1:
                {
                    format(string, sizeof(string), "%s", PlayMission[kGText1]);
                    GameTextForPlayer(playerid, string, 8000, 3);
                    format(string, sizeof(string), "%s", PlayMission[kText4]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    format(string, sizeof(string), "%s", PlayMission[kText5]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    format(string, sizeof(string), "%s", PlayMission[kText6]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    DisablePlayerCheckpoint(playerid);
                    SetPlayerCheckpoint(playerid, PlayMission[kCP2][0], PlayMission[kCP2][1], PlayMission[kCP2][2], 8);
                    MissionCheckpoint[playerid] = 2;
                }
                case 2:
                {
                    format(string, sizeof(string), "%s", PlayMission[kGText2]);
                    GameTextForPlayer(playerid, string, 8000, 3);
                    format(string, sizeof(string), "%s", PlayMission[kText7]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    format(string, sizeof(string), "%s", PlayMission[kText8]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    format(string, sizeof(string), "%s", PlayMission[kText9]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    DisablePlayerCheckpoint(playerid);
                    SetPlayerCheckpoint(playerid, PlayMission[kCP3][0], PlayMission[kCP3][1], PlayMission[kCP3][2], 8);
                    MissionCheckpoint[playerid] = 3;
                }
                case 3:
                {
                    format(string, sizeof(string), "%s", PlayMission[kGText3]);
                    GameTextForPlayer(playerid, string, 8000, 3);
                    format(string, sizeof(string), "%s", PlayMission[kText10]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    format(string, sizeof(string), "%s", PlayMission[kText11]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    format(string, sizeof(string), "%s", PlayMission[kText12]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    DisablePlayerCheckpoint(playerid);
                    SetPlayerCheckpoint(playerid, PlayMission[kCP4][0], PlayMission[kCP4][1], PlayMission[kCP4][2], 8);
                    MissionCheckpoint[playerid] = 4;
                }
                case 4:
                {
                    format(string, sizeof(string), "%s", PlayMission[kGText4]);
                    GameTextForPlayer(playerid, string, 8000, 3);
                    format(string, sizeof(string), "%s", PlayMission[kText13]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    format(string, sizeof(string), "%s", PlayMission[kText14]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    format(string, sizeof(string), "%s", PlayMission[kText15]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    DisablePlayerCheckpoint(playerid);
                    SetPlayerCheckpoint(playerid, PlayMission[kCP5][0], PlayMission[kCP5][1], PlayMission[kCP5][2], 8);
                    MissionCheckpoint[playerid] = 5;
                }
                case 5:
                {
                    format(string, sizeof(string), "%s", PlayMission[kGText5]);
                    GameTextForPlayer(playerid, string, 8000, 3);
                    format(string, sizeof(string), "%s", PlayMission[kText16]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    format(string, sizeof(string), "%s", PlayMission[kText17]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    format(string, sizeof(string), "%s", PlayMission[kText18]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    DisablePlayerCheckpoint(playerid);
                    SetPlayerCheckpoint(playerid, PlayMission[kCP6][0], PlayMission[kCP6][1], PlayMission[kCP6][2], 8);
                    MissionCheckpoint[playerid] = 6;
                }
                case 6:
                {
                    format(string, sizeof(string), "%s", PlayMission[kGText6]);
                    GameTextForPlayer(playerid, string, 8000, 3);
                    format(string, sizeof(string), "..:: Missio Kйsz : %s | Kaptбl: %d$ ::..", PlayMission[kTitle], PlayMission[kReward]);
                    SendClientMessage(playerid, COLOR_GREEN, string);
                    DisablePlayerCheckpoint(playerid);
                    SafeGivePlayerMoney(playerid, PlayMission[kReward]);
                    PlayerInfo[playerid][pMissionNr] = PlayerOnMission[playerid];
                    MissionCheckpoint[playerid] = 0;
                    PlayerOnMission[playerid] = 0;
                }
            }
    }
    else
    {
        switch (gPlayerCheckpointStatus[playerid])
        {
            case CHECKPOINT_HOME:
            {
                PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
                DisablePlayerCheckpoint(playerid);
                gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
                GameTextForPlayer(playerid, "~w~You are~n~~y~Home", 5000, 1);
            }
        }
    }
    if (BusrouteEast[playerid][0] != 0)
    {
        if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2)
        {
            new nextstop[64];
            BusrouteWest[playerid][0] = 0;
            switch(BusrouteEast[playerid][0])
            {
                case 1:
                {
                    nextstop = "Fort Carson";
                    SetPlayerCheckpoint(playerid, -186.2250,978.7411,19.1847, 5.0);
                    AdvertiseToPlayersAtBusStop(-186.2250,978.7411,19.1847, 0);
                }
                case 2:
                {
                    nextstop = "Hotel";
                    SetPlayerCheckpoint(playerid, 40.3935,1192.9556,19.0194, 5.0);
                    AdvertiseToPlayersAtBusStop(40.3935,1192.9556,19.0194, 0);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Megбllу: Fort Carson, Vбrj 10mp-t.");
                }
                case 3:
                {
                    nextstop = "Parkolo";
                    SetPlayerCheckpoint(playerid, 55.6275,1170.9785,18.7656, 5.0);
                    AdvertiseToPlayersAtBusStop(55.6275,1170.9785,18.7656, 0);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Megбllу: Hotel ");
                }
                case 4:
                {
                    nextstop = "Benzinkut";
                    SetPlayerCheckpoint(playerid, 43.2513,1202.3921,19.0094, 5.0);
                    AdvertiseToPlayersAtBusStop(43.2513,1202.3921,19.0094, 0);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Itt fordulj meg !");
                }
                case 5:
                {
                    nextstop = "Korhaz";
                    SetPlayerCheckpoint(playerid, -279.9072,1044.3492,19.7607, 5.0);
                    AdvertiseToPlayersAtBusStop(-279.9072,1044.3492,19.7607, 0);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Megбllу: Benzinkъt, Vбrj 10mp-t.");
                }
                case 6:
                {
                    nextstop = "Rendőrsйg";
                    SetPlayerCheckpoint(playerid, -200.7979,999.8593,19.7315, 5.0);
                    AdvertiseToPlayersAtBusStop(-200.7979,999.8593,19.7315, 0);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Megбllу: Kуrhбz, Vбrj 10mp-t.");
                }
                case 7:
                {
                    nextstop = "Depo";
                    SetPlayerCheckpoint(playerid, -862.6835,1555.7955,24.0446, 5.0);
                    AdvertiseToPlayersAtBusStop(-862.6835,1555.7955,24.0446, 0);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Megбllу: Rendőrsйg, Vбrj 10mp-t.");
                }
                case 8:
                {
                    nextstop = "VЬgeztЬl";
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, COLOR_YELLOW, "Ha megint akarsz menni нrd be /startvonal1 hogy elkezd a keleti vonalt vagy /startvonal2 a nyugati vonalhoz.");
                    SendClientMessage(playerid, COLOR_YELLOW, "Ha kiakarsz szбllni нrd be /exit.");
                    DisablePlayerCheckpoint(playerid);
                }
            }
            BusrouteEast[playerid][0]++;
            if (strcmp(nextstop, "VЬge", true) != 0)
            {
                format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~r~ MegЦllonkЬnt: 100$ ~n~~n~~g~ kov, megЦllo: %s ", nextstop);
                format(string2, sizeof(string2), "~n~~n~~n~~n~~n~~n~~n~~g~ Kov. megЦllo: %s ", nextstop);
            }
            else
            {
                string = "~g~ VЬg ЦllomЦs ~n~~n~~r~ 50$ gyujtottЬl ossze ~n~~n~~w~ird be: /startvonal1";
                string2 = "~n~~g~Vйgбllomбs~n~~n~~w~Kйrlek Hagyd el a buszt.";
                //BusrouteEast[playerid][0] = 0;
                SafeGivePlayerMoney(playerid, 50);
            }
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
            for (new i=0; i<=MAX_PLAYERS; i++)
            {
                if (IsPlayerConnected(i) &&  GetPlayerVehicleID(i) == BusrouteEast[playerid][1])
                {
                    if (BusrouteEast[i][0] != 0) GameTextForPlayer(i, string, 10000, 500);
                    else GameTextForPlayer(i, string2, 10000, 500);
                }
            }
            SafeGivePlayerMoney(playerid, 100);
            return 1;
        }
    }
    else if (BusrouteWest[playerid][0] != 0)
    {
        if (IsPlayerInAnyVehicle(playerid))
        {
            new nextstop[64];
            BusrouteEast[playerid][0] = 0;
            switch(BusrouteWest[playerid][0])
            {
                case 1:
                {
                    nextstop = "Las Barrancas";
                    SetPlayerCheckpoint(playerid, -841.7836,1580.9705,25.7395, 5.0);
                    AdvertiseToPlayersAtBusStop(-841.7836,1580.9705,25.7395, 1);
                }
                case 2:
                {
                    nextstop = "El Quebrados";
                    SetPlayerCheckpoint(playerid, -1375.8953,2592.4360,55.8992, 5.0);
                    AdvertiseToPlayersAtBusStop(-1375.8953,2592.4360,55.8992, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Megбllу: Las Barrancas, Vбrj 10mp-t.");
                }
                case 3:
                {
                    nextstop = "Las Payasadas";
                    PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
                    SetPlayerCheckpoint(playerid, -288.0417,2626.0261,63.0527, 5.0);
                    AdvertiseToPlayersAtBusStop(-288.0417,2626.0261,63.0527, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Megбllу: El Quebrados, Vбrj 10mp-t.");
                }
                case 4:
                {
                    nextstop = "Parkolу";
                    SetPlayerCheckpoint(playerid, -209.4787,2600.6221,62.8002, 5.0);
                    AdvertiseToPlayersAtBusStop(-209.4787,2600.6221,62.8002, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Megбllу: Las Payasadas, Vбrj 10mp-t !");
                }
                case 5:
                {
                    nextstop = "Las Payasadas";
                    SetPlayerCheckpoint(playerid, -224.5194,2643.8428,63.0576, 5.0);
                    AdvertiseToPlayersAtBusStop(-224.5194,2643.8428,63.0576, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Itt fordulj meg !.");
                }
                case 6:
                {
                    nextstop = "El Quebrados";
                    SetPlayerCheckpoint(playerid, -1379.4681,2607.1514,54.7421, 5.0);
                    AdvertiseToPlayersAtBusStop(-1379.4681,2607.1514,54.7421, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Megбllу: Las Payasadas, Vбrj 10mp-t !");
                }
                case 7:
                {
                    nextstop = "Depу";
                    SetPlayerCheckpoint(playerid, -853.0182,1581.2938,26.0194, 5.0);
                    AdvertiseToPlayersAtBusStop(-853.0182,1581.2938,26.0194, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Megбllу: El Quebrados, Vбrj 10mp-t.");
                }
                case 8:
                {
                    nextstop = "Vege";
                    SetPlayerCheckpoint(playerid, -863.1375,1547.6880,23.3540, 5.0);
                    AdvertiseToPlayersAtBusStop(-863.1375,1547.6880,23.3540, 1);
                    SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Megбllу: Las Barrancas, Vбrj 10mp-t.");
                }
                case 9:
                {
                    nextstop = "VЬge";
                    TogglePlayerControllable(playerid, 0);
                    SendClientMessage(playerid, COLOR_YELLOW, "Ha megint akarsz menni нrd be /startvonal1 hogy elkezd a keleti vonalt vagy /startvonal2 a nyugati vonalhoz.");
                    SendClientMessage(playerid, COLOR_YELLOW, "Kiszбllni /exit -el.");
                    DisablePlayerCheckpoint(playerid);
                }
            }
            BusrouteWest[playerid][0]++;
            if (strcmp(nextstop, "end", true) != 0)
            {
                format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~r~MegЦllonkЬnt: 100$~n~~n~~g~kov,megЦllo: %s", nextstop);
                format(string2, sizeof(string2), "~n~~n~~n~~n~~n~~n~~n~~g~Kov.MegЦllo: %s", nextstop);
            }
            else
            {
                string = "~g~SzemЬttelep~n~~n~~r~50$ot gyujtottЬl ossze~n~~n~~w~/startvonal2 ha folytatnЦd";
                string2 = "~n~~g~End of Route~n~~n~~w~Hagyd el a buszt vagy indits egy uj vonalat";
                //BusrouteWest[playerid][0] = 0;
                SafeGivePlayerMoney(playerid, 50);
            }
            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 (BusrouteWest[i][0] != 0) GameTextForPlayer(i, string, 10000, 500);
                    else GameTextForPlayer(i, string2, 10000, 500);
                }
            }
            SafeGivePlayerMoney(playerid, 100);
            return 1;
        }
    }
    if (BusShowLocationC[playerid] == 1)
    {
        DisablePlayerCheckpoint(playerid);
        BusShowLocationC[playerid] = 0;
        return 1;
    }
    if(FarmerVar[playerid] == 1)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            new carid = GetPlayerVehicleID(playerid);
            if(IsAHarvest(carid))
            {
                new cashes=(random(800-500)+300);
                PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
                format(string, sizeof(string), "~g~%d$ ~w~hozzЦadva a fizetЬshez",cashes);
                GameTextForPlayer(playerid, string, 5000, 1);
                DisablePlayerCheckpoint(playerid);
                PlayerInfo[playerid][pPayCheck] += cashes * 3;
                new randomss;
                randomss = random(sizeof(gPostasPoints));
                SetPlayerCheckpoint(playerid, gPostasPoints[randomss][0], gPostasPoints[randomss][1], gPostasPoints[randomss][2], 5.0);
            }
        }
        return 1;
    }
    if(MatsHolding[playerid] == 25)
    {
        if(PlayerInfo[playerid][pJob] == 22)
        {
            DisablePlayerCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
            SafeGivePlayerMoney(playerid, 1000);
            SendClientMessage(playerid, COLOR_WHITE, "You have sold 25 materials to materials bank.");
            MatsHolding[playerid] = 0;
            matssys[MatsAmmount] += 25;
            GameTextForPlayer(playerid, "~w~Materials imported", 5000, 1);
            SaveMatsSystem();
        }
        return 1;
    }
    if(IsPuttingMaterials[playerid] == 1)
    {
        if(PlayerInfo[playerid][pJob] == 23)
        {
            if(PlayerInfo[playerid][pMats] < CreatingGunPrice[playerid])
            {
                SendClientMessage(playerid, COLOR_GREY, "   Not enough materials ");
                return 1;
            }
            DisablePlayerCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
            GameTextForPlayer(playerid, "~w~Materials delivered successfuly", 5000, 1);
            PlayerInfo[playerid][pMats] -= CreatingGunPrice[playerid];
            CreatingGunPrice[playerid] = 0;
            IsPuttingMaterials[playerid] = 0;
            new randomize = random(3)+1;
            if(randomize == 1) ProxDetector(40.0, playerid, "Factory speaker: Take da gat outside homie !",COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            else if(randomize == 2) ProxDetector(40.0, playerid, "Factory speaker: Chea' ya blasta is outside !",COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            else ProxDetector(40.0, playerid, "Factory speaker: Damn nice ass gun i made. It's waiting for ya outside !",COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            IsTakingGun[playerid] = 1;
            SetPlayerCheckpoint(playerid, 2163.3430,-2271.9934,13.3293, 1.0);
            return 1;
        }
        return 1;
    }
    if(IsTakingGun[playerid] == 1)
    {
        if(PlayerInfo[playerid][pJob] == 23)
        {
            if(CreatingGun[playerid] == 0 || CreatingGunAmmo[playerid] == 0)
            {
                return 1;
            }
            DisablePlayerCheckpoint(playerid);
            new gunname[128];
            GetWeaponName(CreatingGun[playerid],gunname,sizeof(gunname));
            format(string, sizeof(string), "   You took %s from the ground.", gunname);
            SendClientMessage(playerid, COLOR_GREY, string);
            SafeGivePlayerWeapon(playerid, CreatingGun[playerid], CreatingGunAmmo[playerid]);
            CreatingGun[playerid] = 0;
            CreatingGunAmmo[playerid] = 0;
            IsTakingGun[playerid] = 0;
            return 1;
        }
        return 1;
    }
    if(DrugFarmerVar[playerid] == 1)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            new carid = GetPlayerVehicleID(playerid);
            new cash=(random(60-20)+10);
            if(IsADrugHarvest(carid))
            {
                switch(DrugFarmerPickup[playerid][0])
                {
                    case 0:
                    {
                        SetPlayerCheckpoint(playerid, -975.4222,2385.6475,40.4590, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 1:
                    {
                        SetPlayerCheckpoint(playerid, -865.8856,2123.5317,40.4364, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 2:
                    {
                        SetPlayerCheckpoint(playerid, -926.7426,2644.0823,40.4741, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 3:
                    {
                        SetPlayerCheckpoint(playerid, -900.3136,2165.6279,40.4883, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 4:
                    {
                        SetPlayerCheckpoint(playerid, -511.9554,2192.7527,40.5851, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 5:
                    {
                        SetPlayerCheckpoint(playerid, -552.8877,2312.6008,40.4831, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 6:
                    {
                        SetPlayerCheckpoint(playerid, -900.3136,2165.6279,40.4883, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 7:
                    {//drop-off
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            drugsys[DrugAmmount]++;
                            format(string, sizeof(string), "~w~HozzЦ adva a fizetЬsedhez~n~~b~%d$",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                            SaveDrugSystem();
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -911.3638,2672.8979,42.3703, 5.0);
                    }
                    case 8:
                    {
                        SetPlayerCheckpoint(playerid, -511.9554,2192.7527,40.5851, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 9:
                    {
                        SetPlayerCheckpoint(playerid, -865.8856,2123.5317,40.4364, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 10:
                    {
                        SetPlayerCheckpoint(playerid, -962.5820,2292.8918,40.4768, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 11:
                    {
                        SetPlayerCheckpoint(playerid, -511.9554,2192.7527,40.5851, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 12:
                    {
                        SetPlayerCheckpoint(playerid, -1139.9451,2651.9087,40.5368, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 13:
                    {
                        SetPlayerCheckpoint(playerid, -900.3136,2165.6279,40.4883, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 14:
                    {//drop-off
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            drugsys[DrugAmmount]++;
                            format(string, sizeof(string), "~w~HozzЦ adva a fizetЬsedhez~n~~b~%d$",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                            SaveDrugSystem();
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -911.3638,2672.8979,42.3703, 5.0);
                    }
                    case 15:
                    {
                        SetPlayerCheckpoint(playerid, -552.8877,2312.6008,40.4831, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 16:
                    {
                        SetPlayerCheckpoint(playerid, -865.8856,2123.5317,40.4364, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 17:
                    {
                        SetPlayerCheckpoint(playerid, -1161.9829,2154.8752,40.8111, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 18:
                    {
                        SetPlayerCheckpoint(playerid, -962.5820,2292.8918,40.4768, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 19:
                    {
                        SetPlayerCheckpoint(playerid, -900.3136,2165.6279,40.4883, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 20:
                    {
                        SetPlayerCheckpoint(playerid, -1139.9451,2651.9087,40.5368, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 21:
                    {
                        SetPlayerCheckpoint(playerid, -552.8877,2312.6008,40.4831, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 22:
                    {//drop-off
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            drugsys[DrugAmmount]++;
                            format(string, sizeof(string), "~w~HozzЦ adva a fizetЬsedhez~n~~b~%d$",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                            SaveDrugSystem();
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -911.3638,2672.8979,42.3703, 5.0);
                    }
                    case 23:
                    {
                        SetPlayerCheckpoint(playerid, -926.7426,2644.0823,40.4741, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 24:
                    {
                        SetPlayerCheckpoint(playerid, -865.8856,2123.5317,40.4364, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 25:
                    {
                        SetPlayerCheckpoint(playerid, -1161.9829,2154.8752,40.8111, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 26:
                    {
                        SetPlayerCheckpoint(playerid, -827.4332,2232.5386,40.5815, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 27:
                    {
                        SetPlayerCheckpoint(playerid, -900.3136,2165.6279,40.4883, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 28:
                    {
                        SetPlayerCheckpoint(playerid, -1139.9451,2651.9087,40.5368, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 29:
                    {
                        SetPlayerCheckpoint(playerid, -962.5820,2292.8918,40.4768, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 30:
                    {//drop-off
                        if(JustStarted[playerid] != 1)
                        {
                            PlayerInfo[playerid][pPayCheck] += cash * 5;
                            drugsys[DrugAmmount]++;
                            format(string, sizeof(string), "~w~HozzЦ adva a fizetЬsedhez~n~~b~%d$",cash);
                            GameTextForPlayer(playerid, string, 5000, 1);
                            SaveDrugSystem();
                        }
                        else
                        {
                            JustStarted[playerid] = 0;
                        }
                        SetPlayerCheckpoint(playerid, -911.3638,2672.8979,42.3703, 5.0);
                    }
                    case 31:
                    {
                        SetPlayerCheckpoint(playerid, -511.9554,2192.7527,40.5851, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 32:
                    {
                        SetPlayerCheckpoint(playerid, -962.5820,2292.8918,40.4768, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 33:
                    {
                        SetPlayerCheckpoint(playerid, -865.8856,2123.5317,40.4364, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 34:
                    {
                        SetPlayerCheckpoint(playerid, -975.4222,2385.6475,40.4590, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 35:
                    {
                        SetPlayerCheckpoint(playerid, -865.8856,2123.5317,40.4364, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 36:
                    {
                        SetPlayerCheckpoint(playerid, -911.3638,2672.8979,42.3703, 5.0);
                        if(JustStarted[playerid] != 0)
                        {
                            JustStarted[playerid] = 0;
                        }
                    }
                    case 37:
                    {//last drop-off
                        PlayerInfo[playerid][pPayCheck] += cash * 30;
                        drugsys[DrugAmmount]++;
                        SaveDrugSystem();
                        DisablePlayerCheckpoint(playerid);
                        TogglePlayerControllable(playerid, 0);
                        GameTextForPlayer(playerid, "~w~/exit hogy kiszallj~n~~b~Eleget dolgoztal", 5000, 1);
                    }
                }
                DrugFarmerPickup[playerid][0]++;
                PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
            }
        }
        return 1;
    }



Re: Checkpoint wont show up! - csoki2 - 19.04.2011

I have no idea xD


Re: Checkpoint wont show up! - csoki2 - 19.04.2011

Quote:
Originally Posted by ******
Посмотреть сообщение
You have a lot of DisableCheckpoints and CreatePlayerCheckpoints there, are you sure one of those aren't disabling the one you just made?
the disablecheckpoint in case1 is there to disable the checkpoint i made to show up when a player dies so basically it shows where to go for the dead body transporter since i made this script for the dead body transporter job but ill check the rest of them.


Re: Checkpoint wont show up! - csoki2 - 19.04.2011

well i the disablecheckpoint in case1 is there to disable the checkpoint i made for when a player dies so that the prson whos on the duty with the dead body transporter job can see the checkpoint on where to go to get the body and the next checkpoint wich suppose to show the place of the hospital where the body should be transported does not work.. but ill try to check


Re: Checkpoint wont show up! - csoki2 - 19.04.2011

sorry for double post..


Re: Checkpoint wont show up! - csoki2 - 19.04.2011

Men i dont know its near impossible to check all of the functions could you suggest a different way of setting that checkpoint for the player?


Re: Checkpoint wont show up! - csoki2 - 19.04.2011

I dont think so becouse all of the others dont have the query of: if(PlayerInfo[playerid][pJob] == 24 && HullaOnDuty[playerid] == 1) i dont know their are so many others......


Re: Checkpoint wont show up! - csoki2 - 19.04.2011

Took out a couple of those other disablecheckpoints but damn it still doesnt work..


Re: Checkpoint wont show up! - csoki2 - 19.04.2011

Yes it works now, i toke out the very last disablecheckpoint and it now works thanks for your help