[Pomoc]Respecti

Započeo caupton, April 15, 2011, 13:32:46 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:FactionGame Edit
Detaljan opis problema:kako da namestim kada neko oce da predje u 2 level da treba da ima 4 respecta a ne 8.  :'(
Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno)://


if (strcmp(cmd, "/levelup", 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[256];
               if (PlayerInfo[playerid][pExp] < expamount)
               {
                  format(infostring, 256, "   Za sledeci level vam treba %d Respekt Poena, a vi imate [%d] !",expamount,PlayerInfo[playerid][pExp]);
                  SendClientMessage(playerid, COLOR_GRAD1, infostring);
                  return 1;
               }
               else
               {
                  format(string, sizeof(string), "~g~LEVEL UP~n~~w~Vi ste sada Level %d", nxtlevel);
                  PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                  PlayerPlayMusic(playerid);
                  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, "   Kupili ste Level %d Ukucajte /upgrade", nxtlevel);
                  SendClientMessage(playerid, COLOR_GRAD1, infostring);
                  format(infostring, 256, "   Dali ste %d nepotrosene Upgrade Points-e",PlayerInfo[playerid][gPupgrade]);
                  SendClientMessage(playerid, COLOR_GRAD2, infostring);
               }
            }
            return 1;
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   Niste se ulogovali !");
         }
      }
      return 1;
   }

if (strcmp(cmd, "/levelup", 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[256];
               if (PlayerInfo[playerid][pExp] < expamount)
               {
                  format(infostring, 256, "   Za sledeci level vam treba %d Respekt Poena, a vi imate [%d] !",expamount,PlayerInfo[playerid][pExp]);
                  SendClientMessage(playerid, COLOR_GRAD1, infostring);
                  return 1;
               }
               else
               {
                  format(string, sizeof(string), "~g~LEVEL UP~n~~w~Vi ste sada Level %d", nxtlevel);
                  PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                  PlayerPlayMusic(playerid);
                  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]+1;
                  GameTextForPlayer(playerid, string, 5000, 1);
                  format(infostring, 256, "   Kupili ste Level %d Ukucajte /upgrade", nxtlevel);
                  SendClientMessage(playerid, COLOR_GRAD1, infostring);
                  format(infostring, 256, "   Dali ste %d nepotrosene Upgrade Points-e",PlayerInfo[playerid][gPupgrade]);
                  SendClientMessage(playerid, COLOR_GRAD2, infostring);
               }
            }
            return 1;
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   Niste se ulogovali !");
         }
      }
      return 1;
   }


Probaj ovo
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

Ja kada tek skinem  Faction nezz kako da se rijeÅ¡im onog jednog errora a i ja bi da editujem Faction  :-[




Balkan Ulice RPG opis servera: Click



-Tutorial za mijesanje ID-ova na vozilima: Click

trazi ovo : expamount

i IDI F3 dok ne vidis gde su ti definirani respect poeni.

nadjes ovo u skripti

new levelexp = 4;


i onda broj "4" promjenis u broj "2". i onda ce igracu trebati 4 respekta za novi level