View Single Post
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 12-05-2019 , 11:32   Re: Detect c4 carrier
Reply With Quote #3

But will it work? becuz it will be called only after player killed?
Quote:
Originally Posted by redivcram View Post
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(
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);
    }

__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh