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

damagebits & DMG_HEGRENADE


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
weplausss
Member
Join Date: Mar 2010
Old 08-10-2011 , 19:07   damagebits & DMG_HEGRENADE
Reply With Quote #1

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;
}


Last edited by weplausss; 08-10-2011 at 19:16.
weplausss is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-10-2011 , 19:13   Re: damagebits & DMG_HEGRENADE
Reply With Quote #2

What exactly is wrong? The code appears correct so there should be a HUD displayed. Is the value displayed not what you expect?
__________________
Bugsy is offline
weplausss
Member
Join Date: Mar 2010
Old 08-10-2011 , 19:17   Re: damagebits & DMG_HEGRENADE
Reply With Quote #3

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;
}

weplausss is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-10-2011 , 19:23   Re: damagebits & DMG_HEGRENADE
Reply With Quote #4

I get a HUD message when I grenade myself, it was 35 in red.
__________________
Bugsy is offline
weplausss
Member
Join Date: Mar 2010
Old 08-10-2011 , 19:25   Re: damagebits & DMG_HEGRENADE
Reply With Quote #5

i don't get anything
weplausss is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-10-2011 , 19:38   Re: damagebits & DMG_HEGRENADE
Reply With Quote #6

Do you have any other plugins/forwards running that may be interfering?
__________________
Bugsy is offline
weplausss
Member
Join Date: Mar 2010
Old 08-11-2011 , 04:25   Re: damagebits & DMG_HEGRENADE
Reply With Quote #7

No only this
weplausss is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-11-2011 , 06:42   Re: damagebits & DMG_HEGRENADE
Reply With Quote #8

Well, I dunno if DMG_HEGRENADE exists in the game but you could try DMG_BLAST... but test on other explosives aswell, like C4.
__________________
Hunter-Digital is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-11-2011 , 06:47   Re: damagebits & DMG_HEGRENADE
Reply With Quote #9

It exists, added in CS.
__________________
Arkshine is offline
weplausss
Member
Join Date: Mar 2010
Old 08-11-2011 , 07:06   Re: damagebits & DMG_HEGRENADE
Reply With Quote #10

DMG_BLAST don't work
weplausss is offline
Reply



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 02:59.


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