• Creating a store in the spawnmenu. (And Hiding other tabs)
    1 replies, posted
I need help creating a tab in the spawnmenu that allows objects to be purchased. It seems like it would be rather simple, just a menu that spawns a sEnt or a normal ent, and deducts your money. But I cannot figure out for the life of me on how to do it. Also, how the hell would I go about removing the other tabs? Here's the code i'm using for removing the tabs, but the postprocessing tab, the dupes tab, the entity tab, and the scars tab still remain. [LUA] 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.saves") or v.Tab:GetText() == language.GetPhrase("spawnmenu.category.dupes") or v.Tab:GetText() == language.GetPhrase("spawnmenu.category.scars") 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 ) end end end hook.Add( "PopulateContent", "rb665_thisisthenamebrah", removeOldTabls ) [/LUA]
Dont use the spawn menu, make your own derma menu instead. The nice thing about Derma is that its very simple to copy/paste stuff, its not terribly challenging to code either. [url]http://wiki.garrysmod.com/page/Category:DFrame[/url] [url]http://wiki.garrysmod.com/page/VGUI/Elements[/url]
Sorry, you need to Log In to post a reply to this thread.