Disabling Spawnmenu Tabs

Hey Guys

Is there anyway to disable specific tabs clientside. I’d like to disable Dupes, Vehicles, etc on my server.

Any help is appreciated.

Research before you ask. What Robotboy655 posted hereshould give you the basic idea.

Well I did research and try that method however it does not work for me. Or at least I’m not putting it in the right area. Would I put this in my gamemodes init.lua?

Did you call the function from the PopulateContent hook as it says? It works fine if you do.

Yes, pretty sure. This is the code I found earlier

local function removeOldTabls()
	for k, v in pairs( g_SpawnMenu.CreateMenu.Items ) do
		if (v.Tab:GetText() == language.GetPhrase("spawnmenu.category.npcs") or 
			v.Tab:GetText() == language.GetPhrase("spawnmenu.category.entities") or 
			v.Tab:GetText() == language.GetPhrase("spawnmenu.category.weapons") or 
			v.Tab:GetText() == language.GetPhrase("spawnmenu.category.vehicles") or 
			v.Tab:GetText() == language.GetPhrase("spawnmenu.category.postprocess") ) then
			g_SpawnMenu.CreateMenu:CloseTab( v.Tab, true )

hook.Add( "PopulateContent", "rb655_", function( pnlContent, tree, node )
end )

[editline]29th March 2014[/editline]

Anyone know where I should put the code?

Would anyone be able to add me on steam, and help through chat?

That defies the point of the forums, how are others supposed to learn when coming across this thread?

I would reply back saying I have solved the issue and what I did to solve it? Plus it seems no one is replying anyway.

That’s probably because you were given the correct answer, you’re just not applying it correctly.
Are you sure it’s being ran on the client? Rather than on the server.

Not really sure. Theres a client folder in the gamemode, of which I opened a lua file that has some code to make a new tab, however when I put the code in their and test it out it does nothing.

[editline]30th March 2014[/editline]

Just found out why it wasn’t doing anything. the spawnmenu.category.saves etc is the wrong name. Some close down but others don’t. Does anybody know what spawnmenu.category.saves should be called?

If some do work and some don’t, then you’re still using the incorrect names.

I realise that, not sure what they are suppose to be though. The NPC, Vehicles and Saves tabs are still there. Also how would I disable the tools tab, etc.

[editline]30th March 2014[/editline]

Any possible way to get the names of the tabs?