Thread: TESS-One
View Single Post
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 12-18-2010 , 17:07   Re: TESS-One
Reply With Quote #19

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