SA-MP Forums Archive
Kill list - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Kill list (/showthread.php?tid=240426)



Kill list - Ondracec - 15.03.2011

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


Re: Kill list - Ironboy - 15.03.2011

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);



Re: Kill list - Ondracec - 15.03.2011

To OnGameModeInit ?


Re: Kill list - Mauzen - 15.03.2011

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


Re: Kill list - Ondracec - 15.03.2011

Thx..