Raised This Month: $18 Target: $400
 4% 

SDKHooks What R U Doing M8


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thecount
Veteran Member
Join Date: Jul 2013
Old 11-30-2014 , 13:57   SDKHooks What R U Doing M8
Reply With Quote #1

Ok, so a small problem.
PHP Code:
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype){
    if(
protection[victim]){
        
damage 1.0;
        return 
Plugin_Changed;
    }
    return 
Plugin_Continue;

When a client is protected and the damage is changed to 1, then rocket jumping and sticky jumping no longer works. Is there a way to fix this or will SDKHooks always do that when I change the damage?
thecount is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 11-30-2014 , 14:36   Re: SDKHooks What R U Doing M8
Reply With Quote #2

Quote:
Originally Posted by thecount View Post
Ok, so a small problem.
PHP Code:
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype){
    if(
protection[victim]){
        
damage 1.0;
        return 
Plugin_Changed;
    }
    return 
Plugin_Continue;

When a client is protected and the damage is changed to 1, then rocket jumping and sticky jumping no longer works. Is there a way to fix this or will SDKHooks always do that when I change the damage?
Instead of using SDKHooks use addcond 51 will cause player to appear invicible

Or use attribute to increase self pushback force

Or use attribute to decrease damage to 0 for all weapons using tf2attributes
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player

Last edited by Michalplyoutube; 11-30-2014 at 14:40.
Michalplyoutube is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 11-30-2014 , 15:11   Re: SDKHooks What R U Doing M8
Reply With Quote #3

It's push-force damage.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 11-30-2014 , 15:37   Re: SDKHooks What R U Doing M8
Reply With Quote #4

Quote:
Originally Posted by Dr. Greg House View Post
It's push-force damage.
There are two one is for self and second is extra knockback

self dmg push force increased

damage force increase text

from http://optf2.com/440/attributes
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player
Michalplyoutube is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 11-30-2014 , 17:56   Re: SDKHooks What R U Doing M8
Reply With Quote #5

Try using this definition of the OnTakeDamage function instead:
Code:
(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon, Float:damageForce[3], Float:damagePosition[3], damagecustom)

Last edited by bl4nk; 11-30-2014 at 17:56. Reason: fixed text formatting
bl4nk is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-01-2014 , 01:18   Re: SDKHooks What R U Doing M8
Reply With Quote #6

From what i've seen, setting the damageforce won't do anything in most cases. It's going to be scaled based on the damage. Likewise, setting the damage will scale the damageforce accordingly. Probably in games that have the ontakedamagealive, some other calculations are being done and overriding this. I've not yet played with otdalive, but my guess is that doing stuff there would have better results.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 12-01-2014 , 01:27   Re: SDKHooks What R U Doing M8
Reply With Quote #7

It was just an fyi from my side, the problem is already solved. He should use the attributes specifically made for that.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House is offline
Reply


Thread Tools
Display Modes

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 14:13.


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