Easier way? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Easier way? (
/showthread.php?tid=335697)
Easier way? -
lukas567 - 19.04.2012
Код:
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
Re: Easier way? -
MP2 - 19.04.2012
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.
Re: Easier way? -
Deduction - 19.04.2012
Replace all those lines with this Line:
pawn Код:
str = playerDB[playerid][Strlvl]*210;