Code:
#include < amxmodx >
#include < engine >
public plugin_init( )
{
register_think( "grenade", "FwdGrenadeThink" );
}
public FwdGrenadeThink( iEntity )
{
if( is_valid_ent( iEntity ) )
{
static Float:fExplodeTime;
fExplodeTime = entity_get_float( iEntity, EV_FL_dmgtime );
if( fExplodeTime <= get_gametime( ) )
{
// iEntity is exploding
new iOwner = entity_get_edict( iEntity, EV_ENT_owner );
// iOwner = the person who threw it
}
}
}
__________________