Raised This Month: $32 Target: $400
 8% 

List of SDKHook Damage Type


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ilham92-cc-sakura
Senior Member
Join Date: Oct 2008
Location: /var/www/index.html
Old 04-05-2020 , 09:38   List of SDKHook Damage Type
Reply With Quote #1

I write a little code (SDKHook) for damage:
PHP Code:
public Action SDK_OnTakeDamage(int victimint &attackerint &inflictorfloat &damageint &damagetype)
{
    
PrintToChatAll("\x01Victim: \x05%N\x01, Attacker: \x05%N, \x01Type: \x03%d"victimattackerdamagetype);
    if (
victim && attacker == 0
    {
        if (
damagetype == 32// fall damage
            
ForcePlayerSuicide(victim);

        return 
Plugin_Continue;
    }

During in-game, it print:
Code:
Victim: Carol Brown, Attacker: Brandon Flores, Type: -2147483646
Victim: Harold Scott, Attacker: Rebecca Edwards, Type: 263168
Victim: Anime4000, Attacker: Rebecca Edwards, Type: 263168
Victim: Thomas Johnson, Attacker: Brandon Flores, Type: -2147483646
Victim: Anime4000, Attacker: Rebecca Edwards, Type: 263168
Victim: Anime4000, Attacker: Rebecca Edwards, Type: 263168
Victim: Harold Scott, Attacker: Francis, Type: -1610612734
Victim: Carol Brown, Attacker: Francis, Type: -1610612734
Victim: Harold Scott, Attacker: Francis, Type: -1610612734
Victim: Harold Scott, Attacker: Francis, Type: -1610612734
Victim: Harold Scott, Attacker: Francis, Type: -1610612734
Victim: Harold Scott, Attacker: Francis, Type: -1610612734
Victim: Harold Scott, Attacker: Francis, Type: -1610612734
Victim: Louis, Attacker: Rebecca Edwards, Type: 263168
Victim: Harold Scott, Attacker: Rebecca Edwards, Type: 263168
Victim: Anime4000, Attacker: Rebecca Edwards, Type: 263168
Victim: Louis, Attacker: Brenda Bennett, Type: -1073741822
Victim: Anime4000, Attacker: Brandon Flores, Type: -2147483646
Victim: Thomas Johnson, Attacker: Harold Scott, Type: -2147483646
Victim: Francis, Attacker: Annie Robinson, Type: -1073741822
Victim: Brenda Bennett, Attacker: Rebecca Edwards, Type: 263168
Victim: Louis, Attacker: Rebecca Edwards, Type: 263168
Victim: Anime4000, Attacker: Rebecca Edwards, Type: 263168
Victim: Francis, Attacker: Annie Robinson, Type: -1073741822
Victim: Anime4000, Attacker: Rebecca Edwards, Type: 263168
Victim: Anime4000, Attacker: Brandon Flores, Type: -2147483646
Victim: Francis, Attacker: Annie Robinson, Type: -1073741822
Victim: Francis, Attacker: Annie Robinson, Type: -1073741822
Victim: Thomas Johnson, Attacker: Bill, Type: -2147483646
Victim: Francis, Attacker: Annie Robinson, Type: -1073741822
Victim: Brenda Bennett, Attacker: Rebecca Edwards, Type: 263168
Victim: Louis, Attacker: Rebecca Edwards, Type: 263168
Victim: Anime4000, Attacker: Rebecca Edwards, Type: 263168
Victim: Thomas Johnson, Attacker: Bill, Type: -2147483646
Victim: Louis, Attacker: Brandon Flores, Type: -1073741822
Victim: Francis, Attacker: Annie Robinson, Type: -2147483646
Victim: Thomas Johnson, Attacker: Annie Robinson, Type: -2147483646
Victim: Thomas Johnson, Attacker: Brenda Bennett, Type: -2147483646
Victim: Carol Brown, Attacker: Brenda Bennett, Type: -2147483646
Victim: Francis, Attacker: Annie Robinson, Type: -2147483646
Victim: Louis, Attacker: Rebecca Edwards, Type: 263168
Victim: Anime4000, Attacker: Rebecca Edwards, Type: 263168
Victim: Anime4000, Attacker: Brandon Flores, Type: -1073741822
Victim: Carol Brown, Attacker: Brandon Flores, Type: -2147483646
Victim: Francis, Attacker: Annie Robinson, Type: -2147483646
Victim: Carol Brown, Attacker: Bill, Type: -2147483646
Victim: Anime4000, Attacker: Brandon Flores, Type: -2147483646
Victim: Francis, Attacker: Annie Robinson, Type: -1073741822
Victim: Carol Brown, Attacker: Annie Robinson, Type: -2147483646
Victim: Francis, Attacker: Annie Robinson, Type: -1073741822
Victim: Harold Scott, Attacker: Annie Robinson, Type: -1073741822
Victim: Harold Scott, Attacker: Annie Robinson, Type: -2147483646
Victim: Francis, Attacker: Annie Robinson, Type: -1073741822
Victim: Carol Brown, Attacker: Annie Robinson, Type: -1073741822
Victim: Anime4000, Attacker: Louis, Type: -2147483646
Victim: Anime4000, Attacker: Brandon Flores, Type: -1073741822
Victim: Harold Scott, Attacker: Annie Robinson, Type: -2147483646
Victim: Harold Scott, Attacker: Brenda Bennett, Type: -1073741822
Victim: Harold Scott, Attacker: Annie Robinson, Type: -1073741822
Victim: Harold Scott, Attacker: Annie Robinson, Type: -1073741822
Victim: Harold Scott, Attacker: Annie Robinson, Type: -1073741822
Victim: Harold Scott, Attacker: Annie Robinson, Type: -2147483646
Victim: Francis, Attacker: Annie Robinson, Type: -1073741822
Victim: Harold Scott, Attacker: Annie Robinson, Type: -2147483646
Victim: Carol Brown, Attacker: Louis, Type: -2147483646
Victim: Harold Scott, Attacker: Annie Robinson, Type: -2147483646
Victim: Harold Scott, Attacker: Annie Robinson, Type: -1073741822
Victim: Harold Scott, Attacker: Annie Robinson, Type: -1073741822
Victim: Carol Brown, Attacker: Brenda Bennett, Type: -2147483646
Victim: Harold Scott, Attacker: Annie Robinson, Type: -2147483646
Victim: Anime4000, Attacker: Console, Type: 32
#Cstrike_TitlesTXT_Game_connected
I wonder where those value come from? Is there any list for this?
__________________
ilham92-cc-sakura is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-05-2020 , 09:59   Re: List of SDKHook Damage Type
Reply With Quote #2

damage types
https://sm.alliedmods.net/new-api/sdkhooks/__raw

PHP Code:
if(damagetype DMG_BURN)
{
 
// burn


https://code.tutsplus.com/articles/u...--active-11301

-
__________________
Do not Private Message @me

Last edited by Bacardi; 04-05-2020 at 10:03.
Bacardi is offline
ilham92-cc-sakura
Senior Member
Join Date: Oct 2008
Location: /var/www/index.html
Old 04-05-2020 , 13:16   Re: List of SDKHook Damage Type
Reply With Quote #3

it is possible to print damagetype like DMG_BURN instead of Number?
__________________
ilham92-cc-sakura is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-05-2020 , 14:12   Re: List of SDKHook Damage Type
Reply With Quote #4

Funny, in CSGO, if you throw molotov at enemy, it send two damages
PHP Code:
// molotov to enemy
Ferris damage 1 damagetype  DMG_CLUB
Ferris damage 2 damagetype DMG_GENERIC

// gun
Allen damage 22 damagetype  DMG_BULLET DMG_NEVERGIB 
play with this
Bacardi is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 04-06-2020 , 11:49   Re: List of SDKHook Damage Type
Reply With Quote #5

Also, Valve wiki Damage Types
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-06-2020 , 12:37   Re: List of SDKHook Damage Type
Reply With Quote #6

Nice. So there are two more bits? Maybe test those, later...
__________________
Do not Private Message @me
Bacardi 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 20:47.


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