headshot practice
by Hood [10th MD] · 2007-10-25 · 10 replies · 11380 views · 95 downloads
From the first post
n
nThis is super simple, and if anyone has suggestions to make it better - let me know. It's great, and you don't even have to reset the hitzones every time a user respawns.
n
nEnjoy!
n
nP.S. This isn't unique to DoD per se, but my idea was for DoD.
The thread
All 11 posts from 7 people on headshot practice, kept as they were written.
Threads: 7
Joined: Nov 2006
So, I decided it would be amazing to be able to practice getting headshots, to learn to be good with the garand - while facing the challenge of still taking normal damage.nnThis is super simple, and if anyone has suggestions to make it better - let me know. It's great, and you don't even have to reset the hitzones every time a user respawns.nnEnjoy!nnP.S. This isn't unique to DoD per se, but my idea was for DoD.
Threads: 103
Joined: May 2005
bout to goto sleep cause its quite late and i gotta work in a few hours..nnbut glancing at it really quickly.. instead of checking all "say" commands for if they start with "/" then checking if they equal "/hsmode" is a bit unneccesary..nni would do something like:n
register_clcmd("say /hsmode", "said".......nnand not check what its equal to in the function (as that will only catch when /hsmode is said)nnalso i see your setting hitzones right in the 'said' function when turning it off.. but when turning it on you call practically the same thing in a seperate function, i would also just do them both in the 'said' function, i dont really see any need to be calling the hsmode() function for that..Threads: 47
Joined: Apr 2007
Nice work m8y nnHere is a little idea for you why dont you add a part where you can have a admin put everyone in headshot mode for like clan scrims and fun days but also have the single say command part on there to ( Just an idea tho)nnNice worknnRegardsnnBlobby
Threads: 7
Joined: Nov 2006
Thanks guys - yeah, I had to use the WeaponsMod code as a guide to remember how to pick up say, but now that you've clarified i'll update those things and post an updated version tonight :)
Threads: 47
Joined: Apr 2007
Ok i just put this on my server.... had to change the commands as our server will not accept / commands so any way... i changed it to :hsmode the command works and the chat msg shows but the people i shoot still take damage where ever i shoot them and i cant kill them if i shoot there heads im going to play about with your code a bit and see if i can stop all damage happening to the body and only taking damage in the head if i fix this i will post the solution up for you to repost nnRegardsnnBlobby
Threads: 47
Joined: Apr 2007
nnpublic hsmode(id)n{n set_user_hitzones(id,0,2)n isHeadshot[id]=1nnnThat part of your code was wrong u had nnset_use_hitzones 3 instead of 2 change that and all works :PnnBlobbyThreads: 12
Joined: Aug 2005
HinCan you tell me how to always enable headshot only without say /hsmode
Threads: 12
Joined: Aug 2005
anyone?nn"HinCan you tell me how to always enable headshot only without say /hsmode"
Threads: 4
Joined: Nov 2006
You could save and compile this, although I am not sure if all the includes are necessary, and I also do not know if people's hitzones will reset when they leave your server (I assume so).rnrn
#include <amxmodx>rn#include <amxmisc>rn#include <fun>rnrnrn#define PLUGIN "dod_headshotmode"rn#define VERSION "1.0"rn#define AUTHOR "Hoodie"rnrnpublic plugin_init() {rn register_plugin(PLUGIN, VERSION, AUTHOR)rn}rnrnpublic client_connect(id)rn{rn set_user_hitzones(id,0,2)rn return PLUGIN_CONTINUErn}Threads: 0
Joined: Aug 2009
rnrnHey I am new to this site but I like it alot and has become very helpful, but could you please do what Blobby suggests and repost it please so I can grab the newly updated version. I would change it myself but I have no clue on how to. But I would like to be able to edit plugins if anyone would be nice enough to help me figure that out.rnrnThanks, rnrn1Lt. J. Daro [3rd RRB]rnrnThat part of your code was wrong u had rnrnset_use_hitzones 3 instead of 2 change that and all works :PrnrnBlobbyrnrnpublic hsmode(id)rn{rn set_user_hitzones(id,0,2)rn isHeadshot[id]=1rn
Threads: 75
Joined: Nov 2007
hello. look here https://www.dodplugins.net/forums/showthread.php?t=1651nnopen the plugin, and find the line bobby is talking about and edit that. Basically you can use any text editor to edit the code, and use the online compiler, but amxx studio is the best IMO, and if you set it up as showed in the thread, you can compile it on your own PC.nnn- Cheers

