Event bug

Započeo TonySmith, Mart 14, 2019, 14:58:48 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Problem(error/warning): Imam problem sa eventom ovako kada ih previse kuca /join i onda se desi da nekog ne porta u vozilo par njih ali stvara auta i to mjesto bude zauzeto, takodje i kad ih se konekta na event 40+ ljudi baš bude ono puno vozila i tu pucaju vozila i kada neko izadje iz vozila i to vozilo pukne završi se event ne destroya to vozilo a takodje ne destroya vozilo od tih koje nije portalo na event i tako mi se samo bude više i više vozila.. :(
Dio skripte: Nepotrebno
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): Nepotrebno
Slika/video ingame problema(obavezno ako je ingame problem): https://imgur.com/a/E15jHAm

Citat: TonySmith poslato Mart 14, 2019, 14:58:48 POSLE PODNE
Problem(error/warning): Imam problem sa eventom ovako kada ih previse kuca /join i onda se desi da nekog ne porta u vozilo par(bukvalno ostanu i piše im da su joinali ste se ali ne porta ih u vozilo i ne priznaje ih kao da su na eventu ne killa ih na kraju) njih ali stvara auta i to mjesto bude zauzeto, takodje i kad ih se konekta na event 40+ ljudi baš bude ono puno vozila i tu pucaju vozila i kada neko izadje iz vozila i to vozilo pukne završi se event ne destroya to vozilo a takodje ne destroya vozilo od tih koje nije portalo na event i tako mi se samo bude više i više vozila.. :(
Dio skripte: Nepotrebno
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): Nepotrebno
Slika/video ingame problema(obavezno ako je ingame problem): https://imgur.com/a/E15jHAm

Ako ti nije problem da nam pokažeš kod kada igrač upise /join I sve vezano uz to.
You'll be always in my heart, the end and thanks for amazing times. #WeAreLords

[pawn]YCMD:join(playerid, params[],help)
{
    if(PokrenutEvent == 0) return SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Nijedan event nije pokrenut.");
    if(EventPort == 0) return SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Teleportovanje na event vise nije dostupno.");
    if(PlayerInfo[playerid][pTrazeniLevel] > 0) return SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Imate wanted level,ne mozete na event.");
   if(StavljeneLisice[playerid] > 0) return SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Imate lisice na rukama,ne mozete na event.");
   if(Zavezan[playerid] > 0) return SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Zavezani ste,ne mozete na event.");
   if(IgracTazovan[playerid] > 0) return SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Tazovani ste,ne mozete na event.");
   if(PlayerInfo[playerid][pIgraIgru] == 1) return SCM(playerid,-1,""PLAVA"BERP | "BELA"Djes poso drugar, prvo kucaj /nigricu!");
   if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Moras biti van vozila za koriscenje komande.");
   if(PlayerInfo[playerid][pZatvorenVreme] > 0) return SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"U zatvoru ste,ne mozete na event.");
   if(IgracNaEventu[playerid] == 1) return SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Vec prisustvujete ovom eventu.");
   if(EventPun == 1) return SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Trenutno su sva mesta  popunjena.");
   if(EventSlotovi == 50) return SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Vec prisustvuje 50 igraca ovom eventu.");
   if(PokrenutEvent == 1)
   {
      if(Vojska <= Teroristi)
      {
          Vojska++;
          EventSlotovi++;
          ResetPlayerWeapons(playerid);
          IgracNaEventu[playerid] = 1;
          IgracVojnik[playerid] = 1;
          SetPlayerPos(playerid, 2810.7412,2671.8472,10.8203);
          SetPlayerInterior(playerid, 0);
          SetPlayerVirtualWorld(playerid, 0);
          TogglePlayerControllable(playerid, 0);
          SetPlayerSkin(playerid, 287);
          g_GivePlayerWeapon(playerid, 24, 500);
             g_GivePlayerWeapon(playerid, 30, 500);
             g_GivePlayerWeapon(playerid, 33, 150);
               g_SetPlayerHealth(playerid, 99.0);
            SetPlayerArmour(playerid, 99.0);
            GameTextForPlayer(playerid, "~w~Spawnani ste kao~n~~g~vojnik!",5000,3);
            return 1;
        }
        if(Teroristi < Vojska)
      {
          Teroristi++;
          EventSlotovi++;
          ResetPlayerWeapons(playerid);
          IgracNaEventu[playerid] = 1;
          IgracTerorista[playerid] = 1;
          SetPlayerPos(playerid, 2810.0188,2809.3779,10.8203);
          SetPlayerInterior(playerid, 0);
          SetPlayerVirtualWorld(playerid, 0);
          TogglePlayerControllable(playerid, 0);
          SetPlayerSkin(playerid, 28);
          g_GivePlayerWeapon(playerid, 24, 500);
             g_GivePlayerWeapon(playerid, 31, 500);
             g_GivePlayerWeapon(playerid, 34, 150);
               g_SetPlayerHealth(playerid, 99.0);
            SetPlayerArmour(playerid, 99.0);
            GameTextForPlayer(playerid, "~w~Spawnani ste kao~n~~r~~h~~h~terorista!",5000,3);
            return 1;
        }
     }
   if(PokrenutEvent == 2)
   {
      ResetPlayerWeapons(playerid);
          EventSlotovi++;
          palicaekipa++;
         IgracNaEventu[playerid] = 1;
         IgracNaBaseball[playerid] = 1;
       new randt = random(sizeof(gRandomBaseballFight));
      SetPlayerPos(playerid, gRandomBaseballFight[randt][0], gRandomBaseballFight[randt][1], gRandomBaseballFight[randt][2]);
       TogglePlayerControllable(playerid, 0);
      g_GivePlayerWeapon(playerid, 5, 1);
           g_SetPlayerHealth(playerid, 99.0);
      SetPlayerArmour(playerid, 0);
         GameTextForPlayer(playerid, "~w~Sacekajte dok event pocne!",4000,3);
         return 1;
      }
      if(PokrenutEvent == 3)
   {
         new bool:found = false;
      for(new p = 0; p < sizeof(MestoInfTrka); p++)
      {
         if(MestoInfTrka[p] == INVALID_VEHICLE_ID)
         {
             EventVozilo[playerid] = CreateVehicle(411, PozicijeInfernusTrka[p][0],PozicijeInfernusTrka[p][1],PozicijeInfernusTrka[p][2],PozicijeInfernusTrka[p][3], 1, 1, 60000);
            StatusMotora(playerid, 2);
            new engine, lights, alarm, doors, bonnet, boot, objective;
            GetVehicleParamsEx(EventVozilo[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(EventVozilo[playerid], 1, lights, alarm, doors, bonnet, boot, objective);
            Fuel[EventVozilo[playerid]] = 999;
            PutPlayerInVehicle(playerid, EventVozilo[playerid], 0);
             SetPlayerInterior(playerid,0);
             SetPlayerVirtualWorld(playerid, 0);
             TogglePlayerControllable(playerid, 0);
             SetPlayerRaceCheckpoint(playerid,0,24.9107,2647.4929,57.7980,155.6169,2745.4888,54.9083,6);
             GameTextForPlayer(playerid, "~w~Sacekajte dok event pocne!",4000,3);
             IgracNaEventu[playerid] = 1;
             RCP[playerid] = 1;
                MestoInfTrka[p] = EventVozilo[playerid];
            found = true;
             break;
            }
      }
      if(!found)
      {
         SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Nazalost,sva mesta na infernus utrci su popunjena.");
         EventPun = 1;
        }
        return 1;
      }
     if(PokrenutEvent == 4)
   {
         new bool:found = false;
      for(new p = 0; p < sizeof(MestoKartTrka); p++)
      {
         if(MestoKartTrka[p] == INVALID_VEHICLE_ID)
         {
             EventVozilo[playerid] = CreateVehicle(571, PozicijeKartingTrka[p][0],PozicijeKartingTrka[p][1],PozicijeKartingTrka[p][2],PozicijeKartingTrka[p][3], 1, 1, 60000);
                StatusMotora(playerid, 2);
            Fuel[EventVozilo[playerid]] = 999;
                new engine, lights, alarm, doors, bonnet, boot, objective;
            GetVehicleParamsEx(EventVozilo[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(EventVozilo[playerid], 1, lights, alarm, doors, bonnet, boot, objective);
            PutPlayerInVehicle(playerid, EventVozilo[playerid], 0);
             SetPlayerInterior(playerid,0);
             SetPlayerVirtualWorld(playerid, 0);
             TogglePlayerControllable(playerid, 0);
             SetPlayerRaceCheckpoint(playerid,0,1477.3098,1331.0172,10.3823,1485.4086,1662.9915,10.3759,6);
             IgracNaEventu[playerid] = 1;
             RCP[playerid] = 12;
                MestoKartTrka[p] = EventVozilo[playerid];
            found = true;
             break;
            }
      }
      if(!found)
      {
         SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Nazalost,sva mesta na karting utrci su popunjena.");
         EventPun = 1;
        }
        return 1;
      }
      if(PokrenutEvent == 5)
   {
         new bool:found = false;
      for(new p = 0; p < sizeof(MestoSFTrka); p++)
      {
         if(MestoSFTrka[p] == INVALID_VEHICLE_ID)
         {
             EventVozilo[playerid] = CreateVehicle(522, PozicijeSFTrka[p][0],PozicijeSFTrka[p][1],PozicijeSFTrka[p][2],PozicijeSFTrka[p][3], 1, 1, 60000);
                StatusMotora(playerid, 2);
            Fuel[EventVozilo[playerid]] = 999;
                new engine, lights, alarm, doors, bonnet, boot, objective;
            GetVehicleParamsEx(EventVozilo[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(EventVozilo[playerid], 1, lights, alarm, doors, bonnet, boot, objective);
            PutPlayerInVehicle(playerid, EventVozilo[playerid], 0);
             SetPlayerInterior(playerid,0);
             SetPlayerVirtualWorld(playerid, 0);
             TogglePlayerControllable(playerid, 0);
             RCP[playerid] = 26;
                  SetPlayerRaceCheckpoint(playerid,0,-2664.8594,1214.0382,55.0007,-2585.0891,1131.6554,54.9883,6);
             IgracNaEventu[playerid] = 1;
                MestoSFTrka[p] = EventVozilo[playerid];
            found = true;
             break;
            }
      }
      if(!found)
      {
         SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Nazalost,sva mesta na San Fierro trci su popunjena.");
         EventPun = 1;
        }
        return 1;
      }
      if(PokrenutEvent == 6)
   {
       EventSlotovi++;
         ResetPlayerWeapons(playerid);
      IgracNaEventu[playerid] = 1;
      IgracNaMaraton[playerid] = 1;
      Maratonci++;
       new randt = random(sizeof(gRandomMaraton));
      SetPlayerPos(playerid, gRandomMaraton[randt][0], gRandomMaraton[randt][1], gRandomMaraton[randt][2]);
        TogglePlayerControllable(playerid, 0);
      if(PlayerInfo[playerid][pSex] == 1) { SetPlayerSkin(playerid,96); }
       if(PlayerInfo[playerid][pSex] == 2) { SetPlayerSkin(playerid,90); }
           g_SetPlayerHealth(playerid, 99.0);
        SetPlayerArmour(playerid, 0);
      RCP[playerid] = 41;
       SetPlayerRaceCheckpoint(playerid,0,-2752.1672,2352.2893,73.0014,-1889.6335,2357.2795,44.7861,6);
         GameTextForPlayer(playerid, "~w~Sacekajte dok maraton ne pocne!",4000,3);
        return 1;
      }
      if(PokrenutEvent == 7)
   {
       new bool:found = false;
      for(new p = 0; p < sizeof(MestoGliserTrka); p++)
      {
         if(MestoGliserTrka[p] == INVALID_VEHICLE_ID)
         {
             EventVozilo[playerid] = CreateVehicle(493, PozicijeGliserTrka[p][0],PozicijeGliserTrka[p][1],PozicijeGliserTrka[p][2],PozicijeGliserTrka[p][3], 1, 1, 60000);
                StatusMotora(playerid, 2);
                Fuel[EventVozilo[playerid]] = 999;
                new engine, lights, alarm, doors, bonnet, boot, objective;
            GetVehicleParamsEx(EventVozilo[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(EventVozilo[playerid], 1, lights, alarm, doors, bonnet, boot, objective);
            PutPlayerInVehicle(playerid, EventVozilo[playerid], 0);
             SetPlayerInterior(playerid,0);
             SetPlayerVirtualWorld(playerid, 0);
             TogglePlayerControllable(playerid, 0);
             RCP[playerid] = 49;
                  SetPlayerRaceCheckpoint(playerid,0,559.7773,532.3160,-0.6979,483.0446,488.7364,-0.5592,6);
             IgracNaEventu[playerid] = 1;
                MestoGliserTrka[p] = EventVozilo[playerid];
            found = true;
             break;
            }
      }
      if(!found)
      {
         SCM(playerid,-1,""CRVENA"[BE:RPG] "BELA"Nazalost,sva mesta na Gliser trci su popunjena.");
         EventPun = 1;
        }
        return 1;
      }
     return 1;
}[/pawn]