PHP Code:
/* == == == == == == == == Change the font to "Times New Roman" with a size of 10 for a good readability == == == == == == == */
#define PLUGIN "Block HE Explosion"
#define AUTHOR "Leon McVeran"
#define VERSION "beta"
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
public plugin_init(){
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_Think, "fwd_think")
}
public fwd_think(iEntity){
if (!pev_valid(iEntity)){
return FMRES_IGNORED
}
new szModel[25]
pev(iEntity, pev_model, szModel, 24)
if (equali(szModel, "models/w_hegrenade.mdl")){
new Float:fDmgTime
pev(iEntity, pev_dmgtime, fDmgTime)
if (fDmgTime <= get_gametime() && fDmgTime != 0.0){
func_nade_explode(iEntity)
return FMRES_SUPERCEDE
}
}
return FMRES_IGNORED
}
public func_nade_explode(iEntity){
if (!pev_valid(iEntity)){
return
}
// Your replacement for the explosion
// ...
}
__________________