Weapons in different Slots

Hello Facepunch Com,

I have a mostly minor problem, but i do want to fix it tho.
Ingame I have a Police Officer job, that has the arrest baton, unarresr baton ETC, what police officers have as commons. So, my problem now is, that all of that stuff is in slot 2, but i want for example the Batons on slot 5, and the handcuffs for example in slot 4.

But i cant seem to find any help in the internet yet, so I wrote this article. I didnt seem to find or get a lua data where this is maybe delt with, or I can maybe deal with it myself by writing a code there.

I look forward to your help and do thank you now, if u help.
(Sry for my bad English, im native german)

You can find information on the SWEP structure here: http://wiki.garrysmod.com/page/Structures/SWEP
You are probably looking to find “Slot” and “SlotPos”

Edit the SWEP you want to have in another slot and find

SWEP.Slot = 2

You can edit the position it will have there.
The code underneath would place the SWEP in slot 3, and if you have multiple weapons in Slot 3 it would place it as SWEP number 3 within the slot, given that the other two SWEPS would have a lower SlotPos.

	SWEP.PrintName = "arrest baton"
	SWEP.Slot = 3
	SWEP.SlotPos = 3

Where do I edit the swep? Cant find any folder or lua data.

But still, thx for helping me with that!

Check the path as shown below, “gamemodepath” will be the path to where your gamemode is located, within the gamemode folder you will most likely find a folder containing entities.

In case you have any weapons from addons you can use SnowredWolf’s solution only that you have to browse to addons/<addon>/entities/weapons instead.