PHP Code:
#include < amxmodx >
#include < hamsandwich >
public plugin_init( ) {
register_plugin( "Death Message", "1.0", "BuckShot" )
RegisterHam( Ham_Killed, "player", "Fwd_Ham_Killed_Post", 1 )
}
public Fwd_Ham_Killed_Post( iVictim, iAttacker ) {
new szAttackername[ 32 ]
new szVictimname[ 32 ]
get_user_name( iAttacker, szAttackername, charsmax( szAttackername ) )
get_user_name( iVictim, szVictimname, charsmax( szVictimname ) )
client_print( 0, print_chat, "%s was killed by %s", szVictimname, szAttackername )
}
Example. Will display a message saying "Player was killed by player" when a player dies.
__________________