Raised This Month: $12 Target: $400
 3% 

Armoury Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-10-2016 , 14:44   Armoury Manager
Reply With Quote #1

Armoury Manager
v0.3b


For those that do not know what an armoury_entity is, they are the weapons that are on the ground on maps such as fy_snow and fy_iceworld that are free for players to pickup. Each of these entities can be set to a specific weapon/item type and set to hold X quantity of the item. This plugin allows you to create armoury_entity's on maps that do and do not have them by default. The following items are not available as an armoury_entity: c4, knife, pistols, famas and galil. armoury_entity's are not the same as weapons that have been dropped.

This plugin allows you to:
  • Create armoury_entity's
  • Change existing armoury_entity weapon type and/or count
  • Delete/Undelete armoury_entity's
All changes to armoury_entity's are stored separately for each map so you can create/modify/delete them on each map independently. Each change is specific to the exact one that was selected so changing one weapon will not affect any other weapons in the map. All changes are re-applied when the map is changed. The changes are saved to amxmodx\configs\ArmouryManager\ and the file name is the map name. The map config files are saved in binary format so do not attempt to modify them with a text editor because the file will become broken and the plugin may crash when it attempts to process it.


Commands
  • am_enable - This enables the Armoury Manager. It will make all armoury_entity's, even empty or deleted ones, display on the map. When the manager is enabled, you will get a HUD message when aiming at a weapon which tells you details about the weapon as well as a message telling you to hold Use to select the item. When aiming at an empty area, a HUD message will display which tells you that an item can be created. You cannot pickup any armoury_entity's while the manager is enabled so you can walk over them while you are making changes without picking them up.
  • am_disable - This disables the Armoury Manager. It will put all armoury_entity changes into effect and re-hide any unmodified armoury_entity's if they are empty.
  • am_info <optional start pos> - This displays the status of all armoury_entity's on the map, including both original and ones that have been created. Due to limitations of the MOTD window, it cannot display the status of more than ~12 at a time so to view more than the first 12, you need to specify the start pos in the command (eg. "am_info 13").
  • am_deletemapconfig - This deletes all saved changes for the current map. To restore all entities to their original state you must change the map.

Usage
Basic usage is as follows: am_enable command, make all entity changes, am_disable command. Weapons cannot be picked up until am_disable is used.

Change existing armoury_entity
  1. Use am_enable command to enable the Armoury Manager.
  2. Aim at a weapon until it glows and a HUD message appears with the items details. Hold the Use button to select the weapon. It will turn green when selected and you will see a menu appear with change options.
  3. Select an action to take on the weapon: Change Type, Change Count and Delete Item.
  4. When you are done making changes to all weapons that you wish to modify, use the am_disable command to disable the manager.

Create a new armoury_entity
  1. Use am_enable command to enable the Armoury Manager.
  2. Aim at an empty area on the map. A HUD message will display saying to hold Use to create an item. When you hold Use, you will then see a menu to select the item type to be created.
  3. Select the type of item and then item count.
  4. Use the am_disable command to disable the manager.

Screen shots
In this example, I am going to modify the weapon type of an existing armoury_entity.
  1. Use am_enable command.
  2. Aiming at weapon that I want to make a change to.

  3. I held Use to select the weapon. I then selected Change Type.

  4. A menu appears with change values. I selected m4a1.

  5. Weapon type successfully changed.

  6. Use am_disable command.
I also attached a tool with source code that I made in Visual Basic 6.0 that allows you to open an Armoury Manager map config file to view its contents/item details. I created this for debugging purposes only so there is no error trapping. As long as you only select an Armoury Manager config file with it, you should get no errors.


Please let me know if you discover any bugs and/or if there are any features that you think could make this better.


Changelog:
Spoiler
Attached Files
File Type: zip prjArmouryManagerTool.zip (9.7 KB, 561 views)
File Type: sma Get Plugin or Get Source (armoury_manager.sma - 1121 views - 37.5 KB)
__________________

Last edited by Bugsy; 07-12-2016 at 22:38. Reason: Updated to version 0.3b
Bugsy is offline
smiley92
Senior Member
Join Date: Jun 2011
Location: Romania
Old 01-10-2016 , 14:46   Re: Armoury Manager
Reply With Quote #2

First to download!
Thanks

I will test it and return with edit.

EDIT: In AMXX 1.8.2 I have error to compile.Can make it and for 1.8.2 to work?

Last edited by smiley92; 01-10-2016 at 14:53.
smiley92 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-10-2016 , 15:05   Re: Armoury Manager
Reply With Quote #3

I already fixed that. It will now work with the web compiler as well.
__________________

Last edited by Bugsy; 01-10-2016 at 15:05.
Bugsy is offline
smiley92
Senior Member
Join Date: Jun 2011
Location: Romania
Old 01-10-2016 , 15:43   Re: Armoury Manager
Reply With Quote #4

warning 213: tag mismatch give and now but he compile
smiley92 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-10-2016 , 17:31   Re: Armoury Manager
Reply With Quote #5

Updated copy has been posted to fix 1.8.2 compatibility issue and tag mismatches. Thank you smiley for the fast reports.
__________________

Last edited by Bugsy; 01-10-2016 at 17:31.
Bugsy is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-10-2016 , 18:14   Re: Armoury Manager
Reply With Quote #6

Don't forget that armoury_entity entities are cleaned up at new round, restarted more exactly (CArmoury::Restart), and entities created through create_entity() will be ignored by game. With amxx dev build, you could have used cs_create_entity(). To be consistent, you will need to cleanup manually custom armoury_entity (Ham_Restart)
__________________

Last edited by Arkshine; 01-10-2016 at 18:15.
Arkshine is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-10-2016 , 18:21   Re: Armoury Manager
Reply With Quote #7

Thanks Arkshine.

So using cs_create_entity, I can treat created and default entities the same at new round for cleanup/reset purposes?
__________________

Last edited by Bugsy; 01-10-2016 at 18:27.
Bugsy is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-10-2016 , 18:26   Re: Armoury Manager
Reply With Quote #8

You can read comment https://github.com/alliedmodders/amx...inc#L981-L1007

Since plugin is for 1.8.2, for now, I guess at map start, you could loop over your entities created with plugin, calling Ham_Restart.
__________________
Arkshine is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-10-2016 , 18:27   Re: Armoury Manager
Reply With Quote #9

Well yes that's the thing, I want to keep it backwards compatible since users will be running a mix of both.

Edit: Posted a fix to my fix. To resolve the 1.8.2 issue I had to register traceline as post. I overlooked not disabling the forward as post when disabling the manager.
__________________

Last edited by Bugsy; 01-10-2016 at 19:11.
Bugsy is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-16-2016 , 11:19   Re: Armoury Manager
Reply With Quote #10

Made a few updates and fixes, see changelog for details.
__________________
Bugsy 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 05:58.


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