View Single Post
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 12-05-2019 , 11:27   Re: Detect c4 carrier
Reply With Quote #2

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

#define PLUGIN "Notify about C4 victim"
#define VERSION "1.0"
#define AUTHOR "redivcram"

public plugin_init() {
    
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
RegisterHam(Ham_Killed"player""HamPlayerKilled"1);
}

public 
HamPlayerKilled(iVictimiAttacker)
{
    if((
iVictim != iAttacker) && user_has_weapon(iVictimCSW_C4)) {
        
        new 
szCarrierName[32];
        
get_user_name(iVictimszCarrierNamecharsmax(szCarrierName));
        
        
client_print(iAttacker0"You just killed a c4 carrier guy (%s)"szCarrierName);
    }


Last edited by redivcram; 12-05-2019 at 12:22.
redivcram is offline