Pomoc oko auto salona

Započeo Markoo00, Novembar 19, 2022, 21:01:12 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Pitanje/savjet: ja kad upisem /kupiauto i sve normalo se ucita dt i to ali ne mogu izac iz tod td dok ne kupim auto i zanima me kako mogu satvit auto da se mjenja kako se listaju auta.
Opširnije: https://imgur.com/a/HXWQ7ED slika
Dodatno: [pawn]YCMD:kupiauto(playerid, params[], help)
{
   #pragma unused help
   #pragma unused params
   if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,""PLAVA"(NS:RP) "SIVA"Morate biti ulogovani da bi koristili komande!");
   if(PlayerInfo[playerid][pPosedovanjeAuta] != -1) return SCM(playerid,-1,""SIVA"Vec posedujes auto!");
   if(PlayerInfo[playerid][pLevel] < 3) return SCM(playerid,-1,""SIVA"Morate biti level 3+ za kupovinu auta!");
   if(IsPlayerInRangeOfPoint(playerid, 5.0, 1022.1661,-1113.1886,23.8657))
   {
      new string[128];
      if(KupovinaAuta[playerid] == true) return SCM(playerid,-1,""SIVA"Vec gledate katalog vozila!");
      if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1,""SIVA"Ne mozete gledati katalog iz vozila!");
      if(autokatalog != 0) return SCM(playerid,-1,""SIVA"Neko vec pregleda katalog!");
      if(prodajav != 0) return SCM(playerid,-1,""SIVA"Sva vozila su rasprodata!");
      TogglePlayerControllable(playerid, 0); KupovinaAuta[playerid] = true; PrikaziVozilaTD(playerid); autokatalog = 1;
      format(string,sizeof(string),"%s",ImenaVozila[GetVehicleModel(IzlozbenoAuto) - 400]);
      PlayerTextDrawSetString(playerid,TDProdajaVozila[2][playerid],string);
      format(string,sizeof(string),"cena: ~g~%d$",AutoSalon[AutoModel][1]);
      PlayerTextDrawSetString(playerid,TDProdajaVozila[3][playerid],string);
       SCM(playerid, -1, ""ZUTA"[NS:RP] "PLAVA"Koristite tipke LEVO i DESNO za listanje vozila!");
      SCM(playerid, -1, ""ZUTA"[NS:RP] "PLAVA"Za kupovinu stisnite ENTER ili F!");
      SCM(playerid, -1, ""ZUTA"[NS:RP] "PLAVA"Za izlaz stisnite SHIFT!");
      SetPlayerCameraPos(playerid, 1012.1335,-1117.4309,23.8657);
       SetPlayerCameraLookAt(playerid, 1012.1335,-1117.4309,23.8657);
    }
    else if(UsaoAutoProdaja[playerid] != -1)
    {
        new i = UsaoAutoProdaja[playerid];
        if(VoziloInfo[vImaVlasnika] == 0)
      {
          new vid = ceneAuta(GetVehicleModel(GetPlayerVehicleID(playerid)));
          if(PlayerInfo[playerid][pNovacDzep] < AutoSalon[vid][1]) return SCM(playerid,-1,""SIVA"Nemate dovoljno novca!");
          g_NovacMinus(playerid, AutoSalon[vid][1]);
         PlayerInfo[playerid][pPosedovanjeAuta] = i; VoziloInfo[vRadio] = 0;
         VoziloInfo[vImaVlasnika] = 1; VoziloInfo[vZakljucan] = 1;
         VoziloInfo[vDroga] = 0; VoziloInfo[vMats] = 0;
         VoziloInfo[vOruzije] = -1; VoziloInfo[vMunicija] = 0;
         strmid(VoziloInfo[vVlasnik], GetName(playerid), 0, strlen(GetName(playerid)), 999);
           SacuvajVozilo(i); SavePlayer(playerid); TogglePlayerControllable(playerid, 1);
           new textjbni[512]; format(textjbni, sizeof(textjbni),""CRVENA"NS:RP | "BELA"Uspesno ste kupili auto za %d$ novca!",AutoSalon[vid][1]);SCM(playerid, -1, textjbni);
           UsaoAutoProdaja[playerid] = -1;
           //new cosvls = GetPlayerVehicleID(playerid);
           DestroyDynamic3DTextLabel(VehicleLabel);
      }
      else return SCM(playerid,-1,""CRVENA"NS:RP | "SIVA"To vozilo nije na prodaju!");
    }
   return 1;
}[/pawn]

Citat: Markoo00 poslato Novembar 19, 2022, 21:01:12 POSLE PODNE
zanima me kako mogu satvit auto da se mjenja kako se listaju auta.

Postojani izbrises i kreiras novi sa modelom koji je sljedeci

A za izlazak pise ti shift da izadjes, ako ti ne radi onda posalji dio koda
SPEED HACK (C++) https://github.com/nouddy/samp-speed-hack
Reliant GameMode (open.mp) https://github.com/nouddy/reliant-omp
SA:MP Landing Page https://github.com/nouddy/samp-landing-page


Kolko drama ima u 7 grama


[pawn]   if(KupovinaAuta[playerid] == true)
   {
      new string[128];
       new Keys, ud, lr;
       GetPlayerKeys(playerid, Keys, ud, lr);
      if(lr > 0)
      {
         AutoModel++;
         if(AutoModel > PRODAJA_AUTA-1) { AutoModel = 0; }
         DestroyVehicle(IzlozbenoAuto);
         IzlozbenoAuto = CreateVehicle(AutoSalon[AutoModel][0], AIZLOZBENO_X,AIZLOZBENO_Y,AIZLOZBENO_Z,AIZLOZBENO_A, 1, 1, 30000);
         format(string,sizeof(string),"%s",ImenaVozila[GetVehicleModel(IzlozbenoAuto) - 400]);
         PlayerTextDrawSetString(playerid,TDProdajaVozila[2][playerid],string);
         format(string,sizeof(string),"cena: ~g~%d$",AutoSalon[AutoModel][1]);
         PlayerTextDrawSetString(playerid,TDProdajaVozila[3][playerid],string);
      }
      else if(lr < 0)
      {
         AutoModel--;
         if(AutoModel < 0) { AutoModel = PRODAJA_AUTA-1; }
         DestroyVehicle(IzlozbenoAuto);
         IzlozbenoAuto = CreateVehicle(AutoSalon[AutoModel][0], AIZLOZBENO_X,AIZLOZBENO_Y,AIZLOZBENO_Z,AIZLOZBENO_A, 1, 1, 30000);
         format(string,sizeof(string),"%s",ImenaVozila[GetVehicleModel(IzlozbenoAuto) - 400]);
         PlayerTextDrawSetString(playerid,TDProdajaVozila[2][playerid],string);
         format(string,sizeof(string),"cena: ~g~%d$",AutoSalon[AutoModel][1]);
         PlayerTextDrawSetString(playerid,TDProdajaVozila[3][playerid],string);
      }
      else if(Keys & KEY_SECONDARY_ATTACK)
      {
         if(PlayerInfo[playerid][pPosedovanjeAuta] != -1) return SCM(playerid,-1,"[NS:RP] "CRVENA"Vec posedujes auto!");
         if(PlayerInfo[playerid][pNovacDzep] < AutoSalon[AutoModel][1]) return SCM(playerid,-1,"[NS:RP] "CRVENA"Nemate dovoljno novca!");
         for(new i = 0; i < sizeof(VoziloInfo); i++)
         {
             new Fajl[64];
                format(Fajl, sizeof(Fajl), AUTO_FILE, i);
                if(!fexist(Fajl))
                {
                new poz = random(sizeof(RandomAutoSpawn));
                g_NovacMinus(playerid,AutoSalon[AutoModel][1]);
                PlayerInfo[playerid][pPosedovanjeAuta] = i;
                VoziloInfo[vModel] = AutoSalon[AutoModel][0];
                VoziloInfo[vPozX] = RandomAutoSpawn[poz][0];
               VoziloInfo[vPozY] = RandomAutoSpawn[poz][1];
               VoziloInfo[vPozZ] = RandomAutoSpawn[poz][2];
               VoziloInfo[vPozA] = RandomAutoSpawn[poz][3];
               VoziloInfo[vBoja1] = 0;
               VoziloInfo[vBoja2] = 0;
               VoziloInfo[vImaVlasnika] = 1;
               VoziloInfo[vZakljucan] = 1;
               VoziloInfo[vDroga] = 0;
               VoziloInfo[vMats] = 0;
               VoziloInfo[vOruzije] = -1;
               VoziloInfo[vMunicija] = 0;
               VoziloInfo[vRadio] = 0;
               VoziloInfo[vComponent0] = 0;
               VoziloInfo[vComponent1] = 0;
               VoziloInfo[vComponent2] = 0;
               VoziloInfo[vComponent3] = 0;
               VoziloInfo[vComponent4] = 0;
               VoziloInfo[vComponent5] = 0;
               VoziloInfo[vComponent6] = 0;
               VoziloInfo[vComponent7] = 0;
               VoziloInfo[vComponent8] = 0;
               VoziloInfo[vComponent9] = 0;
               VoziloInfo[vComponent10] = 0;
               VoziloInfo[vComponent11] = 0;
               VoziloInfo[vComponent12] = 0;
               VoziloInfo[vComponent13] = 0;
               strmid(VoziloInfo[vVlasnik], GetName(playerid), 0, strlen(GetName(playerid)), 999);
               TogglePlayerControllable(playerid, 1);
               VoziloInfo[vID] = CreateVehicle(AutoSalon[AutoModel][0], VoziloInfo[vPozX],VoziloInfo[vPozY],VoziloInfo[vPozZ],VoziloInfo[vPozA], VoziloInfo[vBoja1], VoziloInfo[vBoja2], 30000);
                   KupovinaAuta[playerid] = false; autokatalog = 0;
                   UkloniVozilaTD(playerid); SetCameraBehindPlayer(playerid);
                   SacuvajVozilo(i); SavePlayer(playerid); StatusMotora(playerid, 1);
                   SetPlayerCheckpoint(playerid, VoziloInfo[vPozX],VoziloInfo[vPozY],VoziloInfo[vPozZ], 5.0);
                   PosaoGPS[playerid] = 1; Fuel[GetPlayerVehicleID(playerid)] = 45;
                   SCM(playerid,-1,"NS:RP | "ZUTA"Uspesno ste kupili auto!");
                   SCM(playerid,-1,"NS:RP | "ZUTA"Autom mozete upravljati komandom /imovina!");
                   SCM(playerid,-1,"NS:RP | "ZUTA"Lokacija vaseg auta je oznacena crveno na mapi!");
               break;
            }
         }
      }
   }[/pawn]jesi na ovo mislio da znas ovo je mod nestrov ghetto 1.7