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

Damage Tracker Plugin.. need what the player got hit by..


Post New Thread Reply   
 
Thread Tools Display Modes
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 03-20-2022 , 05:33   Re: Damage Tracker Plugin.. need what the player got hit by..
Reply With Quote #11

iInflictor should be the rocket entity.

Check his value and get his class name to know what entity is.


Also, you can check bitsDamageType. It can be DMG_GRENADE or DMG_BLAST. I don't know what TFC does.
https://www.amxmodx.org/api/hlsdk_const/__raw

Last edited by baneado; 03-20-2022 at 05:41.
baneado is offline
12Toastie
Junior Member
Join Date: Nov 2014
Old 03-21-2022 , 02:12   Re: Damage Tracker Plugin.. need what the player got hit by..
Reply With Quote #12

Quote:
Originally Posted by Shadows Adi View Post
Does it returns any index at all?
Code:
get_user_weapon()
ive done this one.. but the problem again is if someone shot a rocket.. but switched to shotty before the rocket hits.. the damage would be registered to the shotty.

so what we want to find is...

1) what hit the player
2) who owned it (if any)
12Toastie is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 03-21-2022 , 05:59   Re: Damage Tracker Plugin.. need what the player got hit by..
Reply With Quote #13

What hits the player is the inflictor, if the inflictor is a player attacker index which is between 1 and 32 then use get_user_weapon other than that you should get the entity inflictor classname.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-21-2022 , 09:30   Re: Damage Tracker Plugin.. need what the player got hit by..
Reply With Quote #14

Yes, what Natsheh said, if !( 1 <= inflictor <= maxplayers ) [maxplayers would be a variable holding the value from get_maxplayers()] then it's a non-player entity id, use pev( inflictor , pev_owner ) to find out which player/attacker used it.
__________________

Last edited by Bugsy; 03-21-2022 at 11:27.
Bugsy 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 01:57.


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