AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Disabling fall damage in tf2 via sdkhooks (https://forums.alliedmods.net/showthread.php?t=305353)

misterG 02-16-2018 17:51

Disabling fall damage in tf2 via sdkhooks
 
I just need a simple plugin that blocks fall damage in tf2 via sdkhooks, not tf2 attributes. I would appreciate if somebody can do it for me, it should be really simple.

Powerlord 02-16-2018 18:16

Re: Disabling fall damage in tf2 via sdkhooks
 
1 Attachment(s)
I haven't tested this, but it's based off of some of the logic from PropHunt Redux.

misterG 02-17-2018 07:32

Re: Disabling fall damage in tf2 via sdkhooks
 
Quote:

Originally Posted by Powerlord (Post 2578593)
I haven't tested this, but it's based off of some of the logic from PropHunt Redux.

Thank you, works like charm.

misterG 02-17-2018 13:19

Re: Disabling fall damage in tf2 via sdkhooks
 
If i modify the code like this, will it block fall damage when it's more than 50 ?

Code:

if (g_Cvar_Enabled.BoolValue && victim > 0 && victim <= MaxClients && IsClientInGame(victim) &&
                damagetype & DMG_FALL && damage>50)


Powerlord 02-17-2018 14:33

Re: Disabling fall damage in tf2 via sdkhooks
 
Quote:

Originally Posted by misterG (Post 2578718)
If i modify the code like this, will it block fall damage when it's more than 50 ?

Code:

if (g_Cvar_Enabled.BoolValue && victim > 0 && victim <= MaxClients && IsClientInGame(victim) &&
                damagetype & DMG_FALL && damage>50)


Use 50.0 instead of 50 and it should work.


All times are GMT -4. The time now is 23:17.

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