Removing weapon category

for some reason my players can spawn guns and i would like to remove the weapons category completely from the Q menu

[editline]23rd October 2015[/editline]

its for dark rp btw

local function removeOldTabls()
if !table.HasValue({"minister", "superadmin"}, LocalPlayer():GetUserGroup()) then
	for k, v in pairs( g_SpawnMenu.CreateMenu.Items ) do
		if (v.Tab:GetText() == language.GetPhrase("spawnmenu.category.weapons") or 
			--v.Tab:GetText() == language.GetPhrase("spawnmenu.category.entities") or 
			--v.Tab:GetText() == language.GetPhrase("spawnmenu.category.npcs") or 
			--v.Tab:GetText() == language.GetPhrase("spawnmenu.category.vehicles") or 
			--v.Tab:GetText() == language.GetPhrase("spawnmenu.category.postprocess") or
			--v.Tab:GetText() == language.GetPhrase("spawnmenu.category.dupes") or
			--v.Tab:GetText() == language.GetPhrase("spawnmenu.category.saves")) then
			g_SpawnMenu.CreateMenu:CloseTab( v.Tab, true )
hook.Add("SpawnMenuOpen", "rmmenutabs", removeOldTabls)

example above will hide only weapons tab for all excepting players in “minister” and “superadmin” groups. For hiding other tabs just uncomment needed lines
look for details here :slight_smile:

Flat out removing the weapons tab may stop the average joe from spawning weapons, but gm_spawnweapon or whatever it is called still exists. I recommend that in the hook that is called on weapon spawn, just return false to stop weapon spawning.