Raised This Month: $ Target: $400
 0% 

detect bomb damage in Ham_TakeDamage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-29-2009 , 18:00   Re: detect bomb damage in Ham_TakeDamage
Reply With Quote #6

Quote:
Originally Posted by SnoW View Post
And still it should be:
Code:
if ( get_user_team( iAttacker ) == get_user_team( iVictim ) || !get_pcvar_num( CVAR_mp_friendlyfire ))
    return HAM_IGNORED;
Wrong.
His code will work as:

If players are not on same team, continue.
If players are on the same team and mp_friendlyfire is enabled, continue.
If players are on the same team and mp_friendlyfire is disabled, stop.

Your code will work as:

If players are not on the same team, stop.
If players are on the same team and mp_friendlyfire is enabled, stop.
If players are on the same team and mp_friendlyfire is disabled, continue.

It's simple logic.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
 



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 09:05.


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