• Custom STools menu
    4 replies, posted
Hey guys im still very new to gmod lua and stuff. Im trying to get the stools in my new qmenu, but i just cant get this to work. I use the base gamemode for gamemode creation, because i want to keep things small and clean :P I have copied the gmod_tool+subfolders form sandbox to my gamemode location and prepared the scripts for my spawn menu. But the problem is, the game just cant find any tools to use and i think im missing something here, maybe i have to register them first somewhere or something like this. Usually the stool menus get created by using the table from spawnmenu.GetTools() as far as i know, but in my case its always empty... Unfortunately the gmod wikis doesnt clearly anwers this. I would appreciate, if anyone of these smart coders here has an answer for this and helps the newbs to also create nice stuff :smile: thanks in advance and sorry for the bad english. .delay
You are better off by just deriving from sandbox if you need tools. Trust me, it will be pain in the ass should an update come out for those files.
Wow. Thanks for this fast answer, i have somehow expected. I thought it was a good idea to create a new gamemode just from base. Because sandbox mode has much more files and stuff i dont need. And i've seen other gamemodes like the public stranded version from workshop and the tools there work good. And the whole gamemode is even smaller than sandbox. I think they get imported somehow, but i couldnt figure it out at all -.- I have another question, if im going to use the sandbox mode my tools will ever be up to date?
[QUOTE=.delay;44269667]Wow. Thanks for this fast answer, i have somehow expected. I thought it was a good idea to create a new gamemode just from base. Because sandbox mode has much more files and stuff i dont need. And i've seen other gamemodes like the public stranded version from workshop and the tools there work good. And the whole gamemode is even smaller than sandbox. I think they get imported somehow, but i couldnt figure it out at all -.- I have another question, if im going to use the sandbox mode my tools will ever be up to date?[/QUOTE] You don't actually need the sandbox files in your gamemode to derive your gamemode from sandbox ( Use sandbox as base ), all you need to do is to call a function DeriveGamemode("sandbox") in your shared.lua ( Or separately in cl_init.lua and init.lua ) and replace base gamemode from "base" to "sandbox" in the gamemodename.txt file.
YES YES and YEEES, problem solved, you saved my day man!! Thank you very much :rock: :rock: :rock:
Sorry, you need to Log In to post a reply to this thread.