Raised This Month: $ Target: $400
 0% 

[HELP] Regarding event_damage function


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 10-08-2017 , 07:29   Re: [HELP] Regarding event_damage function
Reply With Quote #24

Quote:
Originally Posted by Natsheh View Post
As i Told you this check is incorrect...

PHP Code:
iInflictor == CSW_AK47||CSW_M4A1||CSW_AWP  // inflictor is the attacker unless it was a hegrenade dmg in that case its the grenade entity index. 

here is the correct results...

PHP Code:
public fw_takedamage(iClientiInflictoriAttackerFloat:fDamagem_Damagebits)
{
    if(
iAttacker&& iAttacker != iClient && ((1<<get_user_weapon(iAttacker)) & ((1<<CSW_AK47)|(1<<CSW_M4A1)|(1<<CSW_AWP)) ) )
    {
        
SetHamParamFloat(4fDamage*get_pcvar_float(CVAR_DAMAGE_MULTI))
    }
    return 
HAM_IGNORED

Fixed
Now i will test it and please do tell if it contains any other bugs/mistakes
__________________
And I Am Back.

Last edited by TheSpaniard; 10-08-2017 at 07:30.
TheSpaniard 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 20:46.


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