Posts: 666
Threads: 94
Joined: Aug 2009
Reputation:
0
How would i go about detecting the amount of XP the player has till there next level?
Example of XP..
Level 1: 0-10 XP
Level 2: 11-20 XP
Level 3: 21-30 XP.
How would i detect how much XP they need untill the next level? Its going into a TD.
Posts: 666
Threads: 94
Joined: Aug 2009
Reputation:
0
i know how to do that, I mean..
Detecting the space in between..
like..
You have 6 XP, You need 4 more XP to reach level 1.
Posts: 30
Threads: 0
Joined: Aug 2010
Reputation:
0
11.08.2010, 23:26
(
Последний раз редактировалось mrmuffins; 11.08.2010 в 23:37.
)
if (pXP[playerid] <= 11) {
pXP[playerid] = 11 - pXP[playerid];
new string[256];
format(string, sizeof(string), "You need %d more points till level 2!",pXP[playerid]);
SendClientMessage(playerid, COLOR, string);
}
Not tested however showed work.
If the player is below the amount needed to upgrade, - that value to get the value they still need and tell it to them.
ex. mine is 6. I still need 5 more points