Garry's Mod Wiki

Revision Difference

Mounting_Content_on_a_Dedicated_Server#561688

<cat>Play.Hosting</cat> <title>Mounting Content</title> # Mounting Content ⤶ You might want to include maps from Counter-Strike or Team Fortress on your server. Updating and copying the maps over can be a pain. ⤶ How to include maps from **Counter-Strike**, **Team Fortress**, .. on your server. <br/> ## Mount Config ⤶ With `mount.cfg` you can specify folders to add to the filesystem. Garry's Mod will scan the folder, mount any sub-folders and vpk files inside the given folder. ⤶ `mount.cfg` is located in `garrysmod/cfg/` and can be opened by any plain text editor - and should look something like this:⤶ ⤶ ⤶ ```⤶ ⤶ Instructs Garry's Mod to scan the specified folders, mount any sub-folders & VPK files.⤶ ⤶ <br/>⤶ ⤶ ### Example⤶ ⤶ This config is located at `/garrysmod/cfg/mount.cfg`⤶ ⤶ ```⤶ "mountcfg" { "cstrike" "C:\steamcmd\steamapps\common\Counter-Strike Source Dedicated Server\cstrike" "tf" "C:/mytf2server/tf" } ``` <note>Linux paths are case-sensitive</note>⤶ ⤶ The key names ( `tf`, `cstrike` and `episodic` in this example) in the file tell Garry's Mod which game this path is for, i.e. which game should be marked as mounted for you. This affects <page>Global.IsMounted</page> and subsequently tells addons which games are mounted and which aren't. ⤶ This method will also allow you to mount games (or folder addons) into **Hammer Editor**.⤶ <note>⤶ ⤶ Note that Linux file paths are case-sensitive. ⤶ </note>⤶ ⤶ <br/>⤶ ⤶ ### Key Names⤶ ⤶ GMod will mark any games you specified as mounted.⤶ ⤶ **Example :** `tf` , `cstrike` , `episodic`⤶ ⤶ This affects the <page>Global.IsMounted</page> global and subsequently ⤶ tells addons which games are / aren't mounted.⤶ ⤶ This method will also allow you to mount games ⤶ and folder addons into the **Hammer Editor**.⤶ <br/> ## Depots Config Instructs Garry's Mod which installed games it should attempt to mount. *It doesn't actually matter if the games are present or not.* <br/> ### Missing or Corrupt If you are experiencing one of the following cases, you should compare your config to the defaults shown in the next section. - Connected clients are unable to spawn Hunters / NPCs from HL:S - Addons complain about missing game content that is installed - Spawning the Jalopy doesn't do anything <br/> ### Default You may need to create this file yourself at `/garrysmod/cfg/mountdepots.txt` ``` "gamedepotsystem" { "cstrike" "1" "hl1" "1" "hl1_hd" "1" "hl2" "1" "hl2mp" "1" "episodic" "1" "ep2" "1" "lostcoast" "1" } ```