01.09.2011, 07:39
pawn Код:
stock maxexplvl(playerid)
{
switch(GetPlayerLevel(playerid))
{
case 1: return 1000;//Kalo Level player 1, max level jadi 1000
case 2: return 2000;//Kalo Level player 2, max level jadi 2000
}
return 1;
}
pawn Код:
public OnPlayerUpdate(playerid)
{
new string[256];
SetPlayerScore(playerid, GetPlayerLevel(playerid));
if(GetPlayerExp(playerid) >= maxexplvl(playerid))//Pake playerid soalnya di stock agan butuh 1 argument
{
GivePlayerLevel(playerid, 1);
format(string, sizeof(string), "* Congratulations! Your char id had ben increased level to {FFFFFF}-> %d", GetPlayerLevel(playerid));
SendClientMessage(playerid, 0xCCFF00BB, string);
GivePlayerExp(playerid, - 1000);
}
return 1;
}