Raised This Month: $ Target: $400
 0% 

TESS-One


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 12-18-2010 , 17:07   Re: TESS-One
Reply With Quote #1

Quote:
Originally Posted by Exploited View Post
If it is easily changed, how would I change it to block only the knife?

PHP Code:
public tess_TakeDamage(thisidinflictoridattackerFloat:damagedamagebits)
{
    if ( 
damagebits DMG_BULLET && g_HasTessOne[this] && g_IsImmune[this] && get_user_weapon(idattacker) != CSW_KNIFE ) {
        
SetHamParamFloat(40.0)
        return 
HAM_SUPERCEDE
    
}
    
    return 
HAM_IGNORED

Would removing the ! in != CSW_KNIFE ) be sufficient? It would make sense, but everything is so damn complicated so I doubt it is that simple.

Change to this:
Code:
 && get_user_weapon(idattacker) == CSW_KNIFE
Then remove the bit check, no need.

EDIT: Or actually, if I recall correctly, knife is still DMG_BULLET. Best to keep it to avoid picking up HEs, as well. You could otherwise add an inflictor check.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
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 20:16.


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