Hello! Long time ago Valve broke my server dm_duel map making you cant anymore build in trigger_hurt and now I want fix this after players complaining about it. I changed trigger_hurt to healing and I want detect it. I already tried remove trigger_hurt and then replace them with trigger_multiple and detect when inside it, but I did run proble, it somehow dont work like trigger_hurt and it damage players on close it, not when they are in.
Code changes trigger_hurt to healing:
PHP Code:
public OnPluginStart()
{
HookEvent("game_start", OnRoundStart);
HookEvent("teamplay_round_start", OnRoundStart);
}
public Action:OnRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
new triggerHurt = INVALID_ENT_REFERENCE;
while ((triggerHurt = FindEntityByClassname(triggerHurt, "trigger_hurt")) != INVALID_ENT_REFERENCE)
{
new Float:damage = GetEntPropFloat(triggerHurt, Prop_Data, "m_flDamage");
if (damage > 0)
{
SetEntPropFloat(triggerHurt, Prop_Data, "m_flDamage", -damage);
}
}
}
__________________