hi,
I maked this:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
new const PLUGIN[] = "Explosive Flashbangs"
new const VERSION[] = "0.1.0"
new const AUTHOR[] = "SAMURAI"
#define TE_EXPLOSION 3
new explode;
new pCvar;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
pCvar = register_cvar("explosive_flashbangs","1");
register_forward(FM_EmitSound,"fw_emitsound");
}
public plugin_precache()
{
explode = precache_model("sprites/explode1.spr");
}
public fw_emitsound(entity,channel,const sample[],Float:volume,Float:attenuation,fFlags,pitch)
{
if( !get_pcvar_num(pCvar) && !equali(sample,"weapons/flashbang-1.wav") && !equali(sample,"weapons/flashbang-2.wav") )
return FMRES_IGNORED;
flashbang_explode(entity);
return FMRES_IGNORED;
}
public flashbang_explode(greindex)
{
if(!pev_valid(greindex)) return;
new Float:origin[3];
pev(greindex,pev_origin,origin);
message_begin( MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(TE_EXPLOSION);
write_coord(floatround(origin[0]));
write_coord(floatround(origin[1]));
write_coord(floatround(origin[2]));
write_short(explode);
write_byte(80);
write_byte(10);
write_byte(0);
message_end();
}
If can somebody implement to take damage because my plugin is only a fake explosion. So i need to implement to take damage on players (a fake damage
)
hope you are understand
Thanks