Komanda /fv

Započeo Lekac, Maj 25, 2020, 16:07:26 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): znaci helperi tj gamesages  mi nisu mogli popravljat vozila i sredio sam njima sve normalno a sad admini ne mogu popravljati izbacuje im da imaju wl a nemaju i sta god probam nece prvo sam iso ovako probo sam onda i da stavim nes u stilu [pawn] if(PlayerInfo[playerid][xGameSage] >= 1 || PlayerInfo[playerid][xAdmin] >= 1){ kod} else return GRESKA(playerid, "Niste u mogucnosti"); [/pawn] i jos par stvari ali nije nista pomoglo
Dio skripte: [pawn] https://pastebin.com/GNy5GE6R [/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]//[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //

https://pastebin.com/rY05SDy6
Zameni ceo Case 3 eto ti i testaj, na poslu sam pa nabrzinu pogledao al ovaj kod ti nije valjao
if(PlayerInfo[playerid][xGameSage] < 1 || PlayerInfo[playerid][xAdmin] < 1 && PlayerInfo[playerid][xWanted] != 0) return GRESKA(playerid, "Ne mozete popravljati vozila dok imate trazeni level!");
To znaci Ako igrac je Gamesage, da dozvoljava, takodjer imas Ako igrac nije admin i (&&) ima wanted da ne moze koristiti, zato ti nije htelo adminima. Malo si se zbunio
Uglavnom izmenio sam, posebno ti detektuje dal je igrac gamesage/admin i posebno dal ima Trazeni level
Poslednja Izmena: Maj 25, 2020, 18:02:43 POSLE PODNE od Chikov

[pawn]else if(dialogid == dialog_fixcar) {
      if(!response) return true;
      if(response) {
         switch(listitem) {
            case 0: {
            
               if(IsPlayerInAnyVehicle(playerid)) {
               
                  Lekac_RepairVehicle(playerid, GetPlayerVehicleID(playerid));
                  Lekac_SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
                  antiCheatCS[playerid][VehRepairTime] = 3;
                  vCanDrive[GetPlayerVehicleID(playerid)] = 1;
                  SendInfoMessage(playerid, "Uspjesno ste popravili svoje vozilo!");
                  format(globalstring, sizeof(globalstring), "~r~(!) FIX - ~w~%s je popravio svoje vozilo.", ImeIgraca(playerid));
                     //AdminPoruka(NARACRVENA, globalstring);
                     sendAltChatMessage(globalstring);
               }
               else return GRESKA(playerid, "Ne nalazite se u vozilu!");
            }
            case 1: {
                    if(PlayerInfo[playerid][xGameSage] < 1 && PlayerInfo[playerid][xAdmin] < 1) return GRESKA(playerid, "Niste u mogucnosti koristiti ovu komandu.");
               SPD(playerid, dialog_fixcar2, DSI,""col_OldProject"Fix Car",""col_white"Upisite ID igraca kojem zelite popraviti vozilo:", D_ODABERI, D_ODUSTANI);
            }
            case 2: {
               if(PlayerInfo[playerid][xGameSage] < 1 && PlayerInfo[playerid][xAdmin] < 1) return GRESKA(playerid, "Niste u mogucnosti koristiti ovu komandu.");
               new Float:fX, Float:fY, Float:fZ;
               for (new i = 1; i != MAX_VEHICLES; i ++) if(IsValidVehicle(i) && GetVehiclePos(i, fX, fY, fZ)) {
                  if(IsPlayerInRangeOfPoint(playerid, 40.0, fX, fY, fZ)) {
                     Lekac_SetVehicleHealth(i, 1000.0);
                     vCanDrive = 1;
                     foreach(Player, play) {
                        if(IsPlayerInVehicle(play, i) && GetPlayerState(play) == PLAYER_STATE_DRIVER) {
                           Lekac_RepairVehicle(play, i);
                           antiCheatCS[play][VehRepairTime] = 3;
                        }
                        else Lekac_RepairVehicle(-1, i);
                     }
                  }
               }
               SendInfoMessage(playerid, "Uspjesno ste popravili sva aktivna vozila u radiusu od 40 metara!");
               format(globalstring, sizeof(globalstring), "~r~(!) FIX - ~w~%s je popravio sva vozila u svom radiusu od 40 metara", ImeIgraca(playerid));
               //AdminPoruka(NARACRVENA, globalstring);
               sendAltChatMessage(globalstring);
            }
            case 3: {
               if(PlayerInfo[playerid][xGameSage] < 1 && PlayerInfo[playerid][xAdmin] < 1 && PlayerInfo[playerid][xWanted] != 0) return GRESKA(playerid, "Ne mozete popravljati vozila dok imate trazeni level!");
               if(PlayerInfo[playerid][xGameSage] < 1 && PlayerInfo[playerid][xAdmin] < 1) return GRESKA(playerid, "Niste u mogucnosti");
               if(!IsPlayerInAnyVehicle(playerid)) return GRESKA(playerid, "Ne nalazite se u vozilu!");
               
               new Float:angle;
               
               GetVehicleZAngle(GetPlayerVehicleID(playerid), angle); SetVehicleZAngle(GetPlayerVehicleID(playerid), angle);
               Lekac_RepairVehicle(playerid, GetPlayerVehicleID(playerid));
               Lekac_SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
               vCanDrive[GetPlayerVehicleID(playerid)] = 1;
               SendInfoMessage(playerid, "Uspjesno ste okrenuli i popravili svoje vozilo!");
               format(globalstring, sizeof(globalstring), "~r~(!) FLIP - ~w~%s je okrenuo i popavio svoje vozilo", ImeIgraca(playerid));
               //AdminPoruka(NARACRVENA, globalstring);
               sendAltChatMessage(globalstring);
            }
         }
      }
   }
   else if(dialogid == dialog_fixcar2) {
      if(!response) return true;
      if(response) {
          if(PlayerInfo[playerid][xAdmin] >= 1 || PlayerInfo[playerid][xGameSage] >= 1 || PlayerInfo[playerid][xVIPLevel] >= 4) {
            new id; id = strval(inputtext);
            
            if(!IsPlayerConnected(id)) return GRESKA(playerid,"Igrac nije na serveru!");
            if(!IsPlayerInAnyVehicle(id)) return GRESKA(playerid, "Odabrani igrac nije u vozilu!");
            if(PlayerInfo[id][xWanted] != 0) return GRESKA(playerid,"Taj igrac ima trazeni level, ne mozete mu popraviti vozilo!");
            
            Lekac_RepairVehicle(playerid, GetPlayerVehicleID(id));
            Lekac_SetVehicleHealth(GetPlayerVehicleID(id), 1000.0);
            antiCheatCS[id][VehRepairTime] = 3;
            vCanDrive[GetPlayerVehicleID(id)] = 1;
            
            SendInfoMessage(playerid, "Uspjesno ste popravili vozilo igracu %s!", ImeIgraca(id));
            
            SendInfoMessage(id, "%s Vam je popravio vozilo!", ImeIgraca(playerid));
            
            format(globalstring, sizeof(globalstring), "~r~(!) FIX - ~w~Administrator %s je popravio vozilo igracu", ImeIgraca(playerid), ImeIgraca(id));
            //AdminPoruka(NARACRVENA, globalstring);
            sendAltChatMessage(globalstring);
         }
         else return GRESKA(playerid, "Niste u mogucnosti koristiti ovu komandu.");
      }
   }[/pawn]
Poslednja Izmena: Maj 25, 2020, 19:35:37 POSLE PODNE od Alhemičar



Rust, Python, TypeScript, Kotlin, WebAssembly, Swift, Clojure, Elixir, Go, SQL

Rijeseno, hvala vam obojici