Problem oko /proveri

Započeo S@vke, Septembar 17, 2018, 18:24:42 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Problem je sto otvara moj stats na /proveri 23 naprimer...
Dio skripte: [ pawn ]SG:RPG[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]Problem je kada kucam /proveri i naprimer id neki 23 naprimer... i otvori mi svoj stats ne izbacuje od njega stats ?[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem):

YCMD:proveri(playerid, params[], help)
{
    #pragma unused help
    new id;
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"X:RP| "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid,-1,""SPLAVA"[X:RP] "SIVA"Samo Admin Level 2+!");
    if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""CRVENA"[X:RP] "SIVA"Morate biti na admin duznosti!");
   if(sscanf(params, "u", id)) return SCM(playerid,-1,""srv_boja""BELA"EG: "srv_boja" /proveri [ID]");
   if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""srv_boja""BELA"EG: "srv_boja" Igrac nije na serveru!");
    CheckShowStats(playerid, playerid);;
   return 1
}

Mislim da ovako treba nemam mnogo vremena
[pawn]YCMD:proveri(playerid, params[], help)
{
    #pragma unused help
    new id;
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"X:RP| "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid,-1,""SPLAVA"[X:RP] "SIVA"Samo Admin Level 2+!");
    if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""CRVENA"[X:RP] "SIVA"Morate biti na admin duznosti!");
   if(sscanf(params, "u", id)) return SCM(playerid,-1,""srv_boja""BELA"EG: "srv_boja" /proveri [ID]");
   if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""srv_boja""BELA"EG: "srv_boja" Igrac nije na serveru!");
    CheckShowStats(id);;
   return 1
}[/pawn]
Poslednja Izmena: Septembar 17, 2018, 18:31:08 POSLE PODNE od RevOLvɘЯ.pwn


[pawn]YCMD:proveri(playerid, params[], help)
{
    #pragma unused help
    new id;
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"X:RP| "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid,-1,""SPLAVA"[X:RP] "SIVA"Samo Admin Level 2+!");
    if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""CRVENA"[X:RP] "SIVA"Morate biti na admin duznosti!");
   if(sscanf(params, "u", id)) return SCM(playerid,-1,""srv_boja""BELA"EG: "srv_boja" /proveri [ID]");
   if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""srv_boja""BELA"EG: "srv_boja" Igrac nije na serveru!");
    CheckShowStats(playerid, id);
   return 1
}
[/pawn]

Posalji funkciju: CheckShowStats()
Poslednja Izmena: Septembar 17, 2018, 19:20:20 POSLE PODNE od Polyakov

stock CheckShowStats(playerid)
{
   if(IsPlayerConnected(playerid))
   {
      if(GetPVarInt(playerid, "StatsPrikazan") == 0)
      {
           for(new s = 0; s < 36; s++)
          {
              PlayerTextDrawShow(playerid, StatsTD[playerid]);
          }
         ////////////////////////////////////////////////////////////////////////
         new drank[9];
         if(PlayerInfo[playerid][pVip] == 1) { drank = "1"; }
         else if(PlayerInfo[playerid][pVip] == 2) { drank = "2"; }
         else if(PlayerInfo[playerid][pVip] == 3) { drank = "3"; }
         else if(PlayerInfo[playerid][pVip] == 4) { drank = "4"; }
         else if(PlayerInfo[playerid][pVip] == 5) { drank = "5"; }
         new promoter[7];
         if(PlayerInfo[playerid][pPromoter] == 1) { promoter = "Da"; }
         else if(PlayerInfo[playerid][pPromoter] == 0) { promoter = "Ne"; }
         else { drank = "Nema"; }
         new sat,minuta,sekunda,godina, mjesec, dan;
          getdate(godina, mjesec, dan);
          gettime(sat, minuta, sekunda);
         new playerskin = GetPlayerSkin(playerid);
         new str[300], str3[30], vreme[12], satt[10];
         PlayerTextDrawSetPreviewModel(playerid, StatsTD[playerid][16], PlayerInfo[playerid][pSkin]);
          PlayerTextDrawShow(playerid, StatsTD[playerid][16]);
         format(str3, sizeof(str3),"%s",GetName(playerid));
         PlayerTextDrawSetString(playerid, StatsTD[playerid][17], str3);
         format(str, sizeof(str), "Level:_%d~n~Respekti:_%d/%d~n~Sati_Igranja:_%d~n~Vip_level:_%s~n~Upozorenja:_%d~n~Trazeni_level:_%d~n~PayDay:_%d/45~n~Ubistava:_%d~n~Smrti:_%d~n~Skin:_%d~n~Promoter:_%d",
         PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pExp], (PlayerInfo[playerid][pLevel] * 2) + 2, PlayerInfo[playerid][pSatiIgre], drank, PlayerInfo[playerid][pWarn], PlayerInfo[playerid][pTrazeniLevel], PlayerInfo[playerid][pPayDayPoeni],  PlayerInfo[playerid][pUbistava], PlayerInfo[playerid][pSmrti], playerskin, promoter);
         PlayerTextDrawSetString(playerid, StatsTD[playerid][34], str);
         format(vreme, sizeof(vreme),"%d/%d/%d",dan,mjesec,godina);
         PlayerTextDrawSetString(playerid, StatsTD[playerid][20], vreme);
         format(satt, sizeof(satt),"%d:%d:%d",sat, minuta, sekunda);
         PlayerTextDrawSetString(playerid, StatsTD[playerid][21], satt);
         SetPVarInt(playerid, "StatsPrikazan", 1);
         SelectTextDraw(playerid, 0xDABB3EAA);
      }
      else if(GetPVarInt(playerid, "StatsPrikazan") == 1)
      {
          for(new s = 0; s < 36; s++)
          {
              PlayerTextDrawHide(playerid, StatsTD[playerid]);
          }
         SetPVarInt(playerid, "StatsPrikazan", 0);
         CancelSelectTextDraw(playerid);
      }
   }
   return 1;
}

Problem ti je ovde
CheckShowStats(playerid, playerid);;
   return 1
Probaj CheckShowStats(id, playerid);
   return 1
Ili CheckShowStats(id);
   return 1

[pawn][pawn]YCMD:proveri(playerid, params[], help)
{
    #pragma unused help
    new id;
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"X:RP| "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid,-1,""SPLAVA"[X:RP] "SIVA"Samo Admin Level 2+!");
    if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""CRVENA"[X:RP] "SIVA"Morate biti na admin duznosti!");
   if(sscanf(params, "u", id)) return SCM(playerid,-1,""srv_boja""BELA"EG: "srv_boja" /proveri [ID]");
   if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""srv_boja""BELA"EG: "srv_boja" Igrac nije na serveru!");
    CheckShowStats(id, playerid);;
   return 1
}[/pawn]
Izvoli
Srecu cine male stvari i veliko pivo!
x3M-Gaming USKORO!


YCMD:proveri(playerid, params[], help)
{
    #pragma unused help
    new id;
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"X:RP| "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid,-1,""SPLAVA"[X:RP] "SIVA"Samo Admin Level 2+!");
    if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""CRVENA"[X:RP] "SIVA"Morate biti na admin duznosti!");
   if(sscanf(params, "u", id)) return SCM(playerid,-1,""srv_boja""BELA"EG: "srv_boja" /proveri [ID]");
   if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""srv_boja""BELA"EG: "srv_boja" Igrac nije na serveru!");
    CheckShowStats(playerid, id);
   return 1;
}

@S@vke Pogledaj svoju staru temu http://balkan-samp.com/forum/index.php?topic=123213.msg854679#msg854679


Citat: Paul Castellano poslato Septembar 17, 2018, 19:15:09 POSLE PODNE
[pawn]YCMD:proveri(playerid, params[], help)
{
    #pragma unused help
    new id;
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"X:RP| "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid,-1,""SPLAVA"[X:RP] "SIVA"Samo Admin Level 2+!");
    if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""CRVENA"[X:RP] "SIVA"Morate biti na admin duznosti!");
   if(sscanf(params, "u", id)) return SCM(playerid,-1,""srv_boja""BELA"EG: "srv_boja" /proveri [ID]");
   if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""srv_boja""BELA"EG: "srv_boja" Igrac nije na serveru!");
    CheckShowStats(playerid, id);
   return 1
}
[/pawn]

[pawn]stock CheckShowStats(playerid, id)
{
   if(IsPlayerConnected(id))
   {
      if(GetPVarInt(playerid, "StatsPrikazan") == 0)
      {
           for(new s = 0; s < 36; s++)
          {
              PlayerTextDrawShow(playerid, StatsTD[playerid]);
          }
         ////////////////////////////////////////////////////////////////////////
         new drank[9];
         if(PlayerInfo[id][pVip] == 1) { drank = "1"; }
         else if(PlayerInfo[id][pVip] == 2) { drank = "2"; }
         else if(PlayerInfo[id][pVip] == 3) { drank = "3"; }
         else if(PlayerInfo[id][pVip] == 4) { drank = "4"; }
         else if(PlayerInfo[id][pVip] == 5) { drank = "5"; }
         new promoter[7];
         if(PlayerInfo[id][pPromoter] == 1) { promoter = "Da"; }
         else if(PlayerInfo[id][pPromoter] == 0) { promoter = "Ne"; }
         else { drank = "Nema"; }
         new sat,minuta,sekunda,godina, mjesec, dan;
          getdate(godina, mjesec, dan);
          gettime(sat, minuta, sekunda);
         new playerskin = GetPlayerSkin(id);
         new str[300], str3[30], vreme[12], satt[10];
         PlayerTextDrawSetPreviewModel(playerid, StatsTD[playerid][16], PlayerInfo[id][pSkin]);
          PlayerTextDrawShow(playerid, StatsTD[playerid][16]);
         format(str3, sizeof(str3),"%s",GetName(id));
         PlayerTextDrawSetString(playerid, StatsTD[playerid][17], str3);
         format(str, sizeof(str), "Level:_%d~n~Respekti:_%d/%d~n~Sati_Igranja:_%d~n~Vip_level:_%s~n~Upozorenja:_%d~n~Trazeni_level:_%d~n~PayDay:_%d/45~n~Ubistava:_%d~n~Smrti:_%d~n~Skin:_%d~n~Promoter:_%d",
         PlayerInfo[id][pLevel], PlayerInfo[id][pExp], (PlayerInfo[id][pLevel] * 2) + 2, PlayerInfo[id][pSatiIgre], drank, PlayerInfo[id][pWarn], PlayerInfo[id][pTrazeniLevel], PlayerInfo[id][pPayDayPoeni],  PlayerInfo[id][pUbistava], PlayerInfo[id][pSmrti], playerskin, promoter);
         PlayerTextDrawSetString(playerid, StatsTD[playerid][34], str);
         format(vreme, sizeof(vreme),"%d/%d/%d",dan,mjesec,godina);
         PlayerTextDrawSetString(playerid, StatsTD[playerid][20], vreme);
         format(satt, sizeof(satt),"%d:%d:%d",sat, minuta, sekunda);
         PlayerTextDrawSetString(playerid, StatsTD[playerid][21], satt);
         SetPVarInt(playerid, "StatsPrikazan", 1);
         SelectTextDraw(playerid, 0xDABB3EAA);
      }
      else if(GetPVarInt(playerid, "StatsPrikazan") == 1)
      {
          for(new s = 0; s < 36; s++)
          {
              PlayerTextDrawHide(playerid, StatsTD[playerid]);
          }
         SetPVarInt(playerid, "StatsPrikazan", 0);
         CancelSelectTextDraw(playerid);
      }
   }
   return 1;
}[/pawn]
Poslednja Izmena: Septembar 19, 2018, 02:14:21 PRE PODNE od [R] buLLeT_