17.08.2010, 12:44
pawn Код:
public OnPlayerDeath(playerid, killerid, reason
{
SetPVarInt(playerid, "Deaths", GetPVarInt(playerid, "Deaths")+1);
SetPVarInt(killerid, "Kills", GetPVarInt(killerid, "Kills")+1);
new strdbe[20];
format(strdbe, 20, "Kills: %d", GetPVarInt(killerid, "Kills"));
TextDrawDestroy(Textdraw4); // destroys the current textdraw, can cause lagg if it doesn't get refreshed
TextDrawSetString(strdbe, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw4); // shows the new stats but this time with the new amount of kills
format(strdbe, 20, "Deaths: %d", GetPVarInt(playerid, "Deaths"));
TextDrawDestroy(Textdraw3); // destroys the current textdraw, can cause lagg if it doesn't get refreshed
TextDrawSetString(strdbe, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw3); // shows the new stats but this time with the new amount of deaths
return 1;
}