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

Get Damage Taken [CSGO]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xShakedDev
Junior Member
Join Date: Jul 2016
Old 07-29-2016 , 16:46   Get Damage Taken [CSGO]
Reply With Quote #1

i want to check how much damage taken on shot and send it to client through hint
xShakedDev is offline
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 07-29-2016 , 17:21   Re: Get Damage Taken [CSGO]
Reply With Quote #2

PHP Code:
SDKHook(clientSDKHook_OnTakeDamageHook_OnTakeDamage); 
PHP Code:
public Action Hook_OnTakeDamage(int victimint &attackerint &inflictorfloat &damageint &damagetypeint &weaponfloat damageForce[3], float damagePosition[3]) 
PHP Code:
PrintHintText(clientsHintText); 

Last edited by Michael Shoe Maker; 07-29-2016 at 17:23.
Michael Shoe Maker is offline
xShakedDev
Junior Member
Join Date: Jul 2016
Old 07-29-2016 , 18:05   Re: Get Damage Taken [CSGO]
Reply With Quote #3

Quote:
Originally Posted by Michael Shoe Maker View Post
PHP Code:
SDKHook(clientSDKHook_OnTakeDamageHook_OnTakeDamage); 
what im doing with this?
PHP Code:
public Action Hook_OnTakeDamage(int victimint &attackerint &inflictorfloat &damageint &damagetypeint &weaponfloat damageForce[3], float damagePosition[3]) 
PHP Code:
PrintHintText(clientsHintText); 
xShakedDev is offline
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 07-29-2016 , 18:58   Re: Get Damage Taken [CSGO]
Reply With Quote #4

Hook the client, each time they take damage that function is called. There you will send hint text.
Michael Shoe Maker is offline
xShakedDev
Junior Member
Join Date: Jul 2016
Old 07-29-2016 , 19:25   Re: Get Damage Taken [CSGO]
Reply With Quote #5

Quote:
Originally Posted by Michael Shoe Maker View Post
Hook the client, each time they take damage that function is called. There you will send hint text.
im new so where to put this:
SDKHook(client, SDKHook_OnTakeDamage, Hook_OnTakeDamage);
xShakedDev is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-29-2016 , 20:42   Re: Get Damage Taken [CSGO]
Reply With Quote #6

Quote:
Originally Posted by xShakedDev View Post
im new so where to put this:
SDKHook(client, SDKHook_OnTakeDamage, Hook_OnTakeDamage);
put it in OnClientPutInServer
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 07-30-2016 , 05:31   Re: Get Damage Taken [CSGO]
Reply With Quote #7

In CSGO OnTakeDamage_Alive reports are more accurate result.
__________________
Neuro Toxin 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 11:49.


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