PDA

View Full Version : DoD - MGs MUST deploy


=|[76AD]|= TatsuSaisei
08-22-2006, 03:40 AM
Originally started as a personal request, got a few code suggestions, and help from forum members, and it was all down hill from there... fully functional and highly customizable, but simple plugin....


Use of plugins are at your own risk.
Author makes no claims of liabilty for the use of any plugin created/modified
Tested and compiled for AMXX 1.76a
AUTHOR:
=|[76AD]|= TatsuSaisei
TatsuSaisei@76AD.com
http://76AD.com
http://forum.76AD.com
DESCRIPTION:
Have you ever seen the script kiddies run around using a large MG as if it was the Thompson ?? No recoil... it made me mad...
-OR-
The n00bs who pull off the lucky kills when they are confronted and fire the MG when it isn't deployed...
The large machine guns were not designed to be used this way, and I hated seeing it happen.
This script will prevent the guns from firing unless the gun is actually deployed and set-up.
If a player shoots the gun while not deployed, a message about deploying the gun will be displayed
CREDITS:
http://amxmodx.org, and it's creators, for the awesome mod that allows for this to be a reality !!!
http://dodplugins.net, for their awesome site, and its members for helping out when asked !!!
Wilson [29th ID] for the code used come from a suggestion he made in the dodplugins.net forum about UpdateClientData_Post and his desire to make the game of DOD more realistic
diamond-optic for "fixing" the animation of the gun still going off as a player tries to shoot his/her MG (PlayerPreThink)
TO-DO:
??
USAGE:
dod_mg_mustdeploy <0|1> (disable|enable) 'turn plugin on/off, default 1(on)
dod_mg_mustdeploy_msg <0|1> (disable|enable) 'turn warning message on/off, default 1(on)
dod_mg30cal_mustdeploy <0|1> (disable|enable) 'turn effect for Allied 30 Caliber on/off, default 1(on)
dod_mg42_mustdeploy <0|1> (disable|enable) 'turn effect for Axis MG42 on/off, default 1(on)
dod_mg34_mustdeploy <0|1> (disable|enable) 'turn effect for Axis MG34 on/off, default 1(on)
To set a custom message to warn players about the need to deploy first before firing the weapon
dod_mg_mustdeploy_custommsg <string> MAX 255 characters
To customize the position of the message:
dod_mg_mustdeploy_msgx <-1.0 or 0.0-1.0> (left to right)
dod_mg_mustdeploy_msgy <-1.0 or 0.0-1.0> (top to bottom)
To set the color of the message:
dod_mg_mustdeploy_msgr <0-255> RED
dod_mg_mustdeploy_msgg <0-255> GREEN
dod_mg_mustdeploy_msgb <0-255> BLUE
To set the time the message is displayed:
dod_mg_mustdeploy_msg_time <0.0+> Number of SECONDS

VERSION HISTORY:
76.0
* Inception
76.1
* Fixed the problem where the gun would still appear to fire, although it would not hurt anyone
76.2
* added ability to turn plugin on/off
* added ability to turn warning message on/of
* added ability to turn effect of on each MG selectively
* added a hud message warning for players who try to use an MG undeployed
* added definition to allow for creating a custom message when a user tries to fire the weapon when it is not deployed
* added cvars to allow for customizing the color/placement/text of the custom message
76.3
* updated information. Plugin compiles and works in AMXX 1.76a
* minor optimizations and cleanup of code
76.4
* fixed major error in coding that was causing plugin to not work unless ALL weapons were being blocked at once.
* Plugin now officially works as designed
* Credit: Box Cutter for raising attention to error

diamond-optic
08-22-2006, 04:43 AM
well 1st off it compiles fine without the fakemeta include lol..

and thats small enough of a plugin it wouldnt take long to convert it over to fakemeta instead of engine

then wow what a high version number lmao


#define VERSION "76.1"

=|[76AD]|= TatsuSaisei
08-22-2006, 04:52 AM
well 1st off it compiles fine without the fakemeta include lol..

and thats small enough of a plugin it wouldnt take long to convert it over to fakemeta instead of engine

then wow what a high version number lmao

crud, fakemeta was still there from when I tried using the UpdateClientData_Post suggestion... simple lack of double checking everything. Noted though.

The version number lol, ALL my plugins start off as version 76 (It is my favorite number, being the year of my birth, and also used it in my clan name) the number following the decimal is the "real" version number.

diamond-optic
08-22-2006, 05:31 AM
try this:

http://ampaste.net/3324

=|[76AD]|= TatsuSaisei
08-22-2006, 05:38 AM
AWESOME !! Thanx alot diamond !! Your help has been invaluable !!

diamond-optic
08-22-2006, 05:43 AM
well its mainly using wilsons method and some stuff from the amxx forums.. i just put it all together in working fashion

=|[76AD]|= TatsuSaisei
08-22-2006, 05:51 AM
Yes Wilson deserves alot of credit...

Plugin is now updated to version 76.2 - downloads in the first post.

diamond-optic
08-22-2006, 01:09 PM
nice work :-)

Wilson [29th ID]
08-22-2006, 06:34 PM
good stuff tatsu.

tegu
09-21-2006, 12:36 AM
I have to say that Wilson and Diamond are fast becoming my favorite developers here. The mix of functionality and realism is refreshing. Although I am far from being a realism server operator, I do love these plugins. Trying this one now! I meant to add tatsu to that too... sorry bro

Wilson [29th ID]
09-21-2006, 01:55 AM
Well thank you very much but keep in mind Tatsu wrote this one ;) He helps the both of us out quite a lot with testing and writing and ideas etc.

tegu
09-22-2006, 12:48 AM
Yeah I meant to add his name up there. It really was just a slip in the post. Sorry Tat..... Anyway I love this plugin and have noticed that the MG still gets used a lot, but now in a more respectful way befitting its true nature.

Box Cutter
10-12-2006, 07:16 PM
I have installed this plugin but it doesn't seem to be working. The plugin is running for sure but when I fire the mg the tracers, sounds and recoil are gone but the bullets are still firing, the ammo count goes down, and the gun heats up like normal. I tried shooting at another player undeployed to test it and it killed him. Is this what the plugin is supposed to be doing or is it not working right? Also it is doing this on all 3 guns.

=|[76AD]|= TatsuSaisei
10-12-2006, 11:22 PM
I have installed this plugin but it doesn't seem to be working. The plugin is running for sure but when I fire the mg the tracers, sounds and recoil are gone but the bullets are still firing, the ammo count goes down, and the gun heats up like normal. I tried shooting at another player undeployed to test it and it killed him. Is this what the plugin is supposed to be doing or is it not working right? Also it is doing this on all 3 guns.

What you describe sounds like an issue I had with version 76.1 , are you sure your using version 76.2 ??

Box Cutter
10-13-2006, 02:03 AM
|= TatsuSaisei;1760']What you describe sounds like an issue I had with version 76.1 , are you sure your using version 76.2 ??

Well I downloaded the .sma and .amxx that you currently have attached to this thread so unless that isnt the current version. I tried compiling the .sma and used the .amxx you provided and it gave the same problem.

=|[76AD]|= TatsuSaisei
10-13-2006, 03:05 AM
post your server specs...

http://www.dodplugins.net/forums/announcement.php?f=17

The plugin runs on my server, which is the same version as posted here above. I recompiled it in 1.76a and it compiled fine and still works... I am interested in figuring out why it does not work on your server...

tegu
10-13-2006, 10:38 AM
Works great on mine as well. 1.76a here on linux ded. Maybe a plugin incompatability?

Box Cutter
10-13-2006, 08:45 PM
|= TatsuSaisei;1764']post your server specs...

http://www.dodplugins.net/forums/announcement.php?f=17

The plugin runs on my server, which is the same version as posted here above. I recompiled it in 1.76a and it compiled fine and still works... I am interested in figuring out why it does not work on your server...

I posted them but they are not showing up yet. To save time I have posted some info below that can hopefully help my problem.

My server is thru Gameservers.com
AMXX v1.75a

The plugins I am running are:

dod_blockexploits-1[1].75a.amxx
dod_ubergarand.amxx
dod_meleebonus.amxx
dod_eviladmin.amxx
dod_closecombatfun.amxx
dod_teammanager.amxx
dod_afkmanager.amxx
dod_hpk.amxx
dod_headshot_sounds.amxx
dod_botjoinscore.amxx
dod_shellshock.amxx
amx_aimbotdetect.amxx
dod_nadeforall.amxx
dod_xkills.amxx
dod_staminahp_remake.amxx
dod_support-1[1].75.amxx
dod_gore_custom.amxx
dod_classmenu.amxx
dod_death_fade.amxx
dod_walk.amxx
dod_extravoicemenus.amxx
amx_adminvoice.amxx
; dod_mg_mustdeploy.amxx
dod_playerpush.amxx
dod_paratrooper.amxx

Box Cutter
10-18-2006, 04:18 AM
TatsuSaisei any luck on trying to figure my issue out?

=|[76AD]|= TatsuSaisei
10-18-2006, 11:05 AM
TatsuSaisei any luck on trying to figure my issue out?

no I looked through the code and did not see anything that stood as being the potential problem. I would like to get on your server one day and see the plugin in use...

I was hoping your server was windows and I could simply blame it on that, but you listed your server as Linux, which leaves me to wonder why the plugin works fine on my server, on anothers server, but you seem to have the original issue I had when making this plugin....

I have posted a new version.. try that...

dumb question, but have to ask... do you have all the proper modules loaded ??

diamond-optic
10-18-2006, 11:45 AM
since he's running 1.75a... it should auto-load the modules he needs anyway

Box Cutter
10-19-2006, 06:29 AM
TatsuSaisei, I downloaded the plugin again and the same problem occurs.

Box Cutter
10-26-2006, 03:10 AM
TatsuSaisei any resolution to this problem yet? If you want to see how it is acting on my server let me know when you can come on and I will load the plugin.

diamond-optic
10-26-2006, 07:40 PM
have you tried moving it around in the plugins.ini list?

i found sometimes the order the plugins are in can affect how they work... like try putting it first (or right below the block exploits) & also maybe try last too....

=|[76AD]|= TatsuSaisei
10-27-2006, 12:53 AM
TatsuSaisei any resolution to this problem yet? If you want to see how it is acting on my server let me know when you can come on and I will load the plugin.
I am sorry, i do not have an immediate answer why it does not work, nor do I have a resolution. I can only offer my apologies at this time, and while I would in fact like to see the plugin in action, I have been very busy lately in life and have had very little time to spend on other matters (dod, plugins, etc..)

please try what diamond suggested and try rearranging its location in your plugins list and see if that has any effect...

also, please understand that it is hard to diagnose the problem when I cant replicate it and others are not having any issues either...

oh, please add -debug after the plugin in the plugins.ini list and then run the plugin for a while, send me, or post the contents of the error logs (if any) that pertain to my plugin...

Box Cutter
10-28-2006, 04:00 AM
I tried listing it first in the plugin.ini and still the same thing. No problem it isnt that important so I will worry about it whenever you have time, no rush. Thank you for your help so far.

IrritableGimp
11-28-2006, 05:18 PM
I have this plugin running, and all works well except for the custom message.
I have:

dod_mg_mustdeploy_custommsg The MG was designed to be deployed

and only the "The" is displayed in game. Do I need quotes around the string, or what may I be missing?

=|[76AD]|= TatsuSaisei
11-28-2006, 06:06 PM
I have this plugin running, and all works well except for the custom message.
I have:

dod_mg_mustdeploy_custommsg The MG was designed to be deployed

and only the "The" is displayed in game. Do I need quotes around the string, or what may I be missing?
lmao, you DO need quotes around the message other wise it stops "reading" the string at the first whitespace (space)... so put quotes around it and you will be good

=|[76AD]|= TatsuSaisei
12-14-2006, 11:16 AM
I tried listing it first in the plugin.ini and still the same thing. No problem it isnt that important so I will worry about it whenever you have time, no rush. Thank you for your help so far.

76.4
* fixed major error in coding that was causing plugin to not work unless ALL weapons were being blocked at once.
* Plugin now officially works as designed
* Credit: Box Cutter for raising attention to error

I am sorry it took me so long to get to this. I found the issue and the plugins officially works as designed.

although... I have since started using diamond-optics version as alot of my members were "crying" of the inabilty to fire, yet they do not seem to mind the extra recoil... go figure....

blobby
04-11-2007, 11:39 AM
Will this make the BAR must deploy or not as our members do not class it as an MG and do like to use it without deploy help me please

Reagrds

Blobby

=|[76AD]|= TatsuSaisei
04-11-2007, 01:23 PM
Will this make the BAR must deploy or not as our members do not class it as an MG and do like to use it without deploy help me please

Reagrds

Blobby


dod_mg30cal_mustdeploy <0|1> (disable|enable) 'turn effect for Allied 30 Caliber on/off, default 1(on)
dod_mg42_mustdeploy <0|1> (disable|enable) 'turn effect for Axis MG42 on/off, default 1(on)
dod_mg34_mustdeploy <0|1> (disable|enable) 'turn effect for Axis MG34 on/off, default 1(on)


It only shows that it affects the 30cal, MG34, and MG42 ....

The BAR was designed to be used undeployed as needed... that is what made it a "special" weapon for its time...

and... while this is my creation.. I have stopped using it in favor of diamond's wild plugin that allows for undeployed usage, just makes it impossible to aim... (I got tired of the complaints about not being able to RAMBO, so I let them, just with wild aim...)

blobby
04-11-2007, 01:48 PM
Ok Thanks for your reply i wish i could do this type of codeing is it it would be very good is it hard

Regards

Blobby

diamond-optic
04-12-2007, 12:30 AM
|= TatsuSaisei;4931']I got tired of the complaints about not being able to RAMBO, so I let them, just with wild aim...


lol.. people on my server are even able to rambo pretty well with the extra recoil now.. i might need to upgrade that plugin to have different settings.. like low/medium/high/insane... lolbut ya.. like ill get around to that soon :p heh tho i will eventually cause i do have a few other things planned for it