Kill list
#1

I need Kill list who killed whom with weapon icon (On the right side of the screen).
Thx.
Reply
#2

try this
pawn Код:
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);
Reply
#3

To OnGameModeInit ?
Reply
#4

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason);
}
Thats all. Maybe you can use the search the next time.

@Ironboy: Your code would be a selfscripted method, but he just asked for the default death messages
Reply
#5

Thx..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)