Raised This Month: $100 Target: $400

Firearms replacement for adminvote

Post New Thread Reply   
Thread Tools Display Modes
Plugin Info:     Modification:   Firearms        Category:   Admin Commands        Approver:   EKS (167)
Join Date: Apr 2005
Old 04-29-2005 , 02:02   Firearms replacement for adminvote
Reply With Quote #1

Firearms Compatible Vote Plugin

by Anders Dog, <[email protected]>
modded from the AMX Mod X AdminVote plugin. 28, April 2005.

This is a simple modification of the default AMX MOD X AdminVote plugin to enable voting in Firearms (http://firearmsmod.com).

Some time ago the Firearms coder Mazor removed support for text only menus in Firearms because the code was fuXXored beyond repair. This plugin works around that limitation by outputting menu options to the HUD, and collecting votes from say and team say instead. There's some info about the original problem here: http://forums.firearmsmod.com/showthread.php?t=68595

All of the rest of the AdminVote functionality should remain intact. The vote result acceptance menu is also replaced by the same system.

Server Side:
Compile, copy to amxmodx/plugins, and add: fadminvote.amxx to the list of plugins in amxmodx/configs/plugins.ini. You should comment out adminvote.amxx as well, if you haven't already.

Client Side:
Start a vote as you normally would with AMXx, except use amx_fvote instead of amx_vote, amx_fvotemap insteam of amx_votemap, etc. Select a vote option by typing /x where x is the number of your choice in say or team say. e.g.:
say "/1" will select option 1, say "/2" will select option 2... etc.

I take no credit for the voting system, only for the mangling I gave it so it utilized HUD messages and reads from say and team say.

To Do:
The same basic principle could be applied to many other menu systems in AMXx. e.g., the mapchooser (EDIT: I've already made an attempt at the mapchooser for firearms, see below). If this plugin is approved (and I'm not sure if I'm stepping on toes by hacking a standard plugin...) then I could easily go through the rest of the standard plugins with the same system.
There's only one static string message that has been added to adminvote. This should probably be moved to the language data files. Again, if there's sufficient interest and/or approval, then I will do this.

This is my first attempt at hacking in small. I don't believe there are any bugs, and I have tried to follow the coding conventions used by the AMXx team. There may well be better ways to achieve the same end. I have tried to work out how to code VGUI menus, but it seems the menu config has to reside as a static file on the client's machine. That's obviously no good for map votes, or kick votes. Perhaps there's a way around that with fakemeta...

What's new:
- As of 1.03 of fadminvote and 1.02 of fmapchooser, I've abandoned HUD 'menus' entirely in favour of MOTDs. The MOTD behaves far more predictably, and has the advantage of staying on screen until the user dismisses it.
- As of 1.02 -- Better HUD positioning. Menus always align top left now.
- A pause for 2 seconds before voting for console-initiated votes so the vote caller has a chance to get out of console.
- The votes should disappear as soon as you have made your choice.
- The map chooser plugin has been mangled to support firearms.

It's still nowhere near as elegant as amx menus on a show_menu() compatible mod, but it should be a bit better than nothing at all.

To Do:
- Adapt the fmapchooser to check the number of regenerations for each team. Show the menu when there are less than 3 for one team, or use a cvar to set the number.
- Test a few hunches regarding getting true VGUI menus with buttons, etc...
Attached Files
File Type: sma Get Plugin or Get Source (fadminvote.sma - 1595 views - 17.9 KB)
File Type: sma Get Plugin or Get Source (fmapchooser.sma - 1557 views - 8.4 KB)
anders_dog is offline
Junior Member
Join Date: Apr 2006
Location: New York
Old 05-21-2006 , 17:03  
Reply With Quote #2

Admin{Mike} is offline
Send a message via AIM to Admin{Mike} Send a message via MSN to Admin{Mike}
Join Date: Apr 2005
Old 05-21-2006 , 17:15  
Reply With Quote #3

Constructive. Thanks.
anders_dog is offline
Join Date: Mar 2004
Old 01-16-2007 , 10:50   Re: Firearms replacement for adminvote
Reply With Quote #4

You don't deserve a boo for trying. But then I find the FA community tends to be a bit that way, which is probably one of the reasons why it isn't very big right now... For me, I would be happy if I could get the map voting to work the way it does in Admin Mod.
Drek is offline
Join Date: Apr 2005
Old 02-06-2007 , 18:23   Re: Firearms replacement for adminvote
Reply With Quote #5

Lol, that's alright. I know what the FA community was like. Some truly great, even legendary guys, more than their fair share of stuck up retards, and lots of forum trolling. :-)

Me, I'd have been more than happy, I would have been ecstatic if an AMXx plugin could replicate what admin mod used to be able to do. The above plugin is far from ideal, but it basically did the job, albeit in an unreliable, and unintuitive kind of way. Adminmod wasn't an option for me, so I did this to solve some of my own server administration problems, then released it in case it was useful.

At the time of writing it the only other option involved a client side patch as well, and to use FA's dozy menu system via a custom bind. Since it was hard enough getting folk to use a say command rather than press the number, I figured a client installed download was well and truly out the window.

If you're running an FA server still and are interested, I could give it another go. The major problem was that the FA coders removed the standard hl menu code around 2.5/2.6, the more recent FA coders didn't share interface info with any metamod developers. However the good news is that debugging, logs, and various other improvements with AMXx mean it might just be possible to do this now.

Any working UI for FA admin commands via AMXx has got to be better than none.
anders_dog is offline
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 03-05-2007 , 15:39   Re: Firearms replacement for adminvote
Reply With Quote #6

Can you create, a plugin for hlsw, so admins can in 'Change Level' parametor vote for a map ('AM - Vote Map' option), just like if using AdminMod?
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 08:48.

Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode