Skip to content
Understanding Garry's Mod API (GMod Lua)
Garry's Mod

Understanding Garry's Mod API (GMod Lua)

Unlock the power of Garry's Mod scripting! This guide breaks down the GMod Lua API, helping you understand and utilize its functions for custom game modes and addons.

By ···10 min read·Multi-source verified
1 reading this guide  

Unlock the power of Garry's Mod scripting! This guide breaks down the GMod Lua API, helping you understand and utilize its functions for custom game modes and addons.

This guide will help you understand the Garry's Mod API (GMod Lua). It covers server configuration, installing content, and uploading maps.

Basic server configuration

Create backup

You can create backups for your GPORTAL server. Free storage space is provided for saving your gameplay. Backups are not created automatically.

How to create a backup via the web interface:

  1. Log on to our website
  2. Click on “My Servers” in the menu on the left
  3. Select the desired server
  4. Click on “Backup” in the “Administration” menu on the left
  5. Click on “Create Backup“
  6. The server stops for the backup
  7. After creating the backup, the server restarts automatically

Further Garry’s Mod server configuration

How do I install Steam workshop content?

  1. Generate an API Key at https://steamcommunity.com/dev/apikey
  2. Log on to our website
  3. Click on “My Server” in the menu on the left
  4. Select the chosen server
  5. Stop the server
  6. Navigate to “Basic Settings” in the menu on the left
  7. Under the “Workshop” item, enter the API Key
  8. Enter the Collection ID under “Workshop Collection”
  9. Confirm the change using the “Save” button
  10. Restart the server

Note Only complete collections work.

If you do not see the address bar on Steam, navigate to Steam-> Settings-> Interface and select “Show Steam URL address bar if available“.

How do I install DarkRP?

  1. Download DarkRP from GitHub
  2. Unzip the download on your computer
  3. Name the unzipped folder in “darkrp“
  4. Log on to your GPORTAL account
  5. Select the chosen server
  6. Make a note of the FTP access data
  7. Use an FTP client to connect to the FTP
  8. Navigate to the “/garrysmod/gamesmodes” folder
  9. Navigate to “Basic Settings” in the web interface on the left
  10. Stop the server
  11. Select the game mode “DarkRP”
  12. Restart the server

Note Regularly update DarkRP. We recommend an interval of 1-2 months. Perform the above steps to update, overwriting the folder on the FTP server.

Frequently Asked Questions / FAQ

How do I upload Garry’s Mod maps?

Maps for Garry’s Mod must be uploaded via the FTP server. Maps in workshop collections will not be transferred.

  1. Log on to our website
  2. Select the chosen server
  3. Make a note of the FTP data
  4. Start your FTP client (e.g. FileZila)
  5. Navigate to the “/maps” folder
  6. Load the maps into the directory
  7. Restart the server to implement the changes

100% Human-Written. AI Fact-Checked. Community Verified. Learn how AntMag verifies content