Easier way?
#1

Код:
   if(playerDB[playerid][Strlvl]==0)
   {
      str = 700;
   }
   else if(playerDB[playerid][Strlvl]==1)
   {
      str = 910;
   }
   else if(playerDB[playerid][Strlvl]==2)
   {
      str = 1120;
   }
   else if(playerDB[playerid][Strlvl]==3)
   {
      str = 1330;
   }
   else if(playerDB[playerid][Strlvl]==4)
   {
      str = 1540;
   }
   else if(playerDB[playerid][Strlvl]==5)
   {
      str = 1750;
   }
   else if(playerDB[playerid][Strlvl]==6)
   {
      str = 1960;
   }
   else if(playerDB[playerid][Strlvl]==7)
   {
      str = 2170;
   }
   else if(playerDB[playerid][Strlvl]==8)
   {
      str = 2380;
   }
   else if(playerDB[playerid][Strlvl]==9)
   {
      str = 2590;
   }
   else if(playerDB[playerid][Strlvl]==10)
   {
      str = 2800;
   }
Is there any easier way, to set different xp for every level? Each level, larger than other, have 210 points more, than smaller.

Thanks
Reply
#2

When they get score, see if it's > currentRank*210 (so level 1 will be 210, as 1*210 is 210) and if so rank them up.
Reply
#3

Replace all those lines with this Line:
pawn Код:
str = playerDB[playerid][Strlvl]*210;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)