[Pomoc] Level up

Započeo Milan || WG, Mart 20, 2013, 20:07:39 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta: CLRP
Problem: pa zelim d anapravim umjesto komande /levelup da na payday ako igrac ima dovoljan broj respekta prebaci ga na lvl vise i postavi mu respekte na nula npr za lvl 6 potrebno 12 imam 11/12 doÄ'e payday dobijem +1 respekt to je 12 ii ako su 12/12 postavi mi lvl 6 i oduzme respekte ako me razumijete
Dio skripte:
   if (strcmp(cmd, "/levelup", true) == 0 || strcmp(cmd, "/podignilevel", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         if (gPlayerLogged[playerid] != 0)
         {
            if(PlayerInfo[playerid][pLevel] >= 0)
            {
               new nxtlevel = PlayerInfo[playerid][pLevel]+1;
               new expamount = nxtlevel*levelexp;
               new infostring[128];
               if (PlayerInfo[playerid][pExp] < expamount)
               {
                  format(infostring, 256, "Morate imati %d Respekt Poena,trenutno imate %d!",expamount,PlayerInfo[playerid][pExp]);
                  SendClientMessage(playerid, YELLOW, infostring);
                  return 1;
               }
               else
               {
                  //format(string, sizeof(string), "~g~VECI NIVO~n~~w~Sada ste level %d", nxtlevel);
                  PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                  /*GivePlayerCash(playerid, (-costlevel));*/
                  PlayerInfo[playerid][pLevel]++;
                  if(PlayerInfo[playerid][pDonateRank] > 0)
                  {
                      PlayerInfo[playerid][pExp] -= expamount;
                      new total = PlayerInfo[playerid][pExp];
                      if(total > 0)
                      {
                          PlayerInfo[playerid][pExp] = total;
                      }
                      else
                      {
                          PlayerInfo[playerid][pExp] = 0;
                      }
                  }
                  else
                  {
                     PlayerInfo[playerid][pExp] = 0;
                  }
                  PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
                  GameTextForPlayer(playerid, string, 5000, 1);
                  format(infostring, 256, "[Level +++]Sada ste level %d.Kucajte /nadogradnja", nxtlevel);
                  SendClientMessage(playerid, SVETLOPLAVA, infostring);
                  format(infostring, 256, "Imate %d nepotrosenih Upgrade Poena",PlayerInfo[playerid][gPupgrade]);
                  SendClientMessage(playerid, NICERED, infostring);
               }
            }
            return 1;
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "Niste prijavljeni!");
         }
      }
      return 1;
   }
Slike// Video//

Ma kod mene radi i ovo samo mi treba da neko to uradi da odmah prebacuje,,,

Ovo ubacis u platu:

new nxtlevel = PlayerInfo[playerid][pLevel]+1;
               new expamount = nxtlevel*levelexp;
               new infostring[128];
               if (PlayerInfo[playerid][pExp] < expamount)
               {
                  format(infostring, 256, "Morate imati %d Respekt Poena,trenutno imate %d!",expamount,PlayerInfo[playerid][pExp]);
                  SendClientMessage(playerid, YELLOW, infostring);
                  return 1;
               }
               else
               {
                  //format(string, sizeof(string), "~g~VECI NIVO~n~~w~Sada ste level %d", nxtlevel);
                  PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                  /*GivePlayerCash(playerid, (-costlevel));*/
                  PlayerInfo[playerid][pLevel]++;
                  if(PlayerInfo[playerid][pDonateRank] > 0)
                  {
                      PlayerInfo[playerid][pExp] -= expamount;
                      new total = PlayerInfo[playerid][pExp];
                      if(total > 0)
                      {
                          PlayerInfo[playerid][pExp] = total;
                      }
                      else
                      {
                          PlayerInfo[playerid][pExp] = 0;
                      }
                  }
                  else
                  {
                     PlayerInfo[playerid][pExp] = 0;
                  }
}
Izvinjavam se na svim glupostima i ako sam nekome napisao nesto lose, neko drugi je koristio moj profil!
__________________________________________
https://bk.gta.world - GTA World Balkan - RAGEMP