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

remove fall damage completely?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
steambob
Member
Join Date: Sep 2007
Old 03-08-2008 , 20:00   remove fall damage completely?
Reply With Quote #1

Does anyone have an idea how to remove damage on fall completely?

I mean when mp_falldamage is already set to 0. In this case you get a sound and a -10 hp on a fall. And I want to remove this too.

Would only some low-level hook help?
steambob is offline
Fredd
Veteran Member
Join Date: Jul 2007
Old 03-09-2008 , 06:52   Re: remove fall damage completely?
Reply With Quote #2

you could try this script but im not sure if it will or not
Code:
public OnPluginStart() {     HookEvent("player_falldamage", OnFallDamage, EventHookMode_Pre); } public Action:OnFallDamage(Handle:event, const String:name[], bool:dontBroadcast)     SetEventFloat(event, "damage", Float:0.0);
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd is offline
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 03-10-2008 , 03:59   Re: remove fall damage completely?
Reply With Quote #3

If hes wanting to get rid of fall damage in TF2, there is no player_falldamage. I know because I am in the same boat he is lol.
CrimsonGT is offline
steambob
Member
Join Date: Sep 2007
Old 03-10-2008 , 09:33   Re: remove fall damage completely?
Reply With Quote #4

@Fredd: thanks, I"ll try after I replace a broken HDD on my PC

@CrimsonGT: I am trying to do this for HL2DM but it might be the same as with TF2.
steambob is offline
steambob
Member
Join Date: Sep 2007
Old 03-11-2008 , 17:42   Re: remove fall damage completely?
Reply With Quote #5

There seems to be no player_falldamage in HL2MP as well:
Quote:
[SM] Native "HookEvent" reported: Game event "player_falldamage" does not exist
Hmm, does this then really mean that this can be done only on a lower level? If yes, then could anyone point the direction, please? Thanks.
steambob is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 03-11-2008 , 20:47   Re: remove fall damage completely?
Reply With Quote #6

If I am correct, player_hurt is also called when player falls with a "null" attacker, but this was for CS:S at least...

Check if it does the same thing for TF2...
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 03-11-2008 , 20:50   Re: remove fall damage completely?
Reply With Quote #7

I'm pretty sure it comes up as client 0 as the attacker. At least that's what happens when they die.
bl4nk is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 03-11-2008 , 21:19   Re: remove fall damage completely?
Reply With Quote #8

null = 0....
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 03-12-2008 , 00:38   Re: remove fall damage completely?
Reply With Quote #9

Null normally represents something that does not point to another object. I guess it could be 0, but that points to the server. :-/
bl4nk is offline
steambob
Member
Join Date: Sep 2007
Old 03-12-2008 , 04:46   Re: remove fall damage completely?
Reply With Quote #10

Yes, player_hurt is called with 0 attacker client, but it is called after the damage due to a fall done.
So, if player has not enough health to survive the fall, he is dead before I can compensate his health.

Is there anything to get the control before player_hurt? I've heard something about TakeDamage function, but I have no idea how to try to use it.
steambob 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 03:48.


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