24.07.2015, 11:24
Put it in OnPlayerDeath ...
At YOUR_TEXTDRAW you need to use the textdraw you created in OnGameModeInit, also the OLD textdraw which you store in a variable
pawn Код:
//
if(killerid != INVALID_PLAYER_ID || killerid != playerid)
{
new rand = random(sizeof(SoundOnDeath)), Float:Xk, Float:Yk, Float:Zk;
GetPlayerPos(killerid, Xk, Yk, Zk);
PlayerPlaySound(killerid, SoundOnDeath[rand][0],Xk,Yk,Zk);
SendDeathMessage(killerid, playerid, reason);
SetPVarInt(killerid, "PKills", PlayerInfo[killerid][pKills]++);
SetPVarInt(playerid, "PDeaths", PlayerInfo[playerid][pDeaths]++);
roundstats[playerid][rKills]++;
roundstats[playerid][rDeaths]++;
SetPlayerHealth(killerid, 100);
SetPlayerArmour(killerid, 100);
new topkillermessage[128];
new highestkillerid = GetHighestKiller();
GetPlayerName(highestkillerid, topkillermessage, MAX_PLAYER_NAME);
strcat(topkillermessage, " has the most amount of kills.");
TextDrawSetString(YOUR_TEXTDRAW, topkillermessage);
}