Exp and Level
#1

Hello, let's just straight forward to the topic,

Well, what I want to know is that, if every time if a player level -up and their EXP will get higher and higher.

Example: Currently I'm level 2 and I've 12/12 experience , after I /levelup and it will go like this

Level 3 0/16 Experience, so every time a player level-up, their Experience target will +4.

So my question is, is there any example of how to make the player's experience target to +4 after level-up ?

BTW, sorry for bad english
Reply
#2

There is an example but I can't remember it but you need to search on the forums thought.
Reply
#3

Kinda:
pawn Код:
new Exp[MAX_PLAYERS];
new Levelup[MAX_PLAYERS];
new Exptarg[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
 Exp[killerid]++; //Ups the exp of killer.
 return 1;
}

public OnPlayerUpdate(playerid)
{
 if(Exp[playerid] == Exptarg)
 {
   Levelup[playerid]++; //If the player's experience is equal or more that the needed experience to Level up, then  a level up.
   Exptarg[playerid] = Levelup[playerid]+2; //Next experience target will be +2 from the current level.
   Exp[playerid] = 0; //Resets the experience.
 }
 return 1;
}
Reply
#4

Quote:
Originally Posted by Lordz™
Посмотреть сообщение
Kinda:
pawn Код:
new Exp[MAX_PLAYERS];
new Levelup[MAX_PLAYERS];
new Exptarg[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
 Exp[killerid]++; //Ups the exp of killer.
 return 1;
}

public OnPlayerUpdate(playerid)
{
 if(Exp[playerid] == Exptarg)
 {
   Levelup[playerid]++; //If the player's experience is equal or more that the needed experience to Level up, then  a level up.
   Exptarg[playerid] = Levelup[playerid]+2; //Next experience target will be +2 from the current level.
   Exp[playerid] = 0; //Resets the experience.
 }
 return 1;
}
Thank you for giving an example of it Lordz. This is what I want
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)