View Full Version : DoD Weapon Jam (v3.0)
diamond-optic
08-28-2007, 04:00 PM
DoD Weapon Jam
- Version 3.0
- 07.22.2009
- diamond-optic
Credits:
- Wilson [29th ID] (pdata offsets as well as a ton of other help)
Information:
- Weapons will randomly jam and the client will have to press
their use key to clear the chamber (or reload depending on setting)
- Sometimes clearing the chamber fails, requiring multiple attempts
- Chance of weapon jamming permanently
- Specific weapon stays jammed even after dropping it
- Enable/Disable losing 1 round in the clip when clearing the chamber
- Weapons will not jam on a full clip (so you dont spawn with a jammed weapon)
- Server List: http://www.game-monitor.com/search.php?rulename=dod_weaponjam_stats
Commands:
dod_weaponjam_force <nick/steam> <perm> //Force a clients weapon to jam
//Enter a trailing 1 for perm jam
CVARs:
SETTING_MSGSTYLE 3 //Message Style Setting
//1 = HUD Messages
//2 = Chat Messages
//3 = Both HUD & Chat Messages
SETTING_CHANCE 1200 //Chance of weapon jamming for each shot (1 in ### chance)
SETTING_RELOAD 1 //Reloading clears jammed weapons (on(1)/off(0))
SETTING_AMMO 1 //Clearing chamber subtracts 1 round of ammo (on(1)/off(0))
SETTING_PERM 50 //Chance of weapon jam to be permanent (0 = no perm jam)
SETTING_FAIL 4 //Chance of clearing chamber failing (0 = always clears 1st time, 1 in ### chance)
SETTING_MAXPLAYERS 32 //Set to the number of slots your server has
Change Log:
- 07.23.07 - Version 1.0
Initial Release
- 09.12.07 - Version 1.1
Adjusted default jam chances just slightly
Stopped 'jammed' sounds from playing after round end
Added CVAR to control message style
Fixed jam sound from overlapping itself
- 01.29.08 - Version 2.0
Huge Rewrite, too many changes to list
- 07.22.09 - Version 3.0
Added command to force someones weapon to jam
Changed prethink forward over to HamSandwich
Removed CVAR to enable/disable jamming, just dont load the plugin instead
Changed CVARs to compiler defines
Bots will now get jams
Changed some default values
Decreased weapon ent search radius to stop affecting of guns on the ground
Improved some if statements
Removed 'Full Precache' ability as it doesnt seem to be an issue
Various other code improvements
DOWNLOAD MIRROR: http://www.avamods.com/download.php?view.155
=|[76AD]|= TatsuSaisei
08-28-2007, 09:46 PM
w00t !! first to download this...
diamond-optic
08-30-2007, 11:04 PM
ok there seems to be some problem with some of the new attachments on the forums.. so likely this will download as an empty file..
if it does.. try the download mirror link that points to my website :D
diamond-optic
09-01-2007, 01:20 AM
ok zor said the webspace or whatever kinda ran out lol.. so he deleted some stuff and i just re-attached the plugin and it should be working fine now :D
thanks zor!
diamond-optic
09-12-2007, 09:28 PM
Update to Version 1.1
- 09.12.07 - Version 1.1
Adjusted default jam chances just slightly
Stopped 'jammed' sounds from playing after round end
Added CVAR to control message style
Fixed jam sound from overlapping itself
knife108
09-17-2007, 06:50 AM
Update to Version 1.1
- 09.12.07 - Version 1.1
Adjusted default jam chances just slightly
Stopped 'jammed' sounds from playing after round end
Added CVAR to control message style
Fixed jam sound from overlapping itself
i d used but didnt find much different between v1.0 except message style
:p
the 1st bullet always been jamed when u spawn just have no time to fire.
another , when u fix the jamed weapon it will fire only one bullet out!
Go on D.O !
diamond-optic
09-17-2007, 01:13 PM
the 1st bullet always been jamed when u spawn just have no time to fire.
ive tested it extensively, even setting the cvars so it jams on each shot and it never once jammed for me on the 1st bullet
another , when u fix the jamed weapon it will fire only one bullet out!
what do you mean? cause for me its always worked 'fine' after unjamming it
Wilson [29th ID]
09-17-2007, 03:21 PM
Quality rifles sold by Diamond-Optic Enterprises.
"They never jam on the first shot!"
diamond-optic
09-17-2007, 04:23 PM
lol ya it might be slightly more realistic to allow jamming on 1st shot.. but i found the annoyance (and complaints lol) of starting a round with a jammed weapon.. or reloading a weapon and having it be jammed right away to be something that for the sake of a game can be left out lol..
plus idk.. if you're putting the clip/ammo in yourself and working the bolt manually there might be 'less' chance of a jam then the weapon working the bolt on its own (and expelling a spent shell at the same time..)
Wilson [29th ID]
09-17-2007, 05:52 PM
Yeah I meant to comment on that. SMGs, namely the MP40 with its limiting vertical magasine, jammed a lot more frequently than, say, a Rifle. I've fired my M1 hundreds of times and it has never jammed. But SMGs, well, that's just what they do. They jam more than sam. And sam jams alot.
knife108
09-18-2007, 05:16 AM
to D.O
1. starting the dod_forcetracers and dod_tracers ,if jamed and u do not fix it , force to fire the gun will shoot one bullet(tracer) everytime or push key "E" to fix it the gun will shoot a bullet(tracer) either :p
2. if jamed and u do not push key "E" to fix it , just force to fire 10 times or more the jam will be fixed by itself and the clip/ammo will decrease :p
otherwise idk...different guns should have different frequence of jam.
diamond-optic
09-18-2007, 06:04 AM
alright checking it out with dod_tracers...
not having any 'real' trouble with jamming/unjamming/shooting...
for me its just showing the tracer when it shouldnt, so if i get around to it ill look at it more tomorrow when i get up since its 4am here now
knife108
09-18-2007, 06:44 AM
to D.O
1. starting the dod_forcetracers and dod_tracers ,if jamed and u do not fix it , force to fire the gun will shoot one bullet(tracer) everytime or push key "E" to fix it the gun will shoot a bullet(tracer) either :p
2. if jamed and u do not push key "E" to fix it , just force to fire 10 times or more the jam will be fixed by itself and the clip/ammo will decrease :p
otherwise idk...different guns should have different frequence of jam.
v1.1 has both 2 problem and v1.0 only has 1st.
I still used the v1.0 but it has the problem that u'll have a jamed gun sometimes when u spawn.
my cvar for v1.0:
dod_weaponjam "1"
dod_weaponjam_chance "98"
dod_weaponjam_reload "1"
dod_weaponjam_perm "25"
dod_weaponjam_fail "3"
diamond-optic
09-18-2007, 03:09 PM
hmm there wasnt really anything done to the actual jamming/clearing part between the versions so i dont see how it could have changed lol
knife108
09-18-2007, 10:50 PM
hmm there wasnt really anything done to the actual jamming/clearing part between the versions so i dont see how it could have changed lol
ya it's really :confused:
do u have any idea about the jammed gun when u spawn ?
:o
diamond-optic
03-21-2008, 04:45 AM
UPDATED TO VERSION 2.0
I HIGHLY RECOMMEND THAT ANYONE RUNNING v1.x UPDATE TO THIS VERSION!
this version fixes all known problems with the 1.x versions and after running this plugin for almost 2 months straight on my server I am convinced that there are no more major flaws in it (as of yet at least lol) so this should be totally fine to run now and im pulling it back out of the test forum :cool:
dlambert1989
04-24-2008, 05:12 PM
I tried to compile this plugin using the compiler on amxmodx.org and it gave me this:
Your plugin failed to compile! Read the errors below:
Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
/home/groups/amxmodx/tmp3/phpAmOYTm.sma(433) : error 088: number of arguments does not match definition
1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/phpAmOYTm.amx (compile failed).
diamond-optic
04-24-2008, 06:58 PM
i believe the online compiler on amxmodx.org isnt up to date
it works fine using the one here to compile it for 1.8.x
http://www.dodplugins.net/forums/cmps_index.php?page=help
but it gives me that error when using older versions, so if you need it for an older version let me know and ill fix it for you
diamond-optic
07-22-2009, 10:49 PM
Updated to v3.0
- 07.22.09 - Version 3.0
Added command to force someones weapon to jam
Changed prethink forward over to HamSandwich
Removed CVAR to enable/disable jamming, just dont load the plugin instead
Changed CVARs to compiler defines
Bots will now get jams
Changed some default values
Decreased weapon ent search radius to stop affecting of guns on the ground
Improved some if statements
Removed 'Full Precache' ability as it doesnt seem to be an issue
Various other code improvements
whats up with the macros? are they better? if yes how so?
diamond-optic
07-23-2009, 06:47 PM
well the main reason im doing that with the majority of my plugins is because i basically just am tailoring stuff to my own needs now and im no longer concerned with making things simple and easy or whatever for every random person that might want to run my plugins... In most cases just compiling the plugin with the default settings will be just fine for everyone, but for so called power users i think it gives a little bit more of an effecient way to do things
but anyway, i figure with most settings that were cvars.. most people probably didnt change them from the default values, and if they did they would change them once or twice and then leave the values forever.. So i figure theres no need to be reading these cvars all the time when the values are never changing.. Especially with plugins like this one where theres stuff done in prethink, so i would assume that already having the values compiled right in the plugin is a lot better then reading cvars every single server frame when the values arent changing
plus with some things, where the cvar would turn on/off certain features, instead of constantly checking those cvars and having it return say false and have the plugin skip the code for that feature, using defines allows the plugin to be compiled without that code even in it, creating a smaller memory footprint at the same time (tho tiny in most cases but when doing that with a large number of plugins it can be a noticably decrease in usage) and also removing the need to bother checking that cvar over and over
now originally i figured id just cache the cvar values on say round start and read them from variable through out the round, but then i figured ehh it would probably be a little better to not even bother with cvars at all for most things... and now days since im not around much anymore, especially when it comes to working on plugins or anything, i figure im gonna make my server a priority over making things easier for other people lol, so im sacrificing simplicity and easier customization to make my own server more effecient (which i think has helped on my server running like 75+ plugins, used to get crashes several times a day, now it crashes like once every few days)
and the maxplayers define, is mostly used for array sizes.. leaving it at 32 will be just fine (as it would be maxplayers+1 for the array which would be like doing the normal value of 33) but for example my server is 25 slots, so setting it to 25 and making the array sizes 26 instead of 33 across several variables and then again thru several plugins makes those arrays only as big as they need to be instead of making them all 33 when theres cells that wont be used at all.. nothing major but just a little optimization that adds up when done thru several dozen plugins
but using the defines instead of cvars might not be the most user-friendly thing to do, but i dont really care anymore haha
ok well just what i expected you would answer :D Well personly i dont give jack about the, sometimes extra, amout of cells in the arrays, since the amount of memory one cell takes, is very very very, very small. I just use static cells when i can.
One thing that have helped on my server, is reducing native calls, by setting a value for each client when they join or leave eg.
cheers and thanks for the big ass answer :D
netmad
09-25-2009, 02:34 AM
1 little porblem , in fact Webley dont Jam, because it can jump on 1 bad Bullet ,and next bullet. ^_^ ,so del webley Jam chance
diamond-optic
09-27-2009, 09:15 PM
not sure exactly what youre saying.. you mean how sometimes you can still get a shot or so off right when a gun jams?
it happens with pretty much all the weapons but it seems to be quite rare for me (more common with automatics) and i dont see it as a huge drawback..
and as for "Webley dont Jam" ...it jams fine for me
netmad
09-27-2009, 10:47 PM
sorry,I means that Webley is a kind of revolver 。if it jams,dont repair ,only go on shot ,then bullet of jams auto round to next。
knife108
09-29-2009, 11:00 PM
i'd like use the dod_jam.txt .
it's easy to translate into another language.
diamond-optic
10-04-2009, 11:44 PM
sorry,I means that Webley is a kind of revolver 。if it jams,dont repair ,only go on shot ,then bullet of jams auto round to next。
ohh i see what you mean.. kinda embarrassed that i never thought of that
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.