Garry's Mod

Garry's Mod
22 ArticlesHow to Ban a Player from a Garry's Mod Server
Sometimes it is incredibly useful to ban rowdy players from your GMod server. This article will cover how to kick and ban players from your server using ULX in-game commands. ::ProseNote{title="Note" description="Make sure that the user you’re banning is not a superadmin on your server." appearance="default"} :: --- Method 1: Using ULX Before we start, ensure that you are set as an Administrator on your server. To do this, please refer to our guide on Installing ULX & ULIB Admin System to your Garry's Mod Server. 1. Once you’ve set up your ULX Admin system, open the console in-game by pressing . 2. You can now enter any ULX commands. | Syntax | Description | | -------- | ------- | | | Bans a player based off their username for an optional amount of time. | | | Bans a player based off their SteamID for an optional amount of time. | | | Unbans a user based off their SteamID or username at the time of ban. | 3. Click Submit to enter the command. --- Method 2: Banning In-Game 1. Login to your server and open the in-game chat (by pressing ). 2. In the in-game chat, enter any of the following commands: | Month | Savings | | -------- | ------- | | | Bans a player based off their username for an optional amount of time. | | | Bans a player based off their SteamID for an optional amount of time. | | | Unbans a user based off their SteamID or username at the time of ban. | 3. Press Enter on your keyboard to send the command. --- If you require any further assistance, please contact our support at: https://shockbyte.com/billing/submitticket.php
How to Adjust your Garry's Mod Server Settings
From difficulty to in-game settings, you can customize just about everything to suit needs. Most customisation can be done via Garry's Mod Server Settings and the Garry's Mod Server.cfg file, which covers general settings that apply to the entire server. --- Editing the gmod.properties file The gmod.properties or Garry's Mod Server Settings can be used to configure the basic settings of your server, including but not limited to its map, gamemode, workshop collection ID, tickrate, and more! These can be set via our built-in config tool by following these steps: 1. Access your Control Panel and Stop your server. 2. Navigate to the Config tab and select the Garry's Mod Server Settings file. 3. Make your desired changes, save and restart your server to ensure the changes apply. A list of some configs can be found below: | Setting | Description | | -------- | ------- | | Steam Updates | Enable automatic updates for your server | | Starting Map | The starting map to use for the server | | Game Mode | The game mode to load for the server | | Host Workshop Collection | The ID of a Steam collection containing the addons you wish to use | | Insecure | Disables VAC (Valve Anti-Cheat), allowing VAC-banned players to join. Required for some mods and custom content | --- Editing the server.cfg file Should you need to change any settings not present in the Garry's Mod Server Settings file, then you will be required to add this the Garry's Mod Server Config. The server.cfg file is used to store server ConVars / CVars (Console Variables). 1. Access your Control Panel and Stop your server. 2. Navigate to the Config tab and select the Garry's Mod Game Settings file. 3. Make your desired changes, save and restart your server to ensure the changes apply. A list of some configs can be found below: | Setting | Description | | -------- | ------- | | Server Name | The server name to show in the server list | | Server Password | The password required to join your server | | RCON Password | The password to connect to your server through RCON | | Enable Cheats | Enable cheats on your server | | Enable Safe Resources | Force clients with malformed default assets to use server defaults | | Steam GSLT Key | Insert your Steam GSLT Key here to authenticate with Steam | --- If you require any further assistance, please contact our support at: https://shockbyte.com/billing/submitticket.php
How to Setup Player Permissions in Garry's Mod
Often, server owners will want to grant specific players permission to perform administrative actions to use cheat commands on their servers. This article covers using the ULX admin mod to setup permissions on your GMOD server. This guide assumes that you have followed the instructions in our Installing ULX & ULIB Admin System to your Garry's Mod Server guide prior to continuing with this guide. --- ULX Basics Before you’ll be able to interact with ULX’s admin commands, you’ll want to add yourself as a superadmin. You can accomplish this by joining your server and issuing the following command on your server’s console (Accessible by clicking the Console button): You should replace with your SteamID, which can be found using a site like steamid.io. Once you have added yourself as superadmin, you should be able to use admin commands in-game. You can open the ULX menu by typing in the chat or using the command in the in-game console. The following menu should appear: In the ULX menu, you can find all of ULX's functionality organized into 5 main tabs at the top of the page: | Command | Description | | -------- | ------- | | Cmds | Contains all of the commands that are available to your group organized into several different categories. You can click on a category name on the left side to expand it and view the commands that are a part of that category. To run a command, simply click it, fill out the form in the middle and right sides to supply the required arguments, and click the button with the command's name on the right side of the menu. | | Groups | Allows you to create groups, assign permissions, add/remove users to/from groups, as well as various other functionality related to group management. | | Maps | Allows you to change the map and for players to vote for the next map. | | Settings | Contains various client and server settings. Only superadmins can change server settings. | | Bans | A list of everybody who has been banned from your server. You can also remove and add new bans from here. | Most ULX commands have a chat command equivalent. For instance, you can teleport another player to you by typing in the chat and it will work exactly the same as the bring command in the Cmds tab of the ULX menu. --- Configuring Player Permissions Adding/Removing Groups ::ProseNote{title="Warning" description="Many addons expect the admin and superadmin groups to be used for administrators and super administrators. If you choose to rename these groups, or use a group like over , you may experience issues with some add-ons not allowing access to these groups properly." appearance="danger"} :: By default, ULX includes 3 administrator groups, which are (from least privileged to most privileged) operator, admin, and superadmin. You can add additional groups or remove existing groups as required within the Groups tab of the ULX menu. To manage groups: 1. Open the ULX menu. 2. Select the Groups tab. 3. Expand the dropdown in the top left corner. 4. Select Manage Groups. Once your ULX menu looks like the screenshot below, you are ready to manage your server's groups: Creating a Group To create a group, simply fill out the form on the right side of the menu and press Create New. The meaning of the fields can be found in the table below: | Setting | Description | | -------- | ------- | | Name | The name of the group to create. This can be anything, but the general convention is that group names are all lower case and all spaces are replaced with underscores (). | | Inherits From | An existing group that the new group should inherit permissions from. The new group will be able to do anything the chosen group can in addition to any other permissions you may grant to it. | | Can Target | The new group will only be able to target users and groups that this rule allows. If set to , the group will be able to target everybody. A common use for this is preventing a group from targeting anybody who is higher in rank than they are. For instance, if you wanted to stop the operator group from targeting any member of admin and any group that inherits from admin, you would enter into this field. | Updating an Existing Group Any of the above listed attributes of an existing group can be updated by selecting the name of the group you would like to update from the left side of the menu, changing the desired attributes, and clicking the Update button. Removing an Existing Group ::ProseNote{title="Warning" description="Deleting a group is a destructive action. All permissions and users associated with a group are lost when the group is deleted." appearance="danger"} :: A group may be deleted by selecting a group from the menu on the left side of the ULX menu and clicking the Delete button. Granting/Revoking Permissions Permissions can be added and removed as needed in the Groups tab of the ULX menu. To manage the permissions for a group, simply open the Groups tab, select the group that you would like to modify the permissions of in the dropdown in the upper left corner of the menu, and click the Manage Permissions button on the bottom of the menu. Once you’ve done this, you should see something like the menu below: Similarly to the categories on the Cmds tab, the categories in this menu can be clicked on to reveal all permission that comprise the category. You can grant a permission to the selected group by checking the box next to permission and you can revoke a permission by unchecking the box. If a box is faded and checked, it means that the permission has been granted to a group that the group you are editing inherits permissions from and that the permissions must be revoked for that group too in order to remove them from the current group. Restriction Command Arguments You can add restrictions to what arguments players are allowed to use with a command by selecting the permission, editing the fields on the right side of the menu, and clicking the Apply restrictions button. For instance, if one wanted their admins to only be able to jail a player for 60 seconds at a time, they should restrict the seconds arguments of the ulx jail command to a minimum of 1 second (so they couldn’t specify 0, which is forever) and a maximum of 60 seconds as shown in the screenshot above. Managing Users ::ProseNote{title="Warning" description="If you assign a new group to yourself or you remove your existing group, you may inadvertently remove your ability to manage permissions in-game. To restore your privileges, simply use the console command method in the Assigning Users to Groups section of this article to grant yourself superadmin access." appearance="danger"} :: Upon joining the server for the first time, all users will be a member of the default user group. This group has very limited access and is suitable for any players that you don’t trust with administrator access. For everybody else, however, you’ll want to add them to a group with more access. Assigning Users to Groups You can assign a user to a group through the ULX menu or by using console commands. Through the menu: 1. Open the ULX menu using the chat command 2. Switch to the Groups tab 3. Select the group from the dropdown in the top left corner that you would like to add the user to. 4. Click the Add button and click the name of the user you would like to add to the group. If the user is not online, you can use their SteamID to add them by selecting Add by SteamID. You can find a user’s SteamID using a site like steamid.io. To add a user to a group via console command, you can run the following command in your server’s console or in your in-game console: You should replace with the user’s SteamID, which can be found using a site like steamid.io, and with the name of the group you would like to add the user to. Removing Users from Groups Similar to adding users to groups, removing a user from groups may also be done through the menu or the console. To remove a user from a group in the menu: 1. Open the ULX menu. 2. Select the Groups tab. 3. Select the group that the user is currently a member of from the dropdown in the top left corner. 4. Click the change button and select either the new group you would like the user to be moved to or the Remove User button to revert them to the default group. To remove a user from a group via console. Issue the following command in the server console or in your in-game console: --- If you require any further assistance, please contact our support at: https://shockbyte.com/billing/submitticket.php
How to Mount CStrike and TF2 Files to your Garry's Mod Server
In Garry's Mod, many servers utilise content from Counter-Strike: Source and Team Fortress 2. This article covers mounting the content from these games to your server so that you may utilise maps, models, and other resources from these games. --- Mounting CS:S / TF2 Files You can mount your CS:S & TF2 files directly to your server by uploading them via FTP and making the appropriate configuration changes. 1. Install the game you wish to mount on your PC using Steam. - CS:S Steam Page - TF2 Steam Page 2. Right-click CS:S/TF2 within your Steam Library, and navigate to Properties... Local Files Browse... 3. Access your Control Panel and Stop your server. 4. Navigate to the Files tab. Connect to your server's FTP, we suggest using FileZilla. 5. Upload the game folder to the root directory of your server files. This will be for CS:S, and for TF2 (these uploads may take a while). 6. Edit located under the path as appropriate for the game you are mounting. - If you are mounting CS:S, change to . - If you are mounting TF2, change to . 7. Save and Restart your server to apply the changes. - To test if CS:S was mounted successfully, you can run the console command . If the map changes to Dust 2, CS:S is mounted. - To test if TF2 was mounted successfully, you can run the console command . If the map changes to 2 Fort, TF2 is mounted. --- If you require any further assistance, please contact our support at: https://shockbyte.com/billing/submitticket.php
How to Make your Garry's Mod Server Private
If you would like to make a Garry's Mod server for yourself and a few friends, you may wish to restrict your GMOD server so that random players cannot join your server without your permission. This article covers two methods of doing so. --- Method 1: Setting a Password Garry's Mod provides a built-in password function that prompts the user for a password when joining the server. Anybody who knows (or can guess) this password can join your server, so it's important to choose a strong password that is not easy to guess and only to give it to people that you trust. 1. Access your Control Panel and Stop your server. 2. Navigate to the Config tab and select the Garry's Mod Game Settings file. 3. Locate the setting and set your desired password. 4. Save and restart your server to ensure the new changes apply. Once your server has restarted, players will need to enter the password you chose above into their Garry's Mod clients in order to join your server. --- Method 2: Using an Allowlist Another way to protect your server from unwanted visitors is to use a list of SteamIDs to define who is allowed to join your server. Pay special attention to quotes, commas, and brackets as duplicating these or failing to insert one where necessary will result in this failing to work. 1. Access your Control Panel and Stop your server. 2. Navigate to the Files tab and locate the directory. 3. Create a new file in this directory called . 4. Paste the following code into this new file: local allowed = { ['YOURSTEAMIDHERE'] = true, ['ANOTHERSTEAMIDHERE'] = true } hook.Add('CheckPassword', 'AllowList', function (sid64) if not allowed[sid64] then return false, 'You are not allowed on this server!' end end) 5. Replace the sample values ( ) in the file with the SteamID64s of you and anybody else that you wish to allow on your server. Each entry except for the last must end with a comma (,). You can use a site like steamid.io to find your SteamID64. You should end up with something that looks like this: 6. Save and exit the file. Restart your server to ensure the new changes apply. --- If you require any further assistance, please contact our support at: https://shockbyte.com/billing/submitticket.php
How to Install Any Gamemode on your Garry's Mod Server
One of Garry's Mod main selling points is the vast variety of gamemodes that have been built upon it. This article will cover how to install any gamemode on your GMOD Server. ::ProseNote{title="Note" description="If you're looking to install or gamemode, you can skip the Changing your Server's Default Gamemode section of this article as both of these gamemodes are already included with Garry's Mod by default." appearance="default"} :: --- Installing Game Modes from the Workshop Many gamemode authors publish their gamemodes directly to the Steam Workshop. For example, the popular Murder gamemode is available on the workshop. To install a workshop gamemode on your Garry's Mod server, simply add it to your server’s workshop collection. If you do not already have a collection, you can create one by following our How to Add a Steam Workshop Collection to Your Garry's Mod Server guide. You should also force clients to download the workshop content to prevent missing assets, as explained in our How to Automatically Have Players Download Workshop Addons tutorial. Once the gamemode has been added to your workshop collection and file, you can proceed to the Changing Your Server’s Default Gamemode section of this article. --- Manually Installing Game Modes ::ProseNote{title="Important" description="On the internet, anybody may create and distribute a Garry's Mod gamemode. It is possible to introduce backdoors and other dangerous code into GMOD gamemodes, therefore only install gamemodes from authors you trust. GmodStore and the Steam Workshop, for example, are typically safer." appearance="default"} :: 1. Download the gamemode you wish to install onto your computer. 2. Extract the gamemode by right-clicking the ZIP and selecting "Extract All" from the menu that appears. 3. Determine if the gamemode should be installed into the gamemodes folder or the addons folder. - If the gamemode should be installed into , the folder you extracted will contain a folder named . - If the gamemode should be installed into gamemodes, the folder you extracted will contain a text file with the name of the gamemode. ::ProseNote{title="Important" description="If the folder and the text file do not have the same name, rename the folder so that it has the same name as the text file." appearance="default"} :: 4. Connect to the server's FTP. We recommend using FileZilla. Locate the server's and folders by double-clicking the directory within the remote site section (right side by default) of FileZilla. 5. If the gamemode is to be installed into the directory, drag the folder from your file manager and drop it into your server's folder. If the gamemode is to be installed into your server's folder, drag the folder from your file manager and drop it into your server's folder. 6. Follow the steps in the next section. --- Changing your Server's Default Game Mode 1. Access your Control Panel and Stop your server. 2. Navigate to the Config tab and select the Garry's Mod Server Settings file. 3. Locate the setting and set your desired Game Mode. - If you uploaded the gamemode into , then this is the name of the folder you uploaded. - If you uploaded the gamemode into , this is the name of the folder inside the gamemodes folder within the folder you uploaded (). - If you used the workshop collection method to install the gamemode, check the workshop item's description or installation instructions. - If you would like to load Sandbox or Trouble in Terrorist Town, use and respectively. 4. Save and restart your server to ensure the new changes apply. --- If you require any further assistance, please contact our support at: https://shockbyte.com/billing/submitticket.php
How to Install Custom Addons on your Garry's Mod server
Sometimes, you may encounter add-ons that are not published on the Steam Workshop, which means they cannot be installed through a server collection. These add-ons are often distributed as files through platforms such as GitHub or GmodStore and must be installed manually on your server. --- Installing Zipped Addons ::ProseNote{title="Important" description="Anyone can write and publish a Garry's Mod add-on on the internet. Be careful to only install add-ons from trusted authors because it is easy to program a backdoor and insert other malicious code into GMOD add-ons. Curated sites like GmodStore and the Steam Workshop are usually the safest place to download add-ons." appearance="default"} :: 1. Download the add-on you wish to install to your computer. 2. Extract the add-on by right-clicking the ZIP file and select Extract All from the menu that appears. 3. Identify that add-on folder. This is the folder that you will want to upload to your server. It can be identified by the presence of folders like , , , , , and . 4. Connect to your server's FTP (We recommend FileZilla) and navigate to . 5. Drag the addon folder from your local computer and drop it into the folder on your server. 6. Restart your server to load newly installed add-ons. --- If you require any further assistance, please contact our support at: https://shockbyte.com/billing/submitticket.php