How to force players to download workshop addons

In this article, we will be reviewing the process of forcing players to download workshop addons on your Garry's Mod server.
Step 1: Log into your Host Havoc game control panel (http://panel.hosthavoc.com).
Step 2: View your game service.
Step 3: Open the File Manager.
Step 4: Navigate to the garrysmod/lua/autorun folder.
Step 5: If it does not already exist, create a folder in this directory named 'server'. Go into this directory.
Step 6: Create a new file named workshop.lua. Ensure this file is located in 'garrysmod/lua/autorun/server'.
Step 7: Open the file in the text editor (click the pencil icon next to the file).
Step 8: For every addon that you want the client to download, place the following: resource.AddWorkshop(workshopidhere). Replace 'workshopidhere' with the addon's workshop ID. This can be found at the end of the URL (numeric value).

Let's take a look at an example. We have the following 3 addons, all M9K weapon packs:
So, we have 3 IDs we will be working with; 128089118128093075 and 128091208

We will want our workshop.lua file to look like:
resource.AddWorkshop("128089118")
resource.AddWorkshop("128093075")
resource.AddWorkshop("128091208")
 
Additionally, you can use a tool such as this one to help generate the needed code.
https://csite.io/tools/gmod-universal-workshop
  • Garry's Mod, GMod, Addons
  • 258 Users Found This Useful
Was this answer helpful?

Related Articles

How to change your RCON password/disable RCON as a whole

To change/enable your password for your Garrys Mod server, you'll need to follow these steps:...

How to change your server's hostname

To change your Garry's Mod server hostname, you'll need to follow these steps: Step 1: Log into...

How to edit your command line

In order to edit your server's command line for your Garry's Mod server, you'll need to follow...

How to password protect your server

The following article will guide you through the process of password protecting your Host Havoc...

Installing a custom Garry's Mod map

Step 1. Locate where you'd want to download your map from. This can be either from the Steam...