13.03.2013, 06:32
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
#pragma unused reason
SetPlayerScore (killerid, GetPlayerScore (killerid) + 1);
UpdateKillsLevel(killerid);
return 1;
}
UpdateKillsLevel(playerid)
{
new kills = GetPlayerScore(playerid);
if(kills % 50 == 0) SetPlayerScore(playerid,GetPlayerScore(playerid) + 1);
new level = GetPlayerScore(playerid), string[32];
format(string, sizeof(string), "Level: %d\nKills: %d/%d", level, kills, level * 50);
PlayerTextDrawSetString(playerid, KillsLevel[playerid], string);
PlayerTextDrawShow( playerid , KillsLevel[playerid] );
}