View Single Post
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 05-27-2019 , 21:36   Re: detect self kill ?
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <hamsandwich>

public plugin_init() {
    
    
RegisterHam(Ham_Killed"player""hamPlayerKilled"1);
}

public 
hamPlayerKilled(victimattacker) {
    
    if(
is_user_connected(victim)) {

        if(
victim == attacker || attacker == 0) {
        
            new 
name[32];
            
get_user_name(victimnamecharsmax(name));
        
            
client_print(0print_chat"Player %s killed themselves..."name);
        }
    }

    return 
HAM_IGNORED;


Last edited by redivcram; 05-28-2019 at 11:10.
redivcram is offline