Adding weapons/items to the armory
Hey,
Here is a step-by-step tutorial on how to add a new item to the police locker.
Navigate to this directory: addons/police_armory_locker/lua/armory_locker/shared/armory_items
In here you should create a new file (unless you want to use an existing one) and name it something.lua
You can run policearmory_printwepinfo in-game while holding the weapon and it should print the entire code you need for you!
If you want to manually do it, then open any of the pre-existing files and copy the format. It looks like this:
Most of it is self-explanatory, but let me highlight the most important things.
Class is the entity name of a weapon.
Type is the type of the item. This means what code is ran when you retrieve this item from the locker. For ANY weapon you can just put weapon as the type, but you can also put health or armor if you're making another item.
AmmoType is the name of the ammo the weapon uses. Many weapons use default ammo types like pistol, rifle, smg1 and so on. Here is a list of all default ammo types: https://wiki.facepunch.com/gmod/Default_Ammo_Types
AllowedTeams defines what teams can retrieve this item. It must be enabled with TeamRestricted set to true. If not then any team can retrieve it.
MRSRanks is a list that defines which ranks can retrieve this item using MRS - Advanced Rank System. It must be enabled with MRSRestricted set to true.
AllowedUsergroups is a list of ranks/usergroups that can retrieve the item. To use this feature set RankRestricted as true.