View Full Version : headshot practice
Hood [10th MD]
10-25-2007, 02:37 AM
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.
This 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.
Enjoy!
P.S. This isn't unique to DoD per se, but my idea was for DoD.
diamond-optic
10-25-2007, 07:23 AM
bout to goto sleep cause its quite late and i gotta work in a few hours..
but 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..
i would do something like:
register_clcmd("say /hsmode", "said".......
and not check what its equal to in the function (as that will only catch when /hsmode is said)
also 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
10-25-2007, 02:29 PM
Nice work m8y
Here 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)
Nice work
Regards
Blobby
Hood [10th MD]
10-25-2007, 06:09 PM
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
01-12-2008, 05:19 PM
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
Regards
Blobby
blobby
01-12-2008, 05:37 PM
public hsmode(id)
{
set_user_hitzones(id,0,2)
isHeadshot[id]=1
That part of your code was wrong u had
set_use_hitzones 3 instead of 2 change that and all works :P
Blobby
dannyowan
02-03-2008, 05:10 AM
Hi
Can you tell me how to always enable headshot only without say /hsmode
dannyowan
02-04-2008, 08:12 AM
anyone?
"Hi
Can you tell me how to always enable headshot only without say /hsmode"
thanatopsizer
02-09-2008, 04:13 AM
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).
#include <amxmodx>
#include <amxmisc>
#include <fun>
#define PLUGIN "dod_headshotmode"
#define VERSION "1.0"
#define AUTHOR "Hoodie"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_connect(id)
{
set_user_hitzones(id,0,2)
return PLUGIN_CONTINUE
}
straywolf21
12-06-2009, 12:51 PM
public hsmode(id)
{
set_user_hitzones(id,0,2)
isHeadshot[id]=1
That part of your code was wrong u had
set_use_hitzones 3 instead of 2 change that and all works :P
Blobby
Hey 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.
Thanks,
1Lt. J. Daro [3rd RRB]
hello. look here http://www.dodplugins.net/forums/showthread.php?t=1651
open 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.
- Cheers
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.