24.07.2012, 21:56
Try this code, I did it fast ..
Ongamemodeinit :
out of any callback :
Only to increase the experience: Exp[playerid] ++;
Do not promise anything eh
Otherwise, use one of these:
https://sampforum.blast.hk/showthread.php?tid=353225
https://sampforum.blast.hk/showthread.php?tid=274680
Code:
new Exp[MAX_PLAYERS]; //experience new Lv[MAX_PLAYERS]; //level forward LevelUp(playerid);
Code:
SetTimer("LevelUp", 1000, false);
Code:
public LevelUp(playerid) { if(LevelNext(playerid) >= Exp[playerid]) { Exp[playerid] = 0; Lv[playerid] ++; SetPlayerScore(playerid, GetPlayerScore(playerid) + 1); } }
Code:
stock LevelNext(playerid){ return (Lv[playerid] * 5); }
Do not promise anything eh
Otherwise, use one of these:
https://sampforum.blast.hk/showthread.php?tid=353225
https://sampforum.blast.hk/showthread.php?tid=274680