26.07.2012, 02:04
(
Последний раз редактировалось Littlehelper; 26.07.2012 в 11:54.
)
-NVM, fixed it myself.
Now using it on OnPlayerDeath callback.
Now using it on OnPlayerDeath callback.
stock CheckRank(playerid)
{
if(YourXPvar >= 50) // or == depends on how your system works.
{
RankedUp(playerid);
PInfo[playerid][Rank] = 1;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(PInfo[playerid][EXP] == 100 && PInfo[playerid][Rank] == 0)
{
RankedUp(playerid);
PInfo[playerid][Rank] = 1;
}
// More code...
+1 I'm pretty sure you have to set it up OnPlayerUpdate, i could help you more if explain a bit on how do you exactly rank up.
|