Garry's mod: place addons in subfolder

Garry's mod: place addons in subfolder - Aerial View Photography of Mountain

I am trying to organize my addons a little, because I don't know what's what anymore. I would like to place weapons in a weapons subfolder for example, having them all in different subfolders (e.g. a folder for lightsabers, a folder for shrink gun, ...) by using GMAD extractor and then placing them inside of this "weapons folder", as shown in the image below.

enter image description here

I tried doing this by adding an autorun lua file in my "weapons" subfolder and just loading all other autoruns inside the separate folders (lightsabers, shrink gun, ...), but this isn't working. This is my "autorun" code:

include "weapons/lightsabers/lua/autorun/rb655_lightsaber.lua"
include "weapons/lightsabers/lua/autorun/rb655_lightsaber_presets.lua"

Any ideas on how I can organize my addons the way I want them to be organized?



Best Answer

The documentation for the include function reveals that (since it's a function in Lua) the path names must be enclosed by parentheses.

Therefore, your code should look something like this.

include("weapons/lightsabers/lua/autorun/rb655_lightsaber.lua")
include("weapons/lightsabers/lua/autorun/rb655_lightsaber_presets.lua")



Pictures about "Garry's mod: place addons in subfolder"

Garry's mod: place addons in subfolder - Free stock photo of animal, animal image, avian
Garry's mod: place addons in subfolder - White and Gold Round Coins
Garry's mod: place addons in subfolder - Photo of Led Signage on the Wall



Where do I put GMOD addons?

Drag the addon folder from your file manager and drop it into the addons folder on your server.



Garry - Ami É De Li [Video Oficial] Álbum ”Novo Ciclo“ 2022




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: icon0.com, Aslam Jawaid, DS stories, Tim Mossholder