Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: caupton poslato April 15, 2011, 13:32:46 POSLE PODNE

Naslov: [Pomoc]Respecti
Poruka od: caupton poslato April 15, 2011, 13:32:46 POSLE PODNE
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)://
Naslov: Odg: [Pomoc]Respecti
Poruka od: _M2_ poslato April 15, 2011, 13:34:49 POSLE PODNE
Nadji /buylevel pa postaj.
Naslov: Odg: [Pomoc]Respecti
Poruka od: caupton poslato April 15, 2011, 13:36:04 POSLE PODNE
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;
   }
Naslov: Odg: [Pomoc]Respecti
Poruka od: System32 poslato April 15, 2011, 13:51:53 POSLE PODNE
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
Naslov: Odg: [Pomoc]Respecti
Poruka od: [BURPG] Wistaa poslato April 15, 2011, 14:08:00 POSLE PODNE
Ja kada tek skinem  Faction nezz kako da se rijeÅ¡im onog jednog errora a i ja bi da editujem Faction  :-[
Naslov: Odg: [Pomoc]Respecti
Poruka od: Nxidza poslato April 15, 2011, 14:14:15 POSLE PODNE
trazi ovo : expamount

i IDI F3 dok ne vidis gde su ti definirani respect poeni.
Naslov: Odg: [Pomoc]Respecti
Poruka od: .G.h.0.s.T. poslato April 24, 2011, 11:07:08 PRE PODNE
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