31.05.2014, 04:46
Quote:
show this eror
pawn Код:
|
PHP код:
SetTimer("UpdateExp", 5000, 1,"i",playerid);
PHP код:
forward UpdateExp(playerid);
public UpdateExp(playerid)
{
//new points[248]; // Points.
new nxtlevel = PlayerInfo[playerid][pLevel]+1; // As soon as its executed, It adds +1 to your score.
new expamount = nxtlevel*levelexp+100; // Exp amount, Its 2 CURRENTLY but you can raise it by adding +number after levelexp
if(PlayerInfo[playerid][pExp] < expamount) // Checks if player's exp amount is above the required one or not.
{
// format(points,sizeof(points)," You need [%d] Exp Points in order to level up, You currently have [%d]",expamount,PlayerInfo[playerid][pExp]); // Format, This is pretty obvious.
//SendClientMessage(playerid,white,points); // Sends the message.
return 1;
}
else
{
PlayerInfo[playerid][pExp] = 0; // Sets the EXP amount to 0 as you level'd up.
PlayerInfo[playerid][pLevel]++; // Adds a level.
//format(string,sizeof(string),"~g~Your now level:[%d]",PlayerInfo[playerid][pLevel]); // Format.
//GameTextForPlayer(playerid,string,6000,1); // Sends gametext about his new level'ing up.
return 1;
}
}
return 1;
}
return 1;
}