Exp and Level
#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


Messages In This Thread
Exp and Level - by Zex Tan - 01.01.2013, 03:57
Re: Exp and Level - by Ryuuji Takasu - 01.01.2013, 04:23
Re: Exp and Level - by Lordzy - 01.01.2013, 04:43
Re: Exp and Level - by Zex Tan - 01.01.2013, 04:46

Forum Jump:


Users browsing this thread: 1 Guest(s)