AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   damagebits & DMG_HEGRENADE (https://forums.alliedmods.net/showthread.php?t=164383)

weplausss 08-10-2011 19:07

damagebits & DMG_HEGRENADE
 
i got problem with damagebits he grenade i make code but don't work.Only
DMG_HEGRENADE does not work.What is wrong with this

PHP Code:

#define DMG_HEGRENADE  (1<<24) 

PHP Code:

RegisterHam(Ham_TakeDamage"player""ham_takedamage2",0); 

PHP Code:

public ham_takedamage2(idinflictorattackerFloat:damagedamagebits) {
if((
damagebits DMG_BULLET) || (damagebits DMG_SLASH) || (damagebits DMG_HEGRENADE)){
        
set_hudmessage(255000.450.5020.14.00.10.1, -1)
        
show_hudmessage(attacker,"+%.1f^n"damage/3)
                
iExp[attacker] += floatround(damage)/3;
}



Bugsy 08-10-2011 19:13

Re: damagebits & DMG_HEGRENADE
 
What exactly is wrong? The code appears correct so there should be a HUD displayed. Is the value displayed not what you expect?

weplausss 08-10-2011 19:17

Re: damagebits & DMG_HEGRENADE
 
Shoot = get Xp
Knife attack = get xp
He grenade = nothing

PHP Code:

public ham_takedamage2(idinflictorattackerFloat:damagedamagebits) {
if((
damagebits DMG_BULLET) || (damagebits DMG_SLASH) || (damagebits DMG_HEGRENADE)){
        
set_hudmessage(255000.450.5020.14.00.10.1, -1)
        
show_hudmessage(attacker,"+%.1f^n"damage/3)
                
iExp[attacker] += floatround(damage)/3;
}



Bugsy 08-10-2011 19:23

Re: damagebits & DMG_HEGRENADE
 
I get a HUD message when I grenade myself, it was 35 in red.

weplausss 08-10-2011 19:25

Re: damagebits & DMG_HEGRENADE
 
i don't get anything

Bugsy 08-10-2011 19:38

Re: damagebits & DMG_HEGRENADE
 
Do you have any other plugins/forwards running that may be interfering?

weplausss 08-11-2011 04:25

Re: damagebits & DMG_HEGRENADE
 
No only this

Hunter-Digital 08-11-2011 06:42

Re: damagebits & DMG_HEGRENADE
 
Well, I dunno if DMG_HEGRENADE exists in the game but you could try DMG_BLAST... but test on other explosives aswell, like C4.

Arkshine 08-11-2011 06:47

Re: damagebits & DMG_HEGRENADE
 
It exists, added in CS.

weplausss 08-11-2011 07:06

Re: damagebits & DMG_HEGRENADE
 
DMG_BLAST don't work


All times are GMT -4. The time now is 03:21.

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