I got it, it's working now. Thanks Hamlet.
Code:
public fw_Item_PostFrame(entity)
{
if (!is_valid_ent(entity))
return HAM_IGNORED;
static id;
id = get_pdata_cbase(entity, OFFSET_WEAPONOWNER, OFFSET_LINUX_WEAPONS);
if (!is_user_alive(id))
return HAM_IGNORED;
if (!GetPlayerBit(g_has_self_destruct, id))
return HAM_IGNORED;
static func_bomb_target
func_bomb_target = find_ent_by_class(-1, "func_bomb_target");
if (is_valid_ent(func_bomb_target))
fake_touch(func_bomb_target, id)
return HAM_HANDLED;
}
Now I just need to find a way to alter the explosion. I have a doubt, how can I get the owner of the C4 entity (w_c4.mdl)? I tried with ENT_owner (engine) but it didn't work.
__________________