Raised This Month: $12 Target: $400
 3% 

Solved Diffirentiate Entities in World that I Can Shoot from Those I Shouldn't


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hellmonja
Senior Member
Join Date: Oct 2015
Old 06-25-2017 , 04:41   Diffirentiate Entities in World that I Can Shoot from Those I Shouldn't
Reply With Quote #1

Sorry for the long title. It's a bit hard to explain.

I have this weapon that coded the whole shooting process. It uses ExecuteHam(Ham_TakeDamage) to dish out the damage. Damaging players is fine. Damaging part of the world, however, is where the problem is. If I enabled the "World Damage" it does its work fine but it also destroys stuff I'm not supposed to, like the supply boxes on de_dust maps which the C4 is supposed to blow up. If disabled, I can't destroy certain objects like vents, windows, and even hostages, which is really weird.

So is there a way to filter out those objects I shouldn't be damaging?...
__________________

Last edited by hellmonja; 06-25-2017 at 10:38. Reason: Solved...
hellmonja is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 06-25-2017 , 06:10   Re: [HELP] Diffirentiate Entities in World that I Can Shoot from Those I Shouldn't
Reply With Quote #2

Try to check pev_takedamage for != DAMAGE_NO.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
hellmonja
Senior Member
Join Date: Oct 2015
Old 06-25-2017 , 10:37   Re: [HELP] Diffirentiate Entities in World that I Can Shoot from Those I Shouldn't
Reply With Quote #3

Quote:
Originally Posted by PRoSToTeM@ View Post
Try to check pev_takedamage for != DAMAGE_NO.
Hey it worked! Did it like this:
PHP Code:
if(pev(targetpev_takedamage) == 1)
                
ExecuteHam(Ham_TakeDamagetargetweaponidDAMAGE0DMG_BULLET); 
Tested it across 4 different maps and it works perfectly. Thanks, mate!...
__________________
hellmonja is offline
Reply


Thread Tools
Display Modes

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 07:54.


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