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

FW_TakeDamage - Question


Post New Thread Reply   
 
Thread Tools Display Modes
Elusive138
Senior Member
Join Date: Dec 2010
Old 03-07-2011 , 02:15   Re: FW_TakeDamage - Question
Reply With Quote #21

I've actually seen it used without armour affecting it.. :S

As in all it does is set damage to, let's say, 70 and the victim takes 70 damage. With a full vest/helm.
Elusive138 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-07-2011 , 03:35   Re: FW_TakeDamage - Question
Reply With Quote #22

Since the hook is pre, why not just remove the player's armor and set the damage to the player's health?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
hellmoss
Senior Member
Join Date: Oct 2009
Location: ZOMBIE PLAGUE
Old 03-07-2011 , 13:03   Re: FW_TakeDamage - Question
Reply With Quote #23

Quote:
Originally Posted by Emp` View Post
Code:
SetHamParamFloat(4, 99999.9 );
Quote:
Originally Posted by Elusive138 View Post
Code:
SetHamParamFloat(4, float(get_user_health(victim)) + 1);
Doesn't work.

Quote:
Originally Posted by Elusive138 View Post
I've actually seen it used without armour affecting it.. :S

As in all it does is set damage to, let's say, 70 and the victim takes 70 damage. With a full vest/helm.
Do you guys think that I want to remove armor like as armor and vesthelm or just armor (The CS armor)? I'm talking about the energy on armor mode (Nanosuit Advanced), the energy is armor. First of all, I have 100% energy on armor mode (0 armor/armor+vesthelm), with that:
Code:
set_nano_energy(victim, 0.0)
I'm setting the energy to 0 when the nemesis attacks a player but the health does not decrease in a result of making a frag, it just stays at 100..
I want to make on the first hit of the nemesis both the energy and the health to fall down to 0.. and as a result the nemesis (attacker) to score a frag and the player to have +1 to deaths.

Did yall now get it ?
hellmoss is online now
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-07-2011 , 17:09   Re: FW_TakeDamage - Question
Reply With Quote #24

Quote:
Originally Posted by hellmoss View Post
Did yall now get it ?
I just told you what to do in my last post.
Do you ignore me because I'm not posting code?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 03-07-2011 , 19:22   Re: FW_TakeDamage - Question
Reply With Quote #25

Quote:
Originally Posted by Bugsy View Post
I have no idea. Have you tried it?
Sorry, it was "DMG_FALL" and "DMG_DROWN".

I didn't test it, but I saw this code in the HLSDK:

PHP Code:
    // Armor. 
    
if (pev->armorvalue && !(bitsDamageType & (DMG_FALL DMG_DROWN)) )// armor doesn't protect against fall or drown damage!
    
{
        
float flNew flDamage flRatio;

        
float flArmor;

        
flArmor = (flDamage flNew) * flBonus;

        
// Does this use more armor than we have?
        
if (flArmor pev->armorvalue)
        {
            
flArmor pev->armorvalue;
            
flArmor *= (1/flBonus);
            
flNew flDamage flArmor;
            
pev->armorvalue 0;
        }
        else
            
pev->armorvalue -= flArmor;
        
        
flDamage flNew;
    } 
Let me test now.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-07-2011 , 19:28   Re: FW_TakeDamage - Question
Reply With Quote #26

Quote:
Originally Posted by meTaLiCroSS View Post
I saw this code in the HLSDK:
Remember that CS's TakeDamage function is different than HL's.
However, I think the damage bits would still work the same for FALL/DROWN.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 03-07-2011 , 19:58   Re: FW_TakeDamage - Question
Reply With Quote #27

Quote:
Originally Posted by Exolent[jNr] View Post
Remember that CS's TakeDamage function is different than HL's.
However, I think the damage bits would still work the same for FALL/DROWN.
Yeah, I know about that. But, everything is possible, we only need to test.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
hellmoss
Senior Member
Join Date: Oct 2009
Location: ZOMBIE PLAGUE
Old 03-08-2011 , 08:43   Re: FW_TakeDamage - Question
Reply With Quote #28

Quote:
Originally Posted by Exolent[jNr] View Post
Since the hook is pre, why not just remove the player's armor and set the damage to the player's health?
Ok then, I think that's your last post.

Quote:
Originally Posted by Exolent[jNr] View Post
I just told you what to do in my last post.
Do you ignore me because I'm not posting code?
And no I didn't ignore it, I thought you were talking to Elusive138 and I didn't think of how to do it.

Now since I realized what you told...
I know how to remove the armor, but don't know how to inflict the damage directly to the health. Could you help me?

Last edited by hellmoss; 03-08-2011 at 08:47.
hellmoss is online now
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-08-2011 , 17:29   Re: FW_TakeDamage - Question
Reply With Quote #29

Set the damage argument to the player's health like you have already been doing.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
hellmoss
Senior Member
Join Date: Oct 2009
Location: ZOMBIE PLAGUE
Old 03-09-2011 , 06:52   Re: FW_TakeDamage - Question
Reply With Quote #30

Quote:
Originally Posted by Exolent[jNr] View Post
Set the damage argument to the player's health like you have already been doing.
Code, please .
hellmoss is online now
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 18:05.


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