How to Force Players to Download Workshop Addons on Your Garry's Mod Server Print

  • 0

Want to ensure players have all the necessary content when they join your server? You can force client downloads of Workshop addons using a simple script. Follow the steps below to configure it through your Imperium Hosting control panel.


Step-by-Step Instructions

  1. Log Into Your Control Panel
    Head over to the Imperium Hosting Control Panel and log in with your credentials.

  2. Access Your Garry’s Mod Server
    Click on your Garry’s Mod game service to open the server management view.

  3. Open the File Manager
    From the sidebar or module list, click “File Manager.”

  4. Navigate to the Autorun Folder

    • Go to the directory:

       
      garrysmod/lua/autorun
    • If it doesn’t already exist, create a new folder here named:

       
      server
  5. Create the workshop.lua File

    • Inside the garrysmod/lua/autorun/server/ folder, create a new file named:

       
      workshop.lua
  6. Edit the File in the Text Editor

    • Click the pencil icon next to workshop.lua to open it in the editor

    • For each Workshop addon you want players to download, add a line like:

       
      resource.AddWorkshop("workshopidhere")

      Replace workshopidhere with the actual Workshop ID (found at the end of each addon’s URL).


Example:

Let’s say you’re using the following M9K weapon packs:

Your workshop.lua file would look like this:

resource.AddWorkshop("128089118") resource.AddWorkshop("128093075") resource.AddWorkshop("128091208")

Optional: Use a Workshop Generator Tool

For larger addon lists, you can use this tool to generate your code automatically:
GMod Universal Workshop Tool


Final Step: Restart Your Server

After saving the file, return to your control panel and restart your server. Clients will now be prompted to download the required addons when they connect.


You're All Set!

Players will automatically download the content you've specified, ensuring a seamless in-game experience.

Need help finding Workshop IDs or troubleshooting client errors? Submit a support ticket, we’re happy to help!


Was this answer helpful?

« Back