30.11.2013, 08:37
Didn't test it but it should work , please tell me if there any errors
pawn Код:
public OnPlayerUpdate(playerid)
{
if(PlayerInfo[playerid][pExp] == 8)
{
new string[126];
format(string, sizeof(string), "~r~Level up~n~~w~level %d", nxtlevel);
GameTextForPlayer(playerid,string,3000,3);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
if(PlayerInfo[playerid][pDonateRank] >= 3)
{
PlayerInfo[playerid][pLevel]++;
PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+5;
PlayerInfo[playerid][pLevel]++;
format(string, sizeof(string), "You became level %d, type /upgrade.", nxtlevel);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "You have %d upgrade points remaining.",PlayerInfo[playerid][gPupgrade]);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
return 1;
}