Results 1 to 3 of 3

Thread: [CoD4] Disable Health Regeneration

  1. #1
    Private
    Join Date
    Oct 2013
    Posts
    48
    Thanks
    10
    Thanked 4 Times in 2 Posts

    [CoD4] Disable Health Regeneration

    Hey there..
    I'm trying to disable health regeneration in my mod.
    I know there is a dvar like "scr_player_healthregeneration" but setting it to "0" doesnt work.
    Because of that i tried to force the health:

    Code:
    _health()
    {
    	while(1)
    	{
    		health = self.health;
    		self.maxhealth = health;
    		self iprintln("Health:" + health);
    		wait 1;
    	}
    }
    Its working but its not the best way to do it.
    If the player gets damage, he's breathing all the time and if he gets enough damage to get <1 its like a godmode.
    Does someone knows a better way to disable health regeneration in cod4?
    Last edited by DjTranceFire; 7th March 2014 at 11:14.

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    In CoD2 you can comment just one line out in maps/mp/gametypes/tdm.gsc as example, I don't know much about CoD4:

    PHP Code:
        thread maps\mp\gametypes\_menus::init();
        
    thread maps\mp\gametypes\_serversettings::init();
        
    thread maps\mp\gametypes\_clientids::init();
        
    thread maps\mp\gametypes\_teams::init();
        
    thread maps\mp\gametypes\_weapons::init();
        
    thread maps\mp\gametypes\_scoreboard::init();
        
    thread maps\mp\gametypes\_killcam::init();
        
    thread maps\mp\gametypes\_shellshock::init();
        
    thread maps\mp\gametypes\_hud_teamscore::init();
        
    thread maps\mp\gametypes\_deathicons::init();
        
    thread maps\mp\gametypes\_damagefeedback::init();
        
    //thread maps\mp\gametypes\_healthoverlay::init();
        
    thread maps\mp\gametypes\_friendicons::init();
        
    thread maps\mp\gametypes\_spectating::init();
        
    thread maps\mp\gametypes\_grenadeindicators::init(); 
    timescale 0.01

  3. #3
    Private
    Join Date
    Oct 2013
    Posts
    48
    Thanks
    10
    Thanked 4 Times in 2 Posts
    Thank you!
    It works the exact same way in cod4 :P
    I already opend the file but last time i cant find anything about it..
    Now it works and if i use that way i can also use dvars in server.cfg to enable or disable it!
    Thank you very much!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •