Raised This Month: $222 Target: $400
 55% 

Weapon Menu Creator [ V 1.0 ]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-07-2014 , 07:23   Weapon Menu Creator [ V 1.0 ]
Reply With Quote #1

Weapons Menu Creator 1.0
Release: 07.08.2014 | Last Update: 14.03.2015


!!!!!!THIS NEW UPDATE IS NOT COMPATIBLE WITH OLD CONFIGURATION FILES. PLEASE BACKUP YOUR MENU ITEMS AND DELETE THE OLD FILE. A NEW ONE MUST BE GENERATED WITH A NEW NAME.!!!!!

Basically, this plugin has a simple goal, to make servers owners work much easier. Many of them use custom weapons menu, and when they want a change, they mus make another request.
With this one, they can simply edit a file, change the map, and they have a new weapons menu.

Some features that this plugin provides:
  • Easy edit your menu from a file.
  • You can have two menus: primary & secondary weapons.
  • You can set how many bullets you want for each weapon.
  • You can set some admin acces for weapons.
  • You can set a price for a weapon, or let it free.

As a note, you are not forced to have a primary and a secondary menu. If you want one to be disabled, don't add weapons to it.

Table of Contents

Commands
Cvars
Installation
File Configuration Guide
Possible Use
Change Log
Downloads

Commands
top


Code:
  • say/say_team /weapons
    This command will open the weapons menu. Command will fail in this situations: - player not alive - player already choosed weapons - different team from the one set by cvar
Cvars
top


Code:
  • team_acces
    With this cvar you can decide what team can use weapons menu 0 - both team can use menu 1 - only T can use menu 2 - only CT can use menu 3 - no team can use menu. Plugin will be paused.
Installation
top


You must compile locally, with this cusatom INCLUDE.
  • Download the files provided at the end of this post.
  • Put the amxx file into addons/amxmodx/plugins.
  • Put the sma file into addons/amxmodx/scripting ( OPTIONAL ).
  • Open addons/amxmodx/configs/plugins.ini and add at the end of the file plugin_name.amxx
  • Restart/Change MAP

You don't need to care about the file, it's created automatically into addons/amxmodx/configs with the name weapons_menu_creator.ini

File Configuration Guide
top


Code:
  • Basic information: You add primary weapons at [PRIMARY] section. You add secondary weapons at [SECONDARY] section. You add weapons in this format Weapon Bullets Acces Price
  • Weapon Names You can find a list of all primary and secondary weapons into the file. You are free to write the names how you want( capitalized or not ).
  • Admin flags They are described into the file. ALL - allow all players to use the item from the menu. NOONE - restricted to all. This make the item to DON'T appear in the menu ADMIN - anyone with AdminAcces flag set can acces the item. AdminAcces d Change this to whatever you want(same letters like the ones from users.ini), this is needed admin acces to use restricted items in menu.
  • Bullets There is a max ammo to set up, but I can't remember the exact ammount. If you want to set up default values, just search on the wiki, there is a list.
  • Price You are able to set up a price for every weapon. Use 0 to make the weapon free.
  • Building your menu A line example: SG550 205 ALL 0 If you want to mix them, so you will have both, primary & secondary weapons in the same menu, just let one of the menus empty and add into the other one the weapons you want ( TESTED by zmd ).
Possible Use
top


You could use this for a furien server, so you will create very easy anti furiens menu.
If for some reason you want to block the original buy menu, you may use this to create your own.


Change Log
top


Code:
  • V 0.1 + Initial release
  • V 0.2: + Fixed a bug with cs_set_user_money native + Fixed two bugs when changing teams
  • V 0.3: + Optimized the way in which menus were created + Changed my code style + Hope that cs_get_user_money bug is gone forever + Removed formatex, now using fprintf
  • V 0.4: + Fixed a stupid mistake that I left behing + Fixed a strange bug with NOONE acces flag. + Now menus are destroyed in plugin_end to free memory
  • V 0.5: + Removed value 3 from team_acces cvar + Changed a bit my coding style, making the code more readable + Fixed a silly mistake when creating the file. + Optimized the code + Fixed menu disaply bug + Fixed a potential bug when the plugin will think your menu is still open
  • V 1.0: + Rewrote entire plugin. + Fixed two weapons bug + Modified the way in which access are used. + Now you can set admin access from file. + Fixed run-time errors. + Remove bitsums, they were silly. + Changed file name. + Improved the way in which menus can be used(no more problems). A better handling was needed.
Downloads
top
  • V 0.1 : ~ 32 downloads
  • V 0.2 : ~ 89 downloads
  • V 0.3: ~ 29 downloads
  • V 0.4: ~ 88 downloads
  • v 0.6 : ~ 230 DOWNLOADS
Attached Files
File Type: sma Get Plugin or Get Source (WeaponsMenuCreator.sma - 2329 views - 10.4 KB)

Last edited by HamletEagle; 03-14-2015 at 14:36.
HamletEagle is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-07-2014 , 07:38   Re: Weapon Menu Creator [ V 0.1 ]
Reply With Quote #2

Thank you for sharing. I will test it. ;)
__________________
Problem with ZP?
ZP Helper!

Last edited by zmd94; 08-07-2014 at 07:40.
zmd94 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-08-2014 , 04:49   Re: Weapon Menu Creator [ V 0.1 ]
Reply With Quote #3

Quote:
Originally Posted by zmd94 View Post
Thank you for sharing. I will test it. ;)
Ok, I'm waiting for your feedback, hope everything is ok.
HamletEagle is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 08-08-2014 , 11:22   Re: Weapon Menu Creator [ V 0.1 ]
Reply With Quote #4

Well, it's actually pretty neat and working properly. Could be very useful for people, who don't want all the weapons in their buy menu. Good job and keep it on!
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-08-2014 , 12:29   Re: Weapon Menu Creator [ V 0.1 ]
Reply With Quote #5

I have tested the plugin and it is working. However, I have a bad and good news.

The bad news is I have encountered this problems:
Quote:
L 08/09/2014 - 00:06:10: [AMXX] Run time error 10 (plugin "advanced_menu_creator.amxx") (native "cs_get_user_money") - debug not enabled!
L 08/09/2014 - 00:06:10: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
And after debug:
Quote:
L 08/09/2014 - 00:08:47: [CSTRIKE] Invalid player 5
L 08/09/2014 - 00:08:47: [AMXX] Displaying debug trace (plugin "advanced_menu_creator.amxx", version "0.1")
L 08/09/2014 - 00:08:47: [AMXX] Run time error 10: native error (native "cs_get_user_money")
L 08/09/2014 - 00:08:47: [AMXX] [0] advanced_menu_creator.sma::UTIL_HandleBothMen us (line 441)
L 08/09/2014 - 00:08:47: [AMXX] [1] advanced_menu_creator.sma:rimaryWeapHandler (line 376)
The good news is the weapon menu is working. I have tested to mix both primary & secondary weapons in the same menu. It is working. Below is the screenshot:



__________________
Problem with ZP?
ZP Helper!

Last edited by zmd94; 08-08-2014 at 12:30.
zmd94 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-08-2014 , 13:59   Re: Weapon Menu Creator [ V 0.1 ]
Reply With Quote #6

Ok, I was thinking that the error you ecountered could appear, will fix it soon.
__________________
HamletEagle is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-08-2014 , 19:31   Re: Weapon Menu Creator [ V 0.1 ]
Reply With Quote #7

Quote:
Originally Posted by HamletEagle View Post
I will fix it soon.


We will wait for the update.
__________________
Problem with ZP?
ZP Helper!
zmd94 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-09-2014 , 04:46   Re: Weapon Menu Creator [ V 0.2 ]
Reply With Quote #8

Code:
V 0.2:
+Fixed a bug with cs_set_user_money native
+Fixed two bugs when changing teams
__________________

Last edited by HamletEagle; 08-09-2014 at 04:46.
HamletEagle is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-09-2014 , 05:32   Re: Weapon Menu Creator [ V 0.2 ]
Reply With Quote #9

Quote:
Originally Posted by HamletEagle
V 0.2:
+Fixed a bug with cs_set_user_money native
+Fixed two bugs when changing teams
Nice. ;)

I'll test again.
__________________
Problem with ZP?
ZP Helper!

Last edited by zmd94; 08-09-2014 at 05:32.
zmd94 is offline
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 08-15-2014 , 05:35   Re: Weapon Menu Creator [ V 0.2 ]
Reply With Quote #10

GJ.. (y)
__________________
Eagle07 is offline
Reply


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 07:02.


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