AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   SDKHooks What R U Doing M8 (https://forums.alliedmods.net/showthread.php?t=252331)

thecount 11-30-2014 13:57

SDKHooks What R U Doing M8
 
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?

Michalplyoutube 11-30-2014 14:36

Re: SDKHooks What R U Doing M8
 
Quote:

Originally Posted by thecount (Post 2229833)
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

Dr. Greg House 11-30-2014 15:11

Re: SDKHooks What R U Doing M8
 
It's push-force damage.

Michalplyoutube 11-30-2014 15:37

Re: SDKHooks What R U Doing M8
 
Quote:

Originally Posted by Dr. Greg House (Post 2229858)
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

bl4nk 11-30-2014 17:56

Re: SDKHooks What R U Doing M8
 
Try using this definition of the OnTakeDamage function instead:
Code:

(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon, Float:damageForce[3], Float:damagePosition[3], damagecustom)

friagram 12-01-2014 01:18

Re: SDKHooks What R U Doing M8
 
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.

Dr. Greg House 12-01-2014 01:27

Re: SDKHooks What R U Doing M8
 
It was just an fyi from my side, the problem is already solved. He should use the attributes specifically made for that.


All times are GMT -4. The time now is 08:26.

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