Problem with headshot detection.
Hello,
I have this code and should give a point stored in a vault if it is headshot. More details down: PHP Code:
See this picture: Click for ScreenShot |
Re: Problem with headshot detection.
As for CS, read 3rd byte of DeathMsg event.
|
Re: Problem with headshot detection.
Would need to see more code.. e.g. where is the code you posted executed?
|
Re: Problem with headshot detection.
This is registered event:
PHP Code:
PHP Code:
|
Re: Problem with headshot detection.
Adi, you're doing it wrong. You don't have to read arguments from Handsandwich forwards with read_x() functions. There are none passed in that way, however they are directly passed. Check this link for more details: http://amxmodx.org/api/ham_const. In your case, you should register "DeathMsg" (that's probably the last resort).
Here's a little example: http://amxxmodx.ru/core/amxmodxinc/7...h-sobytiy.html. |
Re: Problem with headshot detection.
Use DeathMsg. I started out making comments on your code but it got messy since there are a ton of things wrong. I removed things that were not needed, including getting the player names.
PHP Code:
|
Re: Problem with headshot detection.
If you are using Fakemeta
You may be able to use this. PHP Code:
|
Re: Problem with headshot detection.
Yeah, that will work, I've used it my aimbot detection plugin but forgot about it. But still, I don't see a reason to not use DeathMsg, which provides the advantage of having condition filters and it's easy to get weapon name/headshot.
PHP Code:
|
Re: Problem with headshot detection.
Solved, thank you all for your help. I've been used @Bugsy's way.
|
All times are GMT -4. The time now is 03:54. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.