Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin

headshot practice

by Hood [10th MD] · 2007-10-25 · 10 replies · 11380 views · 95 downloads

Read the thread (11 posts)

From the first post

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.
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.

Files

amx_hsmode.sma Plugin Source 919 B 95 dl Download Compile

The thread

All 11 posts from 7 people on headshot practice, kept as they were written.

H Hood [10th MD]
started this thread
Posts: 84
Threads: 7
Joined: Nov 2006
10-25-2007, 01:37 AM #1

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.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
10-25-2007, 06:23 AM #2

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..

blobby
posted here
Posts: 421
Threads: 47
Joined: Apr 2007
10-25-2007, 01:29 PM #3

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

H Hood [10th MD]
started this thread
Posts: 84
Threads: 7
Joined: Nov 2006
10-25-2007, 05:09 PM #4

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 :)

blobby
posted here
Posts: 421
Threads: 47
Joined: Apr 2007
01-12-2008, 05:19 PM #5

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

blobby
posted here
Posts: 421
Threads: 47
Joined: Apr 2007
01-12-2008, 05:37 PM #6
nnpublic hsmode(id)n{n	set_user_hitzones(id,0,2)n	isHeadshot[id]=1n
nnThat part of your code was wrong u had nnset_use_hitzones 3 instead of 2 change that and all works :PnnBlobby

D dannyowan
posted here
Posts: 54
Threads: 12
Joined: Aug 2005
02-03-2008, 05:10 AM #7

HinCan you tell me how to always enable headshot only without say /hsmode

D dannyowan
posted here
Posts: 54
Threads: 12
Joined: Aug 2005
02-04-2008, 08:12 AM #8

anyone?nn"HinCan you tell me how to always enable headshot only without say /hsmode"

T thanatopsizer
posted here
Posts: 21
Threads: 4
Joined: Nov 2006
02-09-2008, 04:13 AM #9

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}
S straywolf21
posted here
Posts: 1
Threads: 0
Joined: Aug 2009
12-06-2009, 12:51 PM #10
rnrnpublic hsmode(id)rn{rn	set_user_hitzones(id,0,2)rn	isHeadshot[id]=1rn
rnrnThat part of your code was wrong u had rnrnset_use_hitzones 3 instead of 2 change that and all works :PrnrnBlobby
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]

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
12-06-2009, 05:56 PM #11

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

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC