Raised This Month: $ Target: $400
 0% 

Damage message, help with DamageType


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Reel mafioso
Member
Join Date: Oct 2014
Location: wouldn't you like to kno
Old 09-06-2017 , 06:47   Damage message, help with DamageType
Reply With Quote #1

How do I use damagetype to filter out damage ONLY done by bullets?

Like this?
Code:
 register_event("Damage", "takedamage","b", "2>1", "3 = (1<<1)");
?

From hlsdk_const I found that list if damage types and for bullets it states:
Code:
 #define DMG_BULLET 1<<1
How do I use bitwise values in this case?
Or alternatively how could I read value of the third parameter and filter the rest with a simple if statement?
Reel mafioso 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:56.


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