Raised This Month: $ Target: $400
 0% 

Ham_TakeDamage gibs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 01-06-2009 , 22:12   Ham_TakeDamage gibs
Reply With Quote #1

I'm trying to damage a player by calling a virtual Ham_TakeDamage function. Would it be possible to gib a player based on this damage (if they are killed) by altering the dmgbits? If so, what should I pass through for the dmgbits?
__________________
Bad_Bud is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 01-06-2009 , 22:23   Re: Ham_TakeDamage gibs
Reply With Quote #2

Quote:
Originally Posted by Bad_Bud View Post
I'm trying to damage a player by calling a virtual Ham_TakeDamage function. Would it be possible to gib a player based on this damage (if they are killed) by altering the dmgbits? If so, what should I pass through for the dmgbits?
PHP Code:
// Instant damage values for use with gmsgDamage 3rd value write_long(BIT)
#define DMG_GENERIC                     0           // Generic damage was done
#define DMG_CRUSH                       (1<<0)      // Crushed by falling or moving object
#define DMG_BULLET                      (1<<1)      // Shot
#define DMG_SLASH                       (1<<2)      // Cut, clawed, stabbed
#define DMG_BURN                        (1<<3)      // Heat burned
#define DMG_FREEZE                      (1<<4)      // Frozen
#define DMG_FALL                        (1<<5)      // Fell too far
#define DMG_BLAST                       (1<<6)      // Explosive blast damage
#define DMG_CLUB                        (1<<7)      // Crowbar, punch, headbutt
#define DMG_SHOCK                       (1<<8)      // Electric shock
#define DMG_SONIC                       (1<<9)      // Sound pulse shockwave
#define DMG_ENERGYBEAM                  (1<<10)     // Laser or other high energy beam 
#define DMG_NEVERGIB                    (1<<12)     // With this bit OR'd in, no damage type will be able to gib victims upon death
#define DMG_ALWAYSGIB                   (1<<13)     // With this bit OR'd in, any damage type can be made to gib victims upon death.
#define DMG_DROWN                       (1<<14)     // Drowning
#define DMG_PARALYZE                    (1<<15)     // Slows affected creature down
#define DMG_NERVEGAS                    (1<<16)     // Nerve toxins, very bad
#define DMG_POISON                      (1<<17)     // Blood poisioning
#define DMG_RADIATION                   (1<<18)     // Radiation exposure
#define DMG_DROWNRECOVER                (1<<19)     // Drowning recovery
#define DMG_ACID                        (1<<20)     // Toxic chemicals or acid burns
#define DMG_SLOWBURN                    (1<<21)     // In an oven
#define DMG_SLOWFREEZE                  (1<<22)     // In a subzero freezer
#define DMG_MORTAR                      (1<<23)     // Hit by air raid (done to distinguish grenade from mortar)
#define DMG_TIMEBASED                   (~(0x3fff)) // Mask for time-based damage 
__________________

Community / No support through PM
danielkza is offline
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 01-06-2009 , 23:01   Re: Ham_TakeDamage gibs
Reply With Quote #3

Awesome! Does explosive damage only gib when damage is over a certain amount, whereas alwaysgib always gibs?

Edit: seems like blast damage just blows things around.
__________________

Last edited by Bad_Bud; 01-06-2009 at 23:03.
Bad_Bud is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 01-06-2009 , 23:05   Re: Ham_TakeDamage gibs
Reply With Quote #4

Quote:
Originally Posted by Bad_Bud View Post
Awesome! Does explosive damage only gib when damage is over a certain amount, whereas alwaysgib always gibs?

Edit: seems like blast damage just blows things around.
I have no idea about every flag's behavior, but you can check the damage yourself and apply the flags according to your own conditions. Seems like the best alternative.
__________________

Community / No support through PM
danielkza is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 03-12-2009 , 16:58   Re: Ham_TakeDamage gibs
Reply With Quote #5

what if replace normal damage with another damge type like DMG_SHOCK ?
will it add any effects to when player is hit? will it display an icon to attacked or anything else?
and can i replace damage gibs without calling Ham_Take_damage again?

Last edited by Owyn; 03-12-2009 at 17:00.
Owyn is offline
Send a message via ICQ to Owyn
Dr.G
Senior Member
Join Date: Nov 2008
Old 03-12-2009 , 18:59   Re: Ham_TakeDamage gibs
Reply With Quote #6

should be easy to test... put this in a forward and exec that on a bot or something

ExecuteHamB(Ham_TakeDamage, id, iEnt, iAttacker, 10.0, DMG_GENERIC)
__________________
Dr.G is offline
Old 08-12-2009, 09:13
Bad_Bud
This message has been deleted by Bad_Bud. Reason: nevermind
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 09:17.


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