![]() |
|
[Lua] (Gmod) Lua coding a spawn menu (simple) - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5) +---- Thread: [Lua] (Gmod) Lua coding a spawn menu (simple) (/showthread.php?tid=5666591) |
(Gmod) Lua coding a spawn menu (simple) - Caleb Tynes - Jul 10, 2017 So I've got a prebuilt code made by another modder who's built an extended spawn menu for Gmod. It's designed to show all addons that you're subscribed to and put them into easy-to-use categories for quick access. However, I'm using a manually installed Legacy Addon pack. I've added in several addons over the course of a few months. They're also integrated into the core game files. This means instead of the addon files existing in the "addons" folder, they're located in the core game files like this: Garry'sMod/garry'smod/lua, sound, models, etc. I have a script that already creates a spawn menu from the addons folder. All I need to do is change a few key values within the code so that it searches the folders mentioned above instead of my addons folder, however, I'm not sure which values need changing as I don't exactly know what I'm doing. Note: I can't put any links down yet so I'll have to post either a reply showing the code or email it to whoever is willing to help. Any help is greatly appreciated! * - Gorzoid - Jul 10, 2017 Really you shouldn't be "integrating" the addons into the root lua folder, if it doesn't come with a folder just create a new folder in addons and drop it in there. There's no easy way to enumerate addons that are installed with that method. btw you can just add spaces to the link if you can't post one yet. * - JumpT - Sep 24, 2017 Just to point out, like stated above, it's not really a good idea to be mixing your addons with your core garrysmod files. When you want to uninstall those addons, it would be a pain to go through the core files to find everything. I would suggest you move everything back to your addons folder and make a seperate folder for each one unless they already have one then you won't have problems with the script. |