How to tell if a person has purchased a helmet
Does anyone know how to do this? I tried searching the forums and functions and didnt see anything that will return whether or not a player has purchased/posesses a kevlar helmet.
This would be useful for a headshot modification I am planning on writing, please give me some input =) -TGK :twisted: |
kevlar and kevlar/helmet has the exact same indications in armor (100)
so im not sure if there is anything other then that, after a test we did u can take 2 more shots from a glock in head with helmet before dying this is something we been over a couple of times too. Deag |
they have a different id tho kevlar with helmet was given with 16 I remmeber and just kevlar was 15 I think, this is in stipper2...... but I dont know the exact thing for that in amxx.
|
something like get_user_helmet would be ideal =(
|
well the icon itself (the sprite) is different (it has a helmet on the kevlar) other then that i see no real difference unless you shoot someone in the head with and smg or pistol the it takes 2-4 shots (not sure if this post helps though)
|
I made a quick research and found an interesting offset.
Try this Code:
I noticed that the value at this offset is set to 0 when user has no armor, then 1 when user has bought armor, then 2 when user bought armor + helmet. Didn't test what happens if user has only armor 1, 34, 99 or whatever. Dont really know when you lose your helmet in CS, maybe after the first shot to your head is a good guess. Guess I can add this as a native in a future release of cs module, but I can use your feedback on this. What does it (get_offset_int(index, HELMET_OFFSET)) return etc... |
the offset functions are according to BAILOPAN broken in 0.16 and will be/has been fixed in 0.20
if my memory serves me correctly |
What about reading the icon down in the left-bottom side of the screen.
That has the Armor + Helmet. |
I'll be happy to test this this evening, will give you feedback then.
|
you can use the "ArmorType" event, used in register event, to catch whena player has armor and/or a helmet.
Code:
Hope this helps :) |
| All times are GMT -4. The time now is 14:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.