[Include] GetPlayerAimedBodyPart - Detect Headshots, Armshots, Legshots !
#7

First, thanks for your comments and feedback.

@ TheArcher : Thanks for the suggestion. It is the first time I release an "include" so I didn't really know how I should post it. I will consider what you said about the callbacks.

@ Lorenc & Dwane : Of course there are some imperfections, but as you can see in the video, the result is pretty good, as every distance and with every weapon. I ******d the "GetPlayerWeaponVector" stuff but couldn't find anything interesting.
However in this script, I considered the fact that, when you aim with a weapon, the GetPlayerCameraFrontVector (on the Z axis) won't be really accurate, except with the sniper rifle. Indeed, when you're aiming, the player CameraFrontVector doesn't look exactly where you aim, the crosshair, but below it. At first I didn't consider this, then the results were awful and you could make headshots from very short distances only. That's why I used some trigo with angles I determined for each kind of weapon, making some tests, to get the most accurate result I could.
About the lag, since it uses the player pos, it will sure be tough to hit a player with lag, but it always is ^^ Although (if I can I will make some tests with other people), if you aim in front of the player while he moves, theoretically you could make headshots and stuff... To be tested.

@ Aldo : Unlike the last script I saw about this "headshot" problem, this script doesn't use any loop. It is only basic calculation from distances and player vectors. I can't test it on a 100+ server for now, but it would be interesting indeed if someone could tell us what it does... Though I don't think this eats much Ram.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)