• Custom spawnmenu category?
    4 replies, posted
I have whitelist of props on my server and I wanna separate them in spawnlist from others. I tried spawnmenu.AddPropCategory() and this doesn't work. I'm surfed all what concern to this and doesn't found the answer.
You need to run this in specific hook when spawnmenu is asking for content inside it. http://wiki.garrysmod.com/page/SANDBOX/PopulatePropMenu
nah, I tried it
There's a wokring example on the wiki page for spawnmenu.AddPropCategory
https://files.facepunch.com/forum/upload/134299/81abcff5-8d46-4d07-b983-5ca226f67b06/image.png etc hook.Add("PopulatePropMenu", "AllowedProps", function()     local props = {}     table.insert(props, {type = "header", text = "Garry's Mod"})     for k, v in pairs(garrysmod_props) do         table.insert(props, {type = "model", model = v})     end     table.insert(props, {type = "header", text = "Counter-Strike: Source"})     for k, v in pairs(css_props) do         table.insert(props, {type = "model", model = v})     end     table.insert(props, {type = "header", text = "Other"})     for k, v in pairs(other_props) do         table.insert(props, {type = "model", model = v})     end     spawnmenu.AddPropCategory("AllowedProps", "Allowed Props", props, "icon16/page.png") end)
Sorry, you need to Log In to post a reply to this thread.