The OnDamaged hook is not working for some buttons if I shoot them ( If i drop a grenade it's working ).
I setted the damaged flag in round start ->
Code:
new ent = -1;
while((ent = FindEntityByClassname(ent, "func_button")) != -1)
{
SetEntProp(ent, Prop_Data, "m_spawnflags", GetEntProp(ent, Prop_Data, "m_spawnflags")|512);
HookSingleEntityOutput(ent, "OnDamaged", Event_ButtonShoot)
}
Any ideeas ? Some buttons trigger this hook and some not only when the damage is from the grenade.
Solved , the problem was the map.