Dupliciranje vozila

Započeo TonySmith, Mart 20, 2019, 15:38:55 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Problem(error/warning): Dupliciranje vozila znači koristim UnderPoint mod ubacio sam u njega pri diskonektu uništavanja vozila to vidite dole kako je napravljeno i pri loginu stvaranje vozila takodje to vidite dole kako je napravljeno, znači duplicira mi vozila od lika koji je loginovan ali jedno je njegovo pravo a ostali bez id-a kad ulaziš u njih bukvalno ne piše ništa..

Dio skripte: [pawn]
public OnGameModeInit()
{
   IzlozbenoAuto = CreateVehicle(AutoSalon[AutoModel][0], AIZLOZBENO_X,AIZLOZBENO_Y,AIZLOZBENO_Z,AIZLOZBENO_A, 2, 2, 30000);
   for(new i = 0; i < sizeof(VoziloInfo); i++)
   {
      VoziloInfo[vID] = -1;
   }
   for(new i = 0; i < sizeof(MotorInfo); i++)
   {
      MotorInfo[mID] = -1;
   }
   for(new i = 0; i < sizeof(AvionInfo); i++)
   {
      AvionInfo[avID] = -1;
   }
   for(new i = 0; i < sizeof(PlovilaInfo); i++)
   {
      PlovilaInfo[plID] = -1;
   }[/pawn]

Dio skripte: [pawn]    if(UlogovanProvera[playerid] == 1)
    {
      if(PlayerInfo[playerid][pPosedovanjeAuta] != -1)
      {
         DestroyVehicle(VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta]][vID]);
         SacuvajVozilo(PlayerInfo[playerid][pPosedovanjeAuta]);
         VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta]][vID] = -1;
      }
      if(PlayerInfo[playerid][pPosedovanjeAuta2] != -1)
      {
         DestroyVehicle(VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta2]][vID]);
         SacuvajVozilo(PlayerInfo[playerid][pPosedovanjeAuta2]);
         VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta2]][vID] = -1;
      }
      if(PlayerInfo[playerid][pPosedovanjeMotora] != -1)
      {
         DestroyVehicle(MotorInfo[PlayerInfo[playerid][pPosedovanjeMotora]][mID]);
         SacuvajMotor(PlayerInfo[playerid][pPosedovanjeMotora]);
         MotorInfo[PlayerInfo[playerid][pPosedovanjeMotora]][mID] = -1;
      }
      if(PlayerInfo[playerid][pPosedovanjeAviona] != -1)
      {
         DestroyVehicle(AvionInfo[PlayerInfo[playerid][pPosedovanjeAviona]][avID]);
         SacuvajAvione(PlayerInfo[playerid][pPosedovanjeAviona]);
         AvionInfo[PlayerInfo[playerid][pPosedovanjeAviona]][avID] = -1;
      }
      if(PlayerInfo[playerid][pPosedovanjePlovila] != -1)
      {
         DestroyVehicle(PlovilaInfo[PlayerInfo[playerid][pPosedovanjePlovila]][plID]);
         SacuvajPlovila(PlayerInfo[playerid][pPosedovanjePlovila]);
         PlovilaInfo[PlayerInfo[playerid][pPosedovanjePlovila]][plID] = -1;
      }
   }[/pawn]
Dio skripte: [pawn]      case DIALOG_LOGIN:
       {
          if(UlogovanProvera[playerid] == 1)
          {
            if(PlayerInfo[playerid][pPosedovanjeAuta] != -1)
            {
               DestroyVehicle(VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta]][vID]);
               SacuvajVozilo(PlayerInfo[playerid][pPosedovanjeAuta]);
               VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta]][vID] = -1;
            }
            if(PlayerInfo[playerid][pPosedovanjeAuta2] != -1)
            {
               DestroyVehicle(VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta2]][vID]);
               SacuvajVozilo(PlayerInfo[playerid][pPosedovanjeAuta2]);
               VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta2]][vID] = -1;
            }
            if(PlayerInfo[playerid][pPosedovanjeMotora] != -1)
            {
               DestroyVehicle(MotorInfo[PlayerInfo[playerid][pPosedovanjeMotora]][mID]);
               SacuvajMotor(PlayerInfo[playerid][pPosedovanjeMotora]);
               MotorInfo[PlayerInfo[playerid][pPosedovanjeMotora]][mID] = -1;
            }
            if(PlayerInfo[playerid][pPosedovanjeAviona] != -1)
            {
               DestroyVehicle(AvionInfo[PlayerInfo[playerid][pPosedovanjeAviona]][avID]);
               SacuvajAvione(PlayerInfo[playerid][pPosedovanjeAviona]);
               AvionInfo[PlayerInfo[playerid][pPosedovanjeAviona]][avID] = -1;
            }
            if(PlayerInfo[playerid][pPosedovanjePlovila] != -1)
            {
               DestroyVehicle(PlovilaInfo[PlayerInfo[playerid][pPosedovanjePlovila]][plID]);
               SacuvajPlovila(PlayerInfo[playerid][pPosedovanjePlovila]);
               PlovilaInfo[PlayerInfo[playerid][pPosedovanjePlovila]][plID] = -1;
            }
         }
          if(!response) return Kick(playerid);
          if(response)
          {
            if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
             {
                INI_ParseFile(Korisnici(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    new rand = random(sizeof(RandomSpawn2));
               SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], RandomSpawn2[rand][0], RandomSpawn2[rand][1], RandomSpawn2[rand][2], RandomSpawn2[rand][3], 0, 0, 0, 0, 0, 0);
               SetPlayerFacingAngle(playerid, 180.0);
               SpawnPlayer(playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pNovacDzep]);
               SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pBorbeniStil]);
               SetCameraBehindPlayer(playerid);
               StopAudioStreamForPlayer(playerid);
                UlogovanProvera[playerid] = 1;
                OcistiChat(playerid, 10);
               new string[256];
               new exp = (PlayerInfo[playerid][pLevel] * 2) + 2;
                  format(string,sizeof(string),"*Dobrodosao %s na server,lepo je opet videti te na serveru!", GetName(playerid));
               SCM(playerid, -1,string);
               format(string,sizeof(string),""ZUTA"*Tvoj dosadasnji zivot: Level[%d] | Novac[%d] | Respekti[%d/%d] | Sati Igre[%d]", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pNovacDzep], PlayerInfo[playerid][pExp], exp, PlayerInfo[playerid][pSatiIgre]);
                 SCM(playerid,-1,string);
                 SCM(playerid, 0x33CCFFAA , RandomPoslovice[random(sizeof(RandomPoslovice))]);
               new dan, mesec, godina, sat, minut, sekund;
               getdate(godina, mesec, dan);
               gettime(sat, minut, sekund);
                     format(string,sizeof(string),""BELA"*Sada je: %d:%d h | Datum: %d.%d.%d", sat, minut, dan, mesec, godina);
               SCM(playerid, -1, string);
                    if(PlayerInfo[playerid][pTutorial] == 0)
               {
                   SCM(playerid,-1,"[BE:RP]: "PLAVA"Niste zavrsili registraciju ni sagledali tutorail pa ste vraceni na ponovnu registraciju!");
                  ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, ""BELA"Dali ste musko ili zensko?", ""PLAVA"- "BELA"Musko\n"PLAVA"- "BELA"Zensko", "Dalje", "Odustani");
                   SetPlayerCameraPos(playerid, 1657.39, -1856.75, 45.71); SetPlayerCameraLookAt(playerid, 1661.96, -1857.56, 43.85);
                   SetPlayerInterior(playerid, 0); TogglePlayerControllable(playerid, 0); SetPlayerPos(playerid, 1693.3690,-1867.5784,13.5412);
                   SetPlayerFacingAngle(playerid, 139.7829); SetPlayerVirtualWorld(playerid, 5446);
                }
             }
             else
             {
                new loginstring[256],loginname[64];
               GetPlayerName(playerid,loginname,sizeof(loginname));
               format(loginstring,sizeof(loginstring),""BELA"________________________________________________\n\n"ORANGE"Dobrodosao na Balkan Emorex RPG\n\n"BELA"Vas Ime i Prezime: "ORANGE"%s\n"BELA"Vas korisnicki racun je registrovan na serveru\nUnesite vas tacan password, imate "ORANGE"3 pokusaja...\n\n"BELA"Ukoliko pogresite "ORANGE"3 "BELA"puta pass bicete banovani!\n"BELA"",loginname);
               ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Login","Izlaz");
                LoginPokusaji[playerid] += 1;
                SCMF(playerid,-1,"[BE:RP] "CRVENA"Pogresna lozinka | Preostalo Pokusaja: %d/3!",LoginPokusaji[playerid]);
                if(LoginPokusaji[playerid] == 3) { StatusKonekta(playerid, 3); }
            }
            /////////////////////////////////////////////////////////
            new szPlayer[MAX_PLAYER_NAME];
            GetPlayerName(playerid, szPlayer, MAX_PLAYER_NAME);
              if(PlayerInfo[playerid][pPosedovanjeAuta] != -1) {

               new i = PlayerInfo[playerid][pPosedovanjeAuta];
               new vFile[50];
               format(vFile, sizeof(vFile), AUTO_FILE, i);
               if(fexist(vFile)) {
                  INI_ParseFile(vFile, "UcitajVozila", .bExtra = true, .extra = i);

                  if(strcmp(szPlayer, VoziloInfo[vVlasnik], true) == 0) {
                     VoziloInfo[vID] = CreateVehicle(VoziloInfo[vModel],VoziloInfo[vPozX],VoziloInfo[vPozY],VoziloInfo[vPozZ],VoziloInfo[vPozA],VoziloInfo[vBoja1],VoziloInfo[vBoja2],30000);
                     VoziloInfo[vSpawn] = 0;
                     VoziloInfo[vMod][0] = -1;
                     INI_ParseFile(vFile, "UcitajTune", .bExtra = true, .extra = i);
                     for(new id = 1; id <= 17; id++)
                     {
                        if(VoziloInfo[vMod][id]!=0) { AddVehicleComponent(VoziloInfo[vID],VoziloInfo[vMod][id]); }
                     }
                     if(VoziloInfo[vMod][0]>=0) { ChangeVehiclePaintjob(VoziloInfo[vID],VoziloInfo[vMod][0]); }
                  }
               }
            }
            if(PlayerInfo[playerid][pPosedovanjeAuta2] != -1)
            {
               new i = PlayerInfo[playerid][pPosedovanjeAuta2];
               new vFile[50];
               format(vFile, sizeof(vFile), AUTO_FILE, i);
               if(fexist(vFile))
               {
                  INI_ParseFile(vFile, "UcitajVozila", .bExtra = true, .extra = i);
                  if(strcmp(szPlayer, VoziloInfo[vVlasnik]) == 0) {
                     VoziloInfo[vID] = CreateVehicle(VoziloInfo[vModel],VoziloInfo[vPozX],VoziloInfo[vPozY],VoziloInfo[vPozZ],VoziloInfo[vPozA],VoziloInfo[vBoja1],VoziloInfo[vBoja2],30000);
                     VoziloInfo[vSpawn] = 0;
                     VoziloInfo[vMod][0] = -1;
                     INI_ParseFile(vFile, "UcitajTune", .bExtra = true, .extra = i);
                     for(new id = 1; id <= 17; id++)
                     {
                        if(VoziloInfo[vMod][id]!=0) { AddVehicleComponent(VoziloInfo[vID],VoziloInfo[vMod][id]); }
                     }
                     if(VoziloInfo[vMod][0]>=0) { ChangeVehiclePaintjob(VoziloInfo[vID],VoziloInfo[vMod][0]); }
                  }
               }
            }
            if(PlayerInfo[playerid][pPosedovanjeMotora] != -1)
            {
               new i = PlayerInfo[playerid][pPosedovanjeMotora];
               new mFile[50];
               format(mFile, sizeof(mFile), MOTOR_FILE, i);
               if(fexist(mFile))
               {
                  INI_ParseFile(mFile, "UcitajMotore", .bExtra = true, .extra = i);
                  if(strcmp(szPlayer, MotorInfo[mVlasnik]) == 0) {
                     MotorInfo[mID] = CreateVehicle(MotorInfo[mModel],MotorInfo[mPozX],MotorInfo[mPozY],MotorInfo[mPozZ],MotorInfo[mPozA],MotorInfo[mBoja1],MotorInfo[mBoja2],30000);
                     MotorInfo[mSpawn] = 0;
                  }
               }
            }
            ////////////////////////AVIONI UCITAVANJE////////////////////////////////////////
            if(PlayerInfo[playerid][pPosedovanjeAviona] != -1)
            {
               new i = PlayerInfo[playerid][pPosedovanjeAviona];
               new avFile[50];
               format(avFile, sizeof(avFile), AVION_FILE, i);
               if(fexist(avFile))
               {
                  INI_ParseFile(avFile, "UcitajAvione", .bExtra = true, .extra = i);
                  if(strcmp(szPlayer, AvionInfo[avVlasnik]) == 0) {
                     AvionInfo[avID] = CreateVehicle(AvionInfo[avModel],AvionInfo[avPozX],AvionInfo[avPozY],AvionInfo[avPozZ],AvionInfo[avPozA],AvionInfo[avBoja1],AvionInfo[avBoja2],30000);
                     AvionInfo[avSpawn] = 0;
                  }
               }
            }
            //////////////////////PLOVILA UCITAVANJE//////////////////////////////////////////
            if(PlayerInfo[playerid][pPosedovanjePlovila] != -1)
            {
               new i = PlayerInfo[playerid][pPosedovanjePlovila];
               new plFile[50];
               format(plFile, sizeof(plFile), PLOVILA_FILE, i);
               if(fexist(plFile))
               {
                  INI_ParseFile(plFile, "UcitajPlovila", .bExtra = true, .extra = i);
                  if(strcmp(szPlayer, PlovilaInfo[plVlasnik]) == 0) {
                     PlovilaInfo[plID] = CreateVehicle(PlovilaInfo[plModel],PlovilaInfo[plPozX],PlovilaInfo[plPozY],PlovilaInfo[plPozZ],PlovilaInfo[plPozA],PlovilaInfo[plBoja1],PlovilaInfo[plBoja2],30000);
                     PlovilaInfo[plSpawn] = 0;
                  }
               }
            }[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]vaš odgovor[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): link slike




DIALOG_LOGIN potpun
[pawn]      case DIALOG_LOGIN:
       {
          if(UlogovanProvera[playerid] == 1)
          {
            if(PlayerInfo[playerid][pPosedovanjeAuta] != -1)
            {
               DestroyVehicle(VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta]][vID]);
               SacuvajVozilo(PlayerInfo[playerid][pPosedovanjeAuta]);
               VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta]][vID] = -1;
            }
            if(PlayerInfo[playerid][pPosedovanjeAuta2] != -1)
            {
               DestroyVehicle(VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta2]][vID]);
               SacuvajVozilo(PlayerInfo[playerid][pPosedovanjeAuta2]);
               VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta2]][vID] = -1;
            }
            if(PlayerInfo[playerid][pPosedovanjeMotora] != -1)
            {
               DestroyVehicle(MotorInfo[PlayerInfo[playerid][pPosedovanjeMotora]][mID]);
               SacuvajMotor(PlayerInfo[playerid][pPosedovanjeMotora]);
               MotorInfo[PlayerInfo[playerid][pPosedovanjeMotora]][mID] = -1;
            }
            if(PlayerInfo[playerid][pPosedovanjeAviona] != -1)
            {
               DestroyVehicle(AvionInfo[PlayerInfo[playerid][pPosedovanjeAviona]][avID]);
               SacuvajAvione(PlayerInfo[playerid][pPosedovanjeAviona]);
               AvionInfo[PlayerInfo[playerid][pPosedovanjeAviona]][avID] = -1;
            }
            if(PlayerInfo[playerid][pPosedovanjePlovila] != -1)
            {
               DestroyVehicle(PlovilaInfo[PlayerInfo[playerid][pPosedovanjePlovila]][plID]);
               SacuvajPlovila(PlayerInfo[playerid][pPosedovanjePlovila]);
               PlovilaInfo[PlayerInfo[playerid][pPosedovanjePlovila]][plID] = -1;
            }
         }
          if(!response) return Kick(playerid);
          if(response)
          {
            if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
             {
                INI_ParseFile(Korisnici(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    new rand = random(sizeof(RandomSpawn2));
               SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], RandomSpawn2[rand][0], RandomSpawn2[rand][1], RandomSpawn2[rand][2], RandomSpawn2[rand][3], 0, 0, 0, 0, 0, 0);
               SetPlayerFacingAngle(playerid, 180.0);
               SpawnPlayer(playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pNovacDzep]);
               SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pBorbeniStil]);
               SetCameraBehindPlayer(playerid);
               StopAudioStreamForPlayer(playerid);
                UlogovanProvera[playerid] = 1;
                OcistiChat(playerid, 10);
               new string[256];
               new exp = (PlayerInfo[playerid][pLevel] * 2) + 2;
                  format(string,sizeof(string),"*Dobrodosao %s na server,lepo je opet videti te na serveru!", GetName(playerid));
               SCM(playerid, -1,string);
               format(string,sizeof(string),""ZUTA"*Tvoj dosadasnji zivot: Level[%d] | Novac[%d] | Respekti[%d/%d] | Sati Igre[%d]", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pNovacDzep], PlayerInfo[playerid][pExp], exp, PlayerInfo[playerid][pSatiIgre]);
                 SCM(playerid,-1,string);
                 SCM(playerid, 0x33CCFFAA , RandomPoslovice[random(sizeof(RandomPoslovice))]);
               new dan, mesec, godina, sat, minut, sekund;
               getdate(godina, mesec, dan);
               gettime(sat, minut, sekund);
                     format(string,sizeof(string),""BELA"*Sada je: %d:%d h | Datum: %d.%d.%d", sat, minut, dan, mesec, godina);
               SCM(playerid, -1, string);
                    if(PlayerInfo[playerid][pTutorial] == 0)
               {
                   SCM(playerid,-1,"[BE:RP]: "PLAVA"Niste zavrsili registraciju ni sagledali tutorail pa ste vraceni na ponovnu registraciju!");
                  ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, ""BELA"Dali ste musko ili zensko?", ""PLAVA"- "BELA"Musko\n"PLAVA"- "BELA"Zensko", "Dalje", "Odustani");
                   SetPlayerCameraPos(playerid, 1657.39, -1856.75, 45.71); SetPlayerCameraLookAt(playerid, 1661.96, -1857.56, 43.85);
                   SetPlayerInterior(playerid, 0); TogglePlayerControllable(playerid, 0); SetPlayerPos(playerid, 1693.3690,-1867.5784,13.5412);
                   SetPlayerFacingAngle(playerid, 139.7829); SetPlayerVirtualWorld(playerid, 5446);
                }
             }
             else
             {
                new loginstring[256],loginname[64];
               GetPlayerName(playerid,loginname,sizeof(loginname));
               format(loginstring,sizeof(loginstring),""BELA"________________________________________________\n\n"ORANGE"Dobrodosao na Balkan Emorex RPG\n\n"BELA"Vas Ime i Prezime: "ORANGE"%s\n"BELA"Vas korisnicki racun je registrovan na serveru\nUnesite vas tacan password, imate "ORANGE"3 pokusaja...\n\n"BELA"Ukoliko pogresite "ORANGE"3 "BELA"puta pass bicete banovani!\n"BELA"",loginname);
               ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Login","Izlaz");
                LoginPokusaji[playerid] += 1;
                SCMF(playerid,-1,"[BE:RP] "CRVENA"Pogresna lozinka | Preostalo Pokusaja: %d/3!",LoginPokusaji[playerid]);
                if(LoginPokusaji[playerid] == 3) { StatusKonekta(playerid, 3); }
            }
            /////////////////////////////////////////////////////////
            new szPlayer[MAX_PLAYER_NAME];
            GetPlayerName(playerid, szPlayer, MAX_PLAYER_NAME);
              if(PlayerInfo[playerid][pPosedovanjeAuta] != -1) {

               new i = PlayerInfo[playerid][pPosedovanjeAuta];
               new vFile[50];
               format(vFile, sizeof(vFile), AUTO_FILE, i);
               if(fexist(vFile)) {
                  INI_ParseFile(vFile, "UcitajVozila", .bExtra = true, .extra = i);

                  if(strcmp(szPlayer, VoziloInfo[vVlasnik], true) == 0) {
                     VoziloInfo[vID] = CreateVehicle(VoziloInfo[vModel],VoziloInfo[vPozX],VoziloInfo[vPozY],VoziloInfo[vPozZ],VoziloInfo[vPozA],VoziloInfo[vBoja1],VoziloInfo[vBoja2],30000);
                     VoziloInfo[vSpawn] = 0;
                     VoziloInfo[vMod][0] = -1;
                     INI_ParseFile(vFile, "UcitajTune", .bExtra = true, .extra = i);
                     for(new id = 1; id <= 17; id++)
                     {
                        if(VoziloInfo[vMod][id]!=0) { AddVehicleComponent(VoziloInfo[vID],VoziloInfo[vMod][id]); }
                     }
                     if(VoziloInfo[vMod][0]>=0) { ChangeVehiclePaintjob(VoziloInfo[vID],VoziloInfo[vMod][0]); }
                  }
               }
            }
            if(PlayerInfo[playerid][pPosedovanjeAuta2] != -1)
            {
               new i = PlayerInfo[playerid][pPosedovanjeAuta2];
               new vFile[50];
               format(vFile, sizeof(vFile), AUTO_FILE, i);
               if(fexist(vFile))
               {
                  INI_ParseFile(vFile, "UcitajVozila", .bExtra = true, .extra = i);
                  if(strcmp(szPlayer, VoziloInfo[vVlasnik]) == 0) {
                     VoziloInfo[vID] = CreateVehicle(VoziloInfo[vModel],VoziloInfo[vPozX],VoziloInfo[vPozY],VoziloInfo[vPozZ],VoziloInfo[vPozA],VoziloInfo[vBoja1],VoziloInfo[vBoja2],30000);
                     VoziloInfo[vSpawn] = 0;
                     VoziloInfo[vMod][0] = -1;
                     INI_ParseFile(vFile, "UcitajTune", .bExtra = true, .extra = i);
                     for(new id = 1; id <= 17; id++)
                     {
                        if(VoziloInfo[vMod][id]!=0) { AddVehicleComponent(VoziloInfo[vID],VoziloInfo[vMod][id]); }
                     }
                     if(VoziloInfo[vMod][0]>=0) { ChangeVehiclePaintjob(VoziloInfo[vID],VoziloInfo[vMod][0]); }
                  }
               }
            }
            if(PlayerInfo[playerid][pPosedovanjeMotora] != -1)
            {
               new i = PlayerInfo[playerid][pPosedovanjeMotora];
               new mFile[50];
               format(mFile, sizeof(mFile), MOTOR_FILE, i);
               if(fexist(mFile))
               {
                  INI_ParseFile(mFile, "UcitajMotore", .bExtra = true, .extra = i);
                  if(strcmp(szPlayer, MotorInfo[mVlasnik]) == 0) {
                     MotorInfo[mID] = CreateVehicle(MotorInfo[mModel],MotorInfo[mPozX],MotorInfo[mPozY],MotorInfo[mPozZ],MotorInfo[mPozA],MotorInfo[mBoja1],MotorInfo[mBoja2],30000);
                     MotorInfo[mSpawn] = 0;
                  }
               }
            }
            ////////////////////////AVIONI UCITAVANJE////////////////////////////////////////
            if(PlayerInfo[playerid][pPosedovanjeAviona] != -1)
            {
               new i = PlayerInfo[playerid][pPosedovanjeAviona];
               new avFile[50];
               format(avFile, sizeof(avFile), AVION_FILE, i);
               if(fexist(avFile))
               {
                  INI_ParseFile(avFile, "UcitajAvione", .bExtra = true, .extra = i);
                  if(strcmp(szPlayer, AvionInfo[avVlasnik]) == 0) {
                     AvionInfo[avID] = CreateVehicle(AvionInfo[avModel],AvionInfo[avPozX],AvionInfo[avPozY],AvionInfo[avPozZ],AvionInfo[avPozA],AvionInfo[avBoja1],AvionInfo[avBoja2],30000);
                     AvionInfo[avSpawn] = 0;
                  }
               }
            }
            //////////////////////PLOVILA UCITAVANJE//////////////////////////////////////////
            if(PlayerInfo[playerid][pPosedovanjePlovila] != -1)
            {
               new i = PlayerInfo[playerid][pPosedovanjePlovila];
               new plFile[50];
               format(plFile, sizeof(plFile), PLOVILA_FILE, i);
               if(fexist(plFile))
               {
                  INI_ParseFile(plFile, "UcitajPlovila", .bExtra = true, .extra = i);
                  if(strcmp(szPlayer, PlovilaInfo[plVlasnik]) == 0) {
                     PlovilaInfo[plID] = CreateVehicle(PlovilaInfo[plModel],PlovilaInfo[plPozX],PlovilaInfo[plPozY],PlovilaInfo[plPozZ],PlovilaInfo[plPozA],PlovilaInfo[plBoja1],PlovilaInfo[plBoja2],30000);
                     PlovilaInfo[plSpawn] = 0;
                  }
               }
            }


            ///////////////////////////////////////////////////////////////////////////////////
            if(PlayerInfo[playerid][pAdmin] > 0)
              {
                if(PlayerInfo[playerid][pAdmin] > 0 && strcmp(AdminInfo[PlayerInfo[playerid][pAdminID]][aAdmin], ImeIgraca(playerid), false)) AdminIzbacen[playerid] = 1;
               }
               if(AdminIzbacen[playerid] == 1)
            {
               strmid(AdminInfo[PlayerInfo[playerid][pAdminID]][aAdmin], "Niko", 0, strlen("Niko"), 255);
               AdminInfo[PlayerInfo[playerid][pAdminID]][aRank] = 0;
               AdminInfo[PlayerInfo[playerid][pAdminID]][aNeaktivnost] = 0;
               SacuvajAdmine();
               AdminIzbacen[playerid] = 0;
               PlayerInfo[playerid][pAdmin] = 0;
                PlayerInfo[playerid][pAdminID] = 0;
               SCM(playerid, SVIJETLOPLAVA, "* Vi ste smjenjeni sa pozicije admina! (POSTOJI MOGUCNOST GRESKE)");
            }
            if(PlayerInfo[playerid][pGM] > 0)
              {
                if(PlayerInfo[playerid][pGM] > 0 && strcmp(GameMasterInfo[PlayerInfo[playerid][pGameMasterID]][gmGameMaster], ImeIgraca(playerid), false)) GameMasterIzbacen[playerid] = 1;
               }
               if(GameMasterIzbacen[playerid] == 1)
            {
                strmid(GameMasterInfo[PlayerInfo[playerid][pGameMasterID]][gmGameMaster], "Niko", 0, strlen("Niko"), 255);
               GameMasterInfo[PlayerInfo[playerid][pGameMasterID]][gmRank] = 0;
               GameMasterInfo[PlayerInfo[playerid][pGameMasterID]][gmNeaktivnost] = 0;
               SacuvajGameMastere();
               GameMasterIzbacen[playerid] = 0;
               PlayerInfo[playerid][pGM] = 0;
                PlayerInfo[playerid][pGameMasterID] = 0;
               SCM(playerid, GSZelena, ""CRVENA"[!] "BELA"Vi ste smjenjeni sa pozicije gamemastera (POSTOJI MOGUCNOST GRESKE)");
            }
            new string[256];
            if (PlayerInfo[playerid][pAdmin] >= 1)
            {
               format(string, sizeof(string), "BE : Logiran si kao level %d Admina.",PlayerInfo[playerid][pAdmin]);
               SendClientMessage(playerid, SVIJETLOPLAVA,string);
               AdminInfo[PlayerInfo[playerid][pAdminID]][aNeaktivnost] = 0;
                 SacuvajAdmine();
               SCMF(playerid, SVIJETLOPLAVA, "BE : Vi ste admin na slotu %d,vas admin level je %d.", PlayerInfo[playerid][pAdminID], AdminInfo[PlayerInfo[playerid][pAdminID]][aRank]);
              }
              if (PlayerInfo[playerid][pGM] >= 1)
            {
                  format(string, sizeof(string), "BE : Logiran si kao level %d GameMastera.",PlayerInfo[playerid][pGM]);
               SendClientMessage(playerid, GSZelena,string);
                GameMasterInfo[PlayerInfo[playerid][pGameMasterID]][gmNeaktivnost] = 0;
                SacuvajGameMastere();
                SCMF(playerid, GSZelena, ""CRVENA"[!] "BELA"Vi ste gamemaster na slotu %d,vas helper level je %d.", PlayerInfo[playerid][pGameMasterID], GameMasterInfo[PlayerInfo[playerid][pGameMasterID]][gmRank]);
            }
            return 1;
          }
       }
    }
    return 1;
}[/pawn]

Pri loginu mi stvara vozila znači kada se igrač loginuje da je veći id primjer 15-20 tako negdje ono mu nareda 3 vozila ali 1 vozilo mu je samo pravo ta 3 što dodju dodju bez id-a bez ičega bukvalno ko /avozilo :)

Pa jel brises ti vozila na disconnectu? Posto ovde ne vidim nigde kod za brisanje tog il sam slep il nisi stavio

[pawn]
// proveravas da li je igrac ulogovan i da li poseduje vozila a nisi mu ni account ucitovao?
case DIALOG_LOGIN:
    {
    if(UlogovanProvera[playerid] == 1)
    {
if(PlayerInfo[playerid][pPosedovanjeAuta] != -1)
{
DestroyVehicle(VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta]][vID]);
SacuvajVozilo(PlayerInfo[playerid][pPosedovanjeAuta]);
VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta]][vID] = -1;
}
if(PlayerInfo[playerid][pPosedovanjeAuta2] != -1)
{
DestroyVehicle(VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta2]][vID]);
SacuvajVozilo(PlayerInfo[playerid][pPosedovanjeAuta2]);
VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta2]][vID] = -1;
}
if(PlayerInfo[playerid][pPosedovanjeMotora] != -1)
{
DestroyVehicle(MotorInfo[PlayerInfo[playerid][pPosedovanjeMotora]][mID]);
SacuvajMotor(PlayerInfo[playerid][pPosedovanjeMotora]);
MotorInfo[PlayerInfo[playerid][pPosedovanjeMotora]][mID] = -1;
}
if(PlayerInfo[playerid][pPosedovanjeAviona] != -1)
{
DestroyVehicle(AvionInfo[PlayerInfo[playerid][pPosedovanjeAviona]][avID]);
SacuvajAvione(PlayerInfo[playerid][pPosedovanjeAviona]);
AvionInfo[PlayerInfo[playerid][pPosedovanjeAviona]][avID] = -1;
}
if(PlayerInfo[playerid][pPosedovanjePlovila] != -1)
{
DestroyVehicle(PlovilaInfo[PlayerInfo[playerid][pPosedovanjePlovila]][plID]);
SacuvajPlovila(PlayerInfo[playerid][pPosedovanjePlovila]);
PlovilaInfo[PlayerInfo[playerid][pPosedovanjePlovila]][plID] = -1;
}
}
[/pawn]


Citat: omcho poslato Mart 22, 2019, 14:47:45 POSLE PODNE
Pa jel brises ti vozila na disconnectu? Posto ovde ne vidim nigde kod za brisanje tog il sam slep il nisi stavio

[pawn]
// proveravas da li je igrac ulogovan i da li poseduje vozila a nisi mu ni account ucitovao?
case DIALOG_LOGIN:
    {
    if(UlogovanProvera[playerid] == 1)
    {
if(PlayerInfo[playerid][pPosedovanjeAuta] != -1)
{
DestroyVehicle(VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta]][vID]);
SacuvajVozilo(PlayerInfo[playerid][pPosedovanjeAuta]);
VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta]][vID] = -1;
}
if(PlayerInfo[playerid][pPosedovanjeAuta2] != -1)
{
DestroyVehicle(VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta2]][vID]);
SacuvajVozilo(PlayerInfo[playerid][pPosedovanjeAuta2]);
VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta2]][vID] = -1;
}
if(PlayerInfo[playerid][pPosedovanjeMotora] != -1)
{
DestroyVehicle(MotorInfo[PlayerInfo[playerid][pPosedovanjeMotora]][mID]);
SacuvajMotor(PlayerInfo[playerid][pPosedovanjeMotora]);
MotorInfo[PlayerInfo[playerid][pPosedovanjeMotora]][mID] = -1;
}
if(PlayerInfo[playerid][pPosedovanjeAviona] != -1)
{
DestroyVehicle(AvionInfo[PlayerInfo[playerid][pPosedovanjeAviona]][avID]);
SacuvajAvione(PlayerInfo[playerid][pPosedovanjeAviona]);
AvionInfo[PlayerInfo[playerid][pPosedovanjeAviona]][avID] = -1;
}
if(PlayerInfo[playerid][pPosedovanjePlovila] != -1)
{
DestroyVehicle(PlovilaInfo[PlayerInfo[playerid][pPosedovanjePlovila]][plID]);
SacuvajPlovila(PlayerInfo[playerid][pPosedovanjePlovila]);
PlovilaInfo[PlayerInfo[playerid][pPosedovanjePlovila]][plID] = -1;
}
}
[/pawn]
Citat: TonySmith poslato Mart 22, 2019, 19:06:23 POSLE PODNE
BUMP NIKO??????? Å TA JE OVO

Citat iznad ti je receno  8)




Give Honor To The One Who Deserve It





Ovo mi je na diskonektu

[pawn]    if(UlogovanProvera[playerid] == 1)
    {
      if(PlayerInfo[playerid][pPosedovanjeAuta] != -1)
      {
         DestroyVehicle(VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta]][vID]);
         SacuvajVozilo(PlayerInfo[playerid][pPosedovanjeAuta]);
         VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta]][vID] = -1;
      }
      if(PlayerInfo[playerid][pPosedovanjeAuta2] != -1)
      {
         DestroyVehicle(VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta2]][vID]);
         SacuvajVozilo(PlayerInfo[playerid][pPosedovanjeAuta2]);
         VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta2]][vID] = -1;
      }
      if(PlayerInfo[playerid][pPosedovanjeMotora] != -1)
      {
         DestroyVehicle(MotorInfo[PlayerInfo[playerid][pPosedovanjeMotora]][mID]);
         SacuvajMotor(PlayerInfo[playerid][pPosedovanjeMotora]);
         MotorInfo[PlayerInfo[playerid][pPosedovanjeMotora]][mID] = -1;
      }
      if(PlayerInfo[playerid][pPosedovanjeAviona] != -1)
      {
         DestroyVehicle(AvionInfo[PlayerInfo[playerid][pPosedovanjeAviona]][avID]);
         SacuvajAvione(PlayerInfo[playerid][pPosedovanjeAviona]);
         AvionInfo[PlayerInfo[playerid][pPosedovanjeAviona]][avID] = -1;
      }
      if(PlayerInfo[playerid][pPosedovanjePlovila] != -1)
      {
         DestroyVehicle(PlovilaInfo[PlayerInfo[playerid][pPosedovanjePlovila]][plID]);
         SacuvajPlovila(PlayerInfo[playerid][pPosedovanjePlovila]);
         PlovilaInfo[PlayerInfo[playerid][pPosedovanjePlovila]][plID] = -1;
      }
   }[/pawn]