Thanks for your code
Benoist3012! Perhaps this helps someone.
PHP Code:
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>
#define PLUGIN_VERSION "0.0.1"
bool:Enabled=true;
//Plugin Info
public Plugin:myinfo =
{
name = "TriggerHealDisabler",
author = "Benoist3012",
description = "Disable/Enable heal trigger hurt",
version = PLUGIN_VERSION,
//url = "http://forums.alliedmods.net/showthread.php?t=235884/"
};
//Commands, CVars & Events
public OnPluginStart()
{
RegAdminCmd("sm_update_heal_trigger",Command_Update,ADMFLAG_SLAY)
}
public OnMapStart()
{
Enabled=true;
}
public Action:Command_Update(client,args)
{
int iEnt = -1;
while( ( iEnt = FindEntityByClassname( iEnt, "trigger_hurt") ) != -1 )
{
if (GetEntPropFloat(iEnt, Prop_Data, "m_flDamage") < 0)
{
if(Enabled)
AcceptEntityInput(iEnt,"Disable");
else
AcceptEntityInput(iEnt,"Enable");
}
}
if(Enabled)
Enabled = false;
else
Enabled = true;
}