09.12.2014, 20:50
Hello I have been working on making an Levels system where you level up everytime you get XP, but the xp always stays the same, like when you first start, you're level 0, when you get 150XP you're level 1, then another 150XP and you're level 2, I want the XP to go up with the level, So to get to level 1 you need 150XP, to level 2 300XP, level 3 350xp etc, how would I do this without making the script look spammed and messy?
this is on PlayerUpdate, the levels and xp are saved, using Y_ini, unlike you should need it to help me out here
Thank you if you're able to help me out here! + rep for anyone who can
this is on PlayerUpdate, the levels and xp are saved, using Y_ini, unlike you should need it to help me out here
pawn Код:
if(pInfo[playerid][XP] > 100)
{
new str[85];
pInfo[playerid][Level] += 1;
pInfo[playerid][XP] = 0;
GivePlayerCash(playerid, 1500);
format(str, sizeof(str), "You have leveled up to level %d", pInfo[playerid][Level]);
SCM(playerid, pink, str);
}