Problem sa sistemom

Započeo Gladiator99012, Jun 07, 2020, 13:20:26 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Hteo sam da napavim cmd za davanje supportera i sve radi nemam nijedan error ili warning ali kad udjem u igru i hocu sebi da dam supportera svaki put mi setuje samo Level 1 a ovamo u skrripti sam upisao da ima 3 Level ne znam do cega moze da bude ovaj problem evo i slika dole da svaki put kad upisem komandu i bilo koji level da statim setuje mi se samo LEVEL 1, hvala unapred!
Dio skripte: [pawn]YCMD:makesupporter(playerid, params[], help)
{
   #pragma unused help
   if(PI[playerid][pAdmin] < 6) return Error(playerid, "Nisi ovlascen za ovu komandu!");
   {
   
      new id, lvl, slot;
      if(sscanf(params, "uli", id, lvl, slot))
      {
          Cmd(playerid, "makesupporter (playerid) (level) (slot)");
          return 1;
      }
      if(id == IPI) return Error(playerid, "Taj igrac nije na serveru!");
      if(slot < 0 || slot > 4) return Error(playerid, "Slot ne moze biti manji od 1 ili veci od 4!");
      if(slot < 1 && lvl > 0) return Error(playerid, "Slot ne moze biti manji od 1 ili veci od 4!");
      if(lvl < 0 || lvl > 3) return Error(playerid, "Ne moze vise od 3 ili manje od 0.");
      if(lvl == 0)
      {
          if(PI[playerid][pSupporter] > 0)
          {
              new File: log, supp[128], text[80];
              format(supp, 128, "Supporteri/%d.txt", PI[id][pSuppSlot]);
              format(text, 64, "Niko");
              log = fopen(supp, io_write);
              fwrite(log, text);
              fclose(log);
          }
          new string[128];
          PI[id][pSupporter] = lvl;
          SetPlayerSkin(id, 26);
          PI[playerid][pSkin] = 26;
          PI[playerid][pSuppSlot] = 0;
         Info(id, "Skinuta vam je pozicija Supportera od stane Admina");
         format(string,sizeof(string), ""ZUTA"[SUPP DOWN] Owner %s je skinuo Admin igracu %s", GetName(playerid), GetName(id));
         SendAdminMessage(-1,string);
         SavePlayer(id);
         SetPlayerSpecialAction(id, SPECIAL_ACTION_NONE);
      }
      else if(lvl == 1 || lvl == 2 || lvl == 3)
      {
         
         new File:log, supp[128], text[80], string[128];
         format(supp, 128, "Supporteri/%d.txt", slot);
         format(text, 64, "%s", GetName(id));
         log = fopen( supp, io_write );
         fwrite(log, text);
         fclose(log);
         
         SetPlayerSkin(id, 59);
         PI[playerid][pSkin] = 59;
         PI[playerid][pSupporter] = lvl;
         PI[playerid][pSuppSlot] = slot;
         
         Info(playerid, "Prolovisali ste igraca %s  na Supp level %d, slot:%d", GetName(id), lvl, slot);
         format(string,sizeof(string), ""COL_GX">>GeniusX<< "BELA"Owner %s je postavio igracu %s Supp level %d, Supp slot %d", GetName(playerid), GetName(id) , lvl, slot);
         SendAdminMessage(-1,string);
         
         new ssstring[128];
         format(ssstring,sizeof(ssstring), "Owner %s | Igrac %s | Supp Level %d | Supp Slot %d", GetName(playerid), GetName(id), lvl, slot);
         LogSave("Logs/MakeSupporter.log", ssstring);
         
         new stris[500];
         format(stris,sizeof(stris), ""BELA"Cestitamoa vam, postali se Supporter na GeniusX Gaming severu!\n Supporter level %d vam je dao Owner %s.\nSLOT: %d", lvl, GetName(playerid), slot);
         SPD(id, DIALOG_OSTALOO, DSM, ""COL_GX"Welcome in >>GeniusX<< Staff", stris, "Izlaz", "");
         SavePlayer(id);
      }
   }
   return 1;
}
[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): /
Slika/video ingame problema(obavezno ako je ingame problem): https://imgur.com/a/ULOmKSW

Zameni [pawn]if(sscanf(params, "uli", id, lvl, slot))[/pawn] sa [pawn]if(sscanf(params, "uii", id, lvl, slot))[/pawn]

Specifiers

The available specifiers (the letters "u", "i" and "s" in the codes above) are below.
Basic specifiers

Code:
Specifier(s) Name Example values
i, d Integer 1, 42, -10
c Character a, o, *
l Logical true, false
b Binary 01001, 0b1100
h, x Hex 1A, 0x23
o Octal 045 12
n Number 42, 0b010, 0xAC, 045
f Float 0.7, -99.5
g IEEE Float 0.7, -99.5, INFINITY, -INFINITY, NAN, NAN_E
u User name/id (bots and players) ******, 0
q Bot name/id ShopBot, 27
r Player name/id ******, 42
                                                                                 
Legacy Gaming Since 2017 ©

Scripter and Founder
Scripting 3+ Years
https://www.facebook.com/LegacyGamingOGC/ (FB Stranica)
https://www.facebook.com/nikolaa.jovicic (FB Nalog)