This repository contains various sample addons for Garry's Mod. Each addon is self-contained and demonstrates some aspect of Garry's Mod development.
You are welcome to modify or adapt any of these addons to create your own addon.
Visual Studio Code (Windows/Mac/Linux) for Garry's Mod Lua development.
You should also get the following extensions:
- GLua language support - Syntax highlighting, intellisense for Garry's Mod library functions
- GMod SDK - Workshop tools, addon creation tools, weapon samples and more
See Usage for instructions on how to download and use the samples.
Sample | Description |
---|---|
Hello World | A basic sandbox weapon |
TTT Traitor Weapon | A weapon for TTT that traitors can buy through the equipment shop |
Map Hello World | A simple map addon |
- Download the repository as a ZIP & unzip
- Or used
git clone https://github.com/BadgerCode/GMod-Addon-Samples.git
- Or used
- Once downloaded
- Open Visual Studio Code
- Go to
File
->Open Folder
- Select any folder in the downloaded repository samples folder (e.g.
samples/hello-world
)
- Copy the addon to your Garry's Mod addon folder
- This is easy if you're using the GMod SDK extension
- Otherwise, follow this guide to find your Garry's Mod addons folder