[pomoc] ruta na poslu vozac autobusa

Započeo Aldin Begovic, Septembar 27, 2011, 13:42:18 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:GTA rp
Detaljan opis problema:Pravio sam vise ruta na poslu vozac busa i sad imam probleme standradne rute na modu tj. /sterteast i /stertwest rade al ne rade moje sto sam ja pravio jednostvno izaberem gradska2 tj moju rutu ono mi ucita Cp od /starteast!!! mozete li mi pomoc bio bi zahvalan
Dio skripte:

if(dialogid == 107)
      {
         if(response)
         {
               if(listitem == 0) // dole
            {
               if (BusrouteWest[playerid][0] == 12 || BusrouteEast[playerid][0] == 12)
               {
                  BusrouteWest[playerid][0] = 0;
                  BusrouteEast[playerid][0] = 0;
               }
               if(BusrouteWest[playerid][0] == 0 && BusrouteEast[playerid][0] == 0)
               {
                  new playervehicleid = GetPlayerVehicleID(playerid);
                  if(IsABus(playervehicleid))
                  {
                     TogglePlayerControllable(playerid, 1);
                     GameTextForPlayer(playerid, "~g~Bus Route Started", 5000, 3);
                     SendClientMessage(playerid, COLOR_LIGHTRED, "---------Zapadna Los Santos Bus Ruta-----------");
                     SendBusRoute(playerid, 1);
                     SendClientMessage(playerid, COLOR_RED, " ");
                     SendClientMessage(playerid, COLOR_GREEN, "Crveni markeri ce biti postavljeni po ruti.");
                     SendClientMessage(playerid, COLOR_GREEN, "Vasa kompanija ce biti automatski reklamirana na sledecem stajanju igracima u blizini.");
                     BusrouteWest[playerid][0] = 1;
                     BusrouteWest[playerid][1] = playervehicleid;
                     OnPlayerEnterCheckpoint(playerid);
                     return 1;
                  }
                  else
                  {
                     SendClientMessage(playerid, COLOR_GREY, "Niste u busu!");
                  }
               }
               else
               {
                  SendClientMessage(playerid, COLOR_GREY, "Vec ste na ruti!");
               }
            }
            else if(listitem == 1) // gore
            {
                if (BusrouteGradska2[playerid][0] == 12 )
               {
                  BusrouteGradska2[playerid][0] = 0;
               
               }
                if(BusrouteGradska2[playerid][0] == 0 && BusrouteGradska2[playerid][0] == 0)
                {
                  new playervehicleid = GetPlayerVehicleID(playerid);
                  if(IsABus(playervehicleid))
                  {
                     TogglePlayerControllable(playerid, 1);
                     GameTextForPlayer(playerid, "~g~Bus Route Started", 5000, 3);
                     SendClientMessage(playerid, COLOR_LIGHTRED, "---------Istocna Los Santos Bus Routa-----------");
                     SendBusRoute(playerid, 0);
                     SendClientMessage(playerid, COLOR_RED, " ");
                     SendClientMessage(playerid, COLOR_GREEN, "Crveni markeri ce biti postavljeni po ruti.");
                     SendClientMessage(playerid, COLOR_GREEN, "Vasa kompanija ce biti automatski reklamirana na sledecem stajanju igracima u blizini.");
                     BusrouteEast[playerid][0] = 1;
                     BusrouteEast[playerid][1] = playervehicleid;
                     OnPlayerEnterCheckpoint(playerid);
                     return 1;
                  }
                   else
                   {
                      SendClientMessage(playerid, COLOR_GREY, "Niste u busu!");
                   }
               }
               else
               {
                  SendClientMessage(playerid, COLOR_GREY, "Vec ste na ruti!");
               }
            }
            else if(listitem == 1) // gore
            {
                if (BusrouteWest[playerid][0] == 12 || BusrouteEast[playerid][0] == 12)
               {
                  BusrouteWest[playerid][0] = 0;
                  BusrouteEast[playerid][0] = 0;
               }
                if(BusrouteWest[playerid][0] == 0 && BusrouteEast[playerid][0] == 0)
                {
                  new playervehicleid = GetPlayerVehicleID(playerid);
                  if(IsABus(playervehicleid))
                  {
                     TogglePlayerControllable(playerid, 1);
                     GameTextForPlayer(playerid, "~g~Bus Route Started", 5000, 3);
                     SendClientMessage(playerid, COLOR_LIGHTRED, "---------Istocna Los Santos Bus Routa-----------");
                     SendBusRoute(playerid, 0);
                     SendClientMessage(playerid, COLOR_RED, " ");
                     SendClientMessage(playerid, COLOR_GREEN, "Crveni markeri ce biti postavljeni po ruti.");
                     SendClientMessage(playerid, COLOR_GREEN, "Vasa kompanija ce biti automatski reklamirana na sledecem stajanju igracima u blizini.");
                     BusrouteEast[playerid][0] = 1;
                     BusrouteEast[playerid][1] = playervehicleid;
                     OnPlayerEnterCheckpoint(playerid);
                     return 1;
                  }
                   else
                   {
                      SendClientMessage(playerid, COLOR_GREY, "Niste u busu!");
                   }
               }
               else
               {
                  SendClientMessage(playerid, COLOR_GREY, "Vec ste na ruti!");
               }
            }
            else
            {
               SendClientMessage(playerid, COLOR_GREY, "Niste vozac busa!");
            }
         }
         return 1;
      }

Neke slike/video za lakse dobivanje pomoci(neobavezno)://

 BusrouteEast
ti je i na tvojoj gradska2
moras sve mjenjate ne samo ime :D
i bas me zanima jesil dodavo CP-ove?
Vratio sam se ponovo ocekjute novi server...

BusrouteEast[playerid][0] = 1;
                     BusrouteEast[playerid][1] = playervehicleid;
                     OnPlayerEnterCheckpoint(playerid);
                     return 1;
                  }


kao sto je rekao narco, moras da promenis to, tj napravi npr busroutegradska2, zatim uradi cp-ove za tu rutu, tj uzmi kopiraj npr vec postojecu za east, i samo izmeni poziciju cpova i promenis busruoteEast na toj kopiranoj u npr busroutegradska2

ako razumes sta hocu da kazem...

ma ne bas da razumem a jesam napravio cp isto kao sto sam narpavio za prve dvije rute !! ne kontam bas najj sta zelis da kazes al odo pogleda t malo bolje mozda skontam !!a ja sam kopirao bus rutu east i sam zamjenio cp ee nije mi jasno gdje jos da promjenim !??? evo pogledajte

if (BusrouteGradska2[playerid][0] != 0)
   {
      if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2)
      {
         new nextstop[64];
         BusrouteGradska2[playerid][0] = 0;
          switch(BusrouteGradska2[playerid][0])
          {
              case 1:
              {
               nextstop = "Stanica1";
                  SetPlayerCheckpoint(playerid, 1796.9752,-1932.6086,13.3864, 5.0);
               AdvertiseToPlayersAtBusStop(1796.9752,-1932.6086,13.3864, 0);
            }
            case 2:
            {
               nextstop = "Stanica2";
                SetPlayerCheckpoint(playerid, 2036.2096,-1080.7666,24.7474, 5.0);
               AdvertiseToPlayersAtBusStop(2036.2096,-1080.7666,24.7474, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 3:
            {
               nextstop = "Stanica3";
                SetPlayerCheckpoint(playerid, 2435.6726,-1189.3846,36.2629, 5.0);
               AdvertiseToPlayersAtBusStop(2435.6726,-1189.3846,36.2629, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 4:
            {
               nextstop = "Stanica4";
                SetPlayerCheckpoint(playerid, 2716.1799,-1446.2275,30.4526, 5.0);
               AdvertiseToPlayersAtBusStop( 2716.1799,-1446.2275,30.4526, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 5:
            {
               nextstop = "Stanica5";
                SetPlayerCheckpoint(playerid, 2664.4395,-1651.4447,10.8672, 5.0);
               AdvertiseToPlayersAtBusStop(2664.4395,-1651.4447,10.8672, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 6:
            {
               nextstop = "Stanica6";
                SetPlayerCheckpoint(playerid, 2763.0962,-1973.4396,13.5462, 5.0);
               AdvertiseToPlayersAtBusStop(2763.0962,-1973.4396,13.5462, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 7:
            {
               nextstop = "Stanica7";
                SetPlayerCheckpoint(playerid, 2316.2102,-2046.8090,13.5469, 5.0);
               AdvertiseToPlayersAtBusStop(2316.2102,-2046.8090,13.5469, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 8:
            {
               nextstop = "Stanica8";
                SetPlayerCheckpoint(playerid, 2222.4753,-1934.0110,13.5415, 5.0);
               AdvertiseToPlayersAtBusStop(2222.4753,-1934.0110,13.5415, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 9:
            {
               nextstop = "Stanica9";
                SetPlayerCheckpoint(playerid, 2077.2803,-1784.7175,13.5469, 5.0);
               AdvertiseToPlayersAtBusStop(2077.2803,-1784.7175,13.5469, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 10:
            {
               nextstop = "end";
                SetPlayerCheckpoint(playerid, 1805.2540,-1931.4181,13.3870, 5.0);
               AdvertiseToPlayersAtBusStop(1805.2540,-1931.4181,13.3870, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 11:
            {
               nextstop = "end";
               TogglePlayerControllable(playerid, 0);
                   SendClientMessage(playerid, COLOR_YELLOW, "Bus linija zavrsena , Koristite /starteast ili /startwest za novu liniju.");
               SendClientMessage(playerid, COLOR_YELLOW, "Koristite /exit da napustis Bus.");
                DisablePlayerCheckpoint(playerid);
            }
         }
         BusrouteWest[playerid][0]++;
         if (strcmp(nextstop, "end", true) != 0)
         {
            format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~r~~n~~n~~g~Sledeca Stanica: %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~$890 completion bonus~n~~n~~w~/starteast da nastavis liniju";
            string2 = "~n~~g~End of Route~n~~n~~w~Molimo napustite Bus ili cekajte sledecu liniju";
            //BusrouteEast[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) == BusrouteGradska2[playerid][1])
            {
               if (BusrouteGradska2
  • != 0) GameTextForPlayer(i, string, 10000, 3);
                   else GameTextForPlayer(i, string2, 10000, 3);
                }
             }
             SafeGivePlayerMoney(playerid, 3);
             return 1;
          }
       }
Poslednja Izmena: Septembar 27, 2011, 15:21:23 POSLE PODNE od Aldin Begovic

ubaci ovo umesto onog postojeceg

else if(listitem == 1) // gore
            {
                if (BusrouteGradska2[playerid][0] == 12 )
               {
                  BusrouteGradska2[playerid][0] = 0;
               
               }
                if(BusrouteGradska2[playerid][0] == 0 && BusrouteGradska2[playerid][0] == 0)
                {
                  new playervehicleid = GetPlayerVehicleID(playerid);
                  if(IsABus(playervehicleid))
                  {
                     TogglePlayerControllable(playerid, 1);
                     GameTextForPlayer(playerid, "~g~Bus Route Started", 5000, 3);
                     SendClientMessage(playerid, COLOR_LIGHTRED, "---------Istocna Los Santos Bus Routa-----------");
                     SendBusRoute(playerid, 0);
                     SendClientMessage(playerid, COLOR_RED, " ");
                     SendClientMessage(playerid, COLOR_GREEN, "Crveni markeri ce biti postavljeni po ruti.");
                     SendClientMessage(playerid, COLOR_GREEN, "Vasa kompanija ce biti automatski reklamirana na sledecem stajanju igracima u blizini.");
                     BusrouteGradska2[playerid][0] = 1;
                     BusrouteGradska2[playerid][1] = playervehicleid;
                     OnPlayerEnterCheckpoint(playerid);
                     return 1;
                  }
                   else
                   {
                      SendClientMessage(playerid, COLOR_GREY, "Niste u busu!");
                   }
               }
               else
               {
                  SendClientMessage(playerid, COLOR_GREY, "Vec ste na ruti!");
               }
            }


ubaci to umesto onog koje imas... i nisam siguran, ali msm da i listitem treba da bude 2, al nisam siguran posto nzm sta ti to tacno povlaci... to bolje ovi iskusniji da ti kazu... al probaj sa onim...




nemoze nece oept mi pokazuje cp od druge rute  :'( :'( :'( :'( :'( :'( :'( :'( :(
zna li iko u cemu je problem
Poslednja Izmena: Septembar 27, 2011, 16:08:24 POSLE PODNE od Aldin Begovic

nisi namestio cp -ove
Respect: Gagi, Maki187, Phillips, TerminuS, Neno, Lepotic, [AL] K4[Я]!K3â,,¢, Gotti747

jesam namjestio cp

i siguran sam da su ispravni


if (BusrouteGradska2[playerid][0] != 0)
   {
      if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2)
      {
         new nextstop[64];
         BusrouteEast[playerid][0] = 0;
          switch(BusrouteGradska2[playerid][0])
          {
              case 1:
              {
               nextstop = "Stanica1";
                  SetPlayerCheckpoint(playerid, 1796.9752,-1932.6086,13.3864, 5.0);
               AdvertiseToPlayersAtBusStop(1796.9752,-1932.6086,13.3864, 0);
            }
            case 2:
            {
               nextstop = "Stanica2";
                SetPlayerCheckpoint(playerid, 2036.2096,-1080.7666,24.7474, 5.0);
               AdvertiseToPlayersAtBusStop(2036.2096,-1080.7666,24.7474, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 3:
            {
               nextstop = "Stanica3";
                SetPlayerCheckpoint(playerid, 2435.6726,-1189.3846,36.2629, 5.0);
               AdvertiseToPlayersAtBusStop(2435.6726,-1189.3846,36.2629, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 4:
            {
               nextstop = "Stanica4";
                SetPlayerCheckpoint(playerid, 2716.1799,-1446.2275,30.4526, 5.0);
               AdvertiseToPlayersAtBusStop( 2716.1799,-1446.2275,30.4526, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 5:
            {
               nextstop = "Stanica5";
                SetPlayerCheckpoint(playerid, 2664.4395,-1651.4447,10.8672, 5.0);
               AdvertiseToPlayersAtBusStop(2664.4395,-1651.4447,10.8672, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 6:
            {
               nextstop = "Stanica6";
                SetPlayerCheckpoint(playerid, 2763.0962,-1973.4396,13.5462, 5.0);
               AdvertiseToPlayersAtBusStop(2763.0962,-1973.4396,13.5462, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 7:
            {
               nextstop = "Stanica7";
                SetPlayerCheckpoint(playerid, 2316.2102,-2046.8090,13.5469, 5.0);
               AdvertiseToPlayersAtBusStop(2316.2102,-2046.8090,13.5469, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 8:
            {
               nextstop = "Stanica8";
                SetPlayerCheckpoint(playerid, 2222.4753,-1934.0110,13.5415, 5.0);
               AdvertiseToPlayersAtBusStop(2222.4753,-1934.0110,13.5415, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 9:
            {
               nextstop = "Stanica9";
                SetPlayerCheckpoint(playerid, 2077.2803,-1784.7175,13.5469, 5.0);
               AdvertiseToPlayersAtBusStop(2077.2803,-1784.7175,13.5469, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 10:
            {
               nextstop = "end";
                SetPlayerCheckpoint(playerid, 1805.2540,-1931.4181,13.3870, 5.0);
               AdvertiseToPlayersAtBusStop(1805.2540,-1931.4181,13.3870, 0);
               SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
               TogglePlayerControllable(playerid, 0);
               SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Ukrcavanje putnika.");
            }
            case 11:
            {
               nextstop = "end";
               TogglePlayerControllable(playerid, 0);
                   SendClientMessage(playerid, COLOR_YELLOW, "Bus linija zavrsena , Koristite /starteast ili /startwest za novu liniju.");
               SendClientMessage(playerid, COLOR_YELLOW, "Koristite /exit da napustis Bus.");
                DisablePlayerCheckpoint(playerid);
            }
         }
         BusrouteWest[playerid][0]++;
         if (strcmp(nextstop, "end", true) != 0)
         {
            format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~r~~n~~n~~g~Sledeca Stanica: %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~$890 completion bonus~n~~n~~w~/starteast da nastavis liniju";
            string2 = "~n~~g~End of Route~n~~n~~w~Molimo napustite Bus ili cekajte sledecu liniju";
            //BusrouteEast[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) == BusrouteGradska2[playerid][1])
            {
               if (BusrouteGradska2
  • != 0) GameTextForPlayer(i, string, 10000, 3);
                   else GameTextForPlayer(i, string2, 10000, 3);
                }
             }
             SafeGivePlayerMoney(playerid, 3);
             return 1;
          }
       }


nzm, ti to radis u dijalogu, ja sa tim nzm da baratam...

usput ovo sam primetio... (podebljao sam)

Citat}
         }
         BusrouteWest[playerid][0]++;
         if (strcmp(nextstop, "end", true) != 0)
         {
            format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~r~~n~~n~~g~Sledeca Stanica: %s", nextstop);
            format(string2, sizeof(string2), "~n~~n~~n~~n~~n~~n~~n~~g~Next Stop: %s", nextstop);
         }
         else

i jel ti gledas jel koja ti je ruta pocela po markerima (cpovima) ili po onome sto ti izadje ?

usput, probaj da busroutegradska 2 stavis na jedan a onu ispod na 2, da bi isli po redu, nzm jel to ima veze.. al probaj...

nadam se da ce uskoro doci neko ko stvarno zna kako to da resis :/

ok hvala ti na pomoci odo pokusat!!! ps ... sad kad izaberem gradska2 izbaci mi cp odma ispred mene i pita dali zelim da ucita drugi cp yes/no ???? stv nesto nije okk



SAD NECE NIKAKO !! odma isplati cim izaberem rutu sam nece sad ni starteast ni gradska2 odma me isplate cim izaberem cccccccccccc :((((((((((((((( pomozite ako neko zna u cemu je problem

jel ima rijesenje il nema ??
Poslednja Izmena: Septembar 28, 2011, 19:37:14 POSLE PODNE od Aldin Begovic