Problem oko Auto Salona

Započeo Markoo00, Decembar 08, 2022, 20:22:12 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Problem(error/warning): Ja kad ukucam /kupiauto u auto salonu meni izbaci onaj td i sve radi i kupovina auta i listanje ali jedniko ne radi izlaz iz auta salonda pritiscem shift nece a kad kupim auto odma mi izace i da znate ovo je edit Ghetto 1.7 by:Nestro
Deo skripte:[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);
    }[/pawn] dio cmd [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);
      }[/pawn]dio pod on player update
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): //
Slika/video ingame problema(obavezno ako je ingame problem): //

Samo napravi da pritiskom na shift close td i tjt
HTML / CSS / Javascript / Inspect : Entry Masterclass.
ReactJS / Tailwind CSS / PWA / Axios / SCSS / Redux, ViteJS : Entry Masterclass.
C / C++ / C# / C-objective - kroz Pawn Lang : Entry Masterclass
Grupisano Pravljenje Objekata : Filterscript.


Sta je to web development?
To je nesto ono kao, kako bih to rekao, izgubis volju za zivotom i zelis da se ubijes, ali to je okej.
Onda jednostavno shvatis da si bio glup i resis problem, das sam sebi lajk,
skuvas NES 3u1 i pripremis se za sledeci projekat.

Citat: neshallon poslato Decembar 08, 2022, 20:30:40 POSLE PODNE
Samo napravi da pritiskom na shift close td i tjt
evo upisao sam[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;
            }
         }
      }
       else if (newkeys &  KEY_JUMP)
       {
          TogglePlayerControllable(playerid, 1);
          SCM(playerid, -1, "[NS]   "CRVENA"Odustali ste od kupovine auta!");
          KupovinaAuta[playerid] = false; autokatalog = 0;
         UkloniVozilaTD(playerid);
         SetCameraBehindPlayer(playerid);
       }
   }
   if(!IsPlayerInAnyVehicle(playerid) && newkeys & KEY_JUMP && oldkeys & KEY_SPRINT)
   {
       BunnyHop[playerid] ++;
       if(BunnyHop[playerid] >= 3)
      {
           OnePlayAnim(playerid, "GYMNASIUM", "gym_tread_falloff", 1.5, 0, 0, 0, 0, 0);
           BunnyHop[playerid] = 0;
      }

   }[/pawn] to sam napisao ali imam 2 errora[pawn]C:\Users\in\Desktop\ala\osa Tacni Sati - Copy - Copy - Copy\gamemodes\nestor.pwn(64361) : error 017: undefined symbol "newkeys"
C:\Users\in\Desktop\ala\osa Tacni Sati - Copy - Copy - Copy\gamemodes\nestor.pwn(64370) : error 017: undefined symbol "newkeys"
C:\Users\in\Desktop\ala\osa Tacni Sati - Copy - Copy - Copy\gamemodes\nestor.pwn(87345) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
[/pawn]

Jesi stavio to u OnPlayerKeyStateChange?
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


Citat: ɴᴏᴅɪ poslato Decembar 08, 2022, 20:53:18 POSLE PODNE
Jesi stavio to u OnPlayerKeyStateChange?
sad sam ubacio i dibio nove errore [pawn]C:\Users\in\Desktop\ala\osa Tacni Sati - Copy - Copy - Copy\gamemodes\nestor.pwn(64285) : error 017: undefined symbol "newkeys"
C:\Users\in\Desktop\ala\osa Tacni Sati - Copy - Copy - Copy\gamemodes\nestor.pwn(64296) : error 017: undefined symbol "newkeys"
C:\Users\in\Desktop\ala\osa Tacni Sati - Copy - Copy - Copy\gamemodes\nestor.pwn(64307) : error 017: undefined symbol "newkeys"
C:\Users\in\Desktop\ala\osa Tacni Sati - Copy - Copy - Copy\gamemodes\nestor.pwn(64363) : error 017: undefined symbol "newkeys"
C:\Users\in\Desktop\ala\osa Tacni Sati - Copy - Copy - Copy\gamemodes\nestor.pwn(64372) : error 017: undefined symbol "newkeys"
C:\Users\in\Desktop\ala\osa Tacni Sati - Copy - Copy - Copy\gamemodes\nestor.pwn(87348) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.

Crta 64285   if(newkeys & KEY_RIGHT && !(oldkeys & KEY_RIGHT))
Crta 64296   else if(newkeys & KEY_LEFT && !(oldkeys & KEY_LEFT))
Crta 64307   else if(newkeys & KEY_SECONDARY_ATTACK)
Crta 64363   else if (newkeys &  KEY_JUMP)
Crta 64372   if(!IsPlayerInAnyVehicle(playerid) && newkeys & KEY_JUMP && oldkeys & KEY_SPRINT)
Crta 87348   stock EmailPW(string[])
[/pawn]