Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Lua 

(Gmod) Lua coding a spawn menu (simple)

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!
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.
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.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Lua] by Toph BeifongMay 7, 2025 07:19 PM 13 654 May 7, 2025 07:19 PM
Last Post: Phantom_NiNja
by DadlurBriarFeb 17, 2024 06:27 PM 0 155 Feb 17, 2024 06:27 PM
Last Post: DadlurBriar
[Lua] by KazokoNov 30, 2021 03:41 PM 2 305 Nov 30, 2021 03:41 PM
Last Post: damamamb