![]() |
Reducing damage
I have been using the following code to deny headshots to humans.
How would i modify this to reduce damage taken? What I would like to do is deny all headshots and reduce all other damage to humans by half. Code:
// --------------------------------------------------------------------------------------- |
Re: Reducing damage
try and take a look at PMB's damage, headshot and no-headshot metamod plugins' source code.
Hope this helps :) |
Re: Reducing damage
Quote:
I guess I will look inthe sdk to see how the results of TraceLine() are used to inflict damage... >Edit< Hey, wait, Daaaaaa! I will change a "-" to a "+" and use this to do exactly what I want! Thanks again, and of course thanks PMB! |
Re: Reducing damage
Hook the Damage message.
It would look something like this: Code:
void NSAMessage_Damage(void *buf, bool &bSend) |
Re: Reducing damage
Is it possible to override the player class' takedamage function, modifiy the incoming data, then send it back?
|
Re: Reducing damage
I don't think so..
cs does it's own kind of damage stuff.. all internal so unless you start memory hacking you probably won't beable to intercept it.. then after all that it sends the packet message just to update the HUD of the player and sets pEdict->v.health... |
Re: Reducing damage
Quote:
|
All times are GMT +2. The time now is 00:47. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.