15.03.2011, 21:13
I need Kill list who killed whom with weapon icon (On the right side of the screen).
Thx.
Thx.
new name[MAX_PLAYER_NAME];
new string[256];
new deathreason[20];
GetPlayerName(playerid, name, sizeof(name));
GetWeaponName(reason, deathreason, 20);
if (killerid == INVALID_PLAYER_ID) {
switch (reason) {
case WEAPON_DROWN:
{
format(string, sizeof(string), "*** %s drowned.)", name);
}
default:
{
if (strlen(deathreason) > 0) {
format(string, sizeof(string), "*** %s died. (%s)", name, deathreason);
} else {
format(string, sizeof(string), "*** %s died.", name);
}
}
}
}
else {
new killer[MAX_PLAYER_NAME];
GetPlayerName(killerid, killer, sizeof(killer));
if (strlen(deathreason) > 0) {
format(string, sizeof(string), "*** %s killed %s. (%s)", killer, name, deathreason);
} else {
format(string, sizeof(string), "*** %s killed %s.", killer, name);
}
}
SendClientMessageToAll(COLOR_BRIGHTRED, string);
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
}