AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   HE damage (https://forums.alliedmods.net/showthread.php?t=249366)

Versus1994 10-04-2014 17:49

HE damage
 
Hey guys,

how can I do so that HE grenade would not damage me like my teammates?

Flick3rR 10-05-2014 04:10

Re: HE damage
 
What do you mean? The HE won't hurt you if it is thrown by your teammates or vice versa? Explain better what are you trying to achieve.
But to direct you - use Ham_TakeDamage. Then use a check for damagebits if it is DMH_HE, but first
PHP Code:

#define DMG_HE (1<<24) 

then
PHP Code:

if(damagebits DMG_HE)
{
    
//The given damage is by HE


And then do your checks for teams/who is the attacker/the victim and etc.

Versus1994 10-05-2014 07:06

Re: HE damage
 
Done thanks.


All times are GMT -4. The time now is 17:33.

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