Raised This Month: $51 Target: $400
 12% 

How to disable trigger_hurt heal on map?


Post New Thread Reply   
 
Thread Tools Display Modes
Fastmancz
Senior Member
Join Date: Jul 2013
Location: Czech Republic
Old 07-30-2015 , 05:50   Re: How to disable trigger_hurt heal on map?
Reply With Quote #11

Quote:
Originally Posted by Benoist3012 View Post
Yes because this code kill the trigger so you can't enable it, you need to replace Kill by Disable

Thanks for reply. I try:
PHP Code:
public Action OnTouch(int entityint other)
 {
    for(new 
1<= MaxClientsi++)
    {
    if(
IsClientInGame(i))
    if (
other <= MaxClients)
         return 
Plugin_Continue;
     
AcceptEntityInput(other"Disable");
     return 
Plugin_Handled;
    }
 return 
Plugin_Handled;
 } 
But not working. Players Triggers still heals.

Last edited by Fastmancz; 07-30-2015 at 05:52.
Fastmancz is offline
Fastmancz
Senior Member
Join Date: Jul 2013
Location: Czech Republic
Old 07-31-2015 , 06:07   Re: How to disable trigger_hurt heal on map?
Reply With Quote #12

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 FindEntityByClassnameiEnt"trigger_hurt") ) != -
    { 
        if (
GetEntPropFloat(iEntProp_Data"m_flDamage") < 0
        { 
            if(
Enabled
                
AcceptEntityInput(iEnt,"Disable"); 
            else 
                
AcceptEntityInput(iEnt,"Enable"); 
        } 
    } 
    if(
Enabled
        
Enabled false
    else 
        
Enabled true

Fastmancz is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode