Lua Folder Structure
From GMod Wiki
The structure of the Lua folder can be confusing. Here's a rundown.
- lua
- autorun - all files are automatically loaded on Lua start.
- client - autorun client scripts.
- server - autorun server scripts.
- shared - autorun shared (both cl_ and sv_) scripts.
- includes - init.lua loaded on start.
- _downloaded - Clientside downloaded files
- .cache - Contains cached versions of all downloaded files (to prevent constantly redownloading)
- postprocess - Run by client on startup
- autorun - all files are automatically loaded on Lua start.
- gamemodes - Contains gamemodes. Gamemodes are only run when they're required (either by the map setting the gamemode or by another gamemode being derived from that gamemode).
- base - Entities in this folder exist in every Gamemode
- entities - All scripted items come under this directory.
- weapons - Scripted Weapons
- entities - Scripted Entities
- effects - Scripted Effects
- gamemode - All Gamemode scripts go in here.
- entities - All scripted items come under this directory.
- other gamemodes
- entities - All scripted items come under this directory.
- weapons - Scripted Weapons
- entities - Scripted Entities
- effects - Scripted Effects
- gamemode - All Gamemode scripts go in here.
- entities - All scripted items come under this directory.
- base - Entities in this folder exist in every Gamemode