detect bomb damage in Ham_TakeDamage
im using Ham_TakeDamage to detect damage but for some reason bomb explosion wont damage T's i was wondering how i can make it detect if the damage is from the bomb and if so then skip the below functions and damage the player regulary
|
Re: detect bomb damage in Ham_TakeDamage
bump
|
Re: detect bomb damage in Ham_TakeDamage
Making new code to fix an other code isn't really effective. I would prefer posting your plugin here and then we could find out what's causing the problem and fix it. Ofc if you have some reason why you don't want to do it, but can't see any.
|
Re: detect bomb damage in Ham_TakeDamage
i think i found the fix for my issue. i had
Code:
if ( get_user_team( iAttacker ) == get_user_team( iVictim ) && !get_pcvar_num( CVAR_mp_friendlyfire ))Code:
if ( get_user_team( iAttacker ) == get_user_team( iVictim ) && !get_pcvar_num( CVAR_mp_friendlyfire )) |
Re: detect bomb damage in Ham_TakeDamage
Quote:
Code:
if ( get_user_team( iAttacker ) == get_user_team( iVictim ) || !get_pcvar_num( CVAR_mp_friendlyfire )) |
Re: detect bomb damage in Ham_TakeDamage
Quote:
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. |
Re: detect bomb damage in Ham_TakeDamage
Quote:
|
Re: detect bomb damage in Ham_TakeDamage
how do you detect that damage is by C4 explosion in Ham_TakeDamage ?
im tring to block bomb damage and killing but no luck atm )= looking forward for a little help |
Re: detect bomb damage in Ham_TakeDamage
Personally I found a method:
PHP Code:
It's just an opinion... What do you think ? |
Re: detect bomb damage in Ham_TakeDamage
|
| All times are GMT -4. The time now is 09:05. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.