|
1 | 1 | # Garrys Mod |
2 | 2 |
|
3 | | -Autorefresh can lag the server when certain Lua files are edited. This happens when the refreshing cascades. This can be unwanted behaviour when editing the scripts of a large project on a live server. |
| 3 | +## Game Resources |
| 4 | + |
| 5 | +[Garry's Mod Wiki](https://wiki.facepunch.com/gmod/) |
| 6 | + |
| 7 | +## Server Tips |
| 8 | + |
| 9 | +Autorefresh can lag the server when certain Lua files are edited. This happens when the refreshing cascades. This can be unwanted behavior when editing the scripts of a large project on a live server. |
4 | 10 |
|
5 | 11 | To disable autorefresh, add `-disableluarefresh` to parms. |
6 | 12 |
|
7 | | -```text |
| 13 | +``` |
8 | 14 | -disableluarefresh |
9 | 15 | ``` |
10 | 16 |
|
11 | | -When adding a loading screen with `sv_loadingurl`, most guides will tell you to add it in command line, server.cfg, or autoexec.cfg. Check gmodserver.cfg first, it is defined in this file by default as `sv_loadingurl ""`and this file will override everything else. |
| 17 | +Loading screens are added by defining a website with `sv_loadingurl`, which is in gmodserver.cfg by default. This file overrides other files.  |
| 18 | + |
| 19 | +Links should not have `http://` or an ending`/` .  |
| 20 | + |
| 21 | +Example: |
| 22 | + |
| 23 | +``` |
| 24 | +sv_loadingurl "www.website.com/loading/screen" |
| 25 | +``` |
| 26 | + |
| 27 | +Gamemode is changed by editing start parameters in the LinuxGSM config file. |
| 28 | + |
| 29 | +``` |
| 30 | +Default gamemodes: |
| 31 | +
|
| 32 | +TTT gamemode="terrortown" |
| 33 | +Sandbox gamemode="sandbox" |
| 34 | +``` |
| 35 | + |
| 36 | +Other game modes like Zombie Survival can be found on the [steam workshop](../steamcmd/workshop.md). |
| 37 | + |
| 38 | +### Workshop |
| 39 | + |
| 40 | +{% content-ref url="../steamcmd/workshop.md" %} |
| 41 | +[workshop.md](../steamcmd/workshop.md) |
| 42 | +{% endcontent-ref %} |
| 43 | + |
| 44 | +{% hint style="warning" %} |
| 45 | +Garry's Mod does not require an API/Auth Key anymore. |
| 46 | +{% endhint %} |
| 47 | + |
| 48 | +For Garry's Mod, add the collection ID in [LinuxGSM config](../configuration/linuxgsm-config.md) using `wscollectionid` setting. This will download the collection when the server starts. |
| 49 | + |
| 50 | +``` |
| 51 | +wscollectionid="157384458" |
| 52 | +``` |
| 53 | + |
| 54 | +## Mounting Game Content |
| 55 | + |
| 56 | +Some Garry's Mod addons like TTT use content from other games. To do this the content will need to be "mounted". |
| 57 | + |
| 58 | +{% hint style="success" %} |
| 59 | +All source engine games should be mountable. |
| 60 | +{% endhint %} |
| 61 | + |
| 62 | +##  Basic Guide |
| 63 | + |
| 64 | +This guide is for installing another game server with LinuxGSM and using that content, copying that game's files, and mounting the game to Garry's Mod. This guide is for CS:S but should work for any other game. |
| 65 | + |
| 66 | +{% hint style="info" %} |
| 67 | +There are multiple ways to potentially mount content. The below example is just one example |
| 68 | +{% endhint %} |
| 69 | + |
| 70 | +First install a Counter-Strike: Source server, if you already have a server installed this step can be skipped. If the server will be deleted after copying files. |
| 71 | + |
| 72 | +[Install CS:S Server with LinuxGSM](https://linuxgsm.com/servers/cssserver/) |
| 73 | + |
| 74 | +Copy the `cstrike` the directory from the Counter-Strike: Source to the Gmod folder. |
| 75 | + |
| 76 | +``` |
| 77 | +cp -R /home/cssserver/serverfiles/cstrike /home/gmodserver/serverfiles/cstrike |
| 78 | +``` |
| 79 | + |
| 80 | +Ensure that the copied files are owned by the `gmodserver` user. |
| 81 | + |
| 82 | +``` |
| 83 | +chown -R gmodserver /home/gmodserver |
| 84 | +``` |
| 85 | + |
| 86 | +Open mount.cfg file. |
| 87 | + |
| 88 | +``` |
| 89 | +nano /home/gmodserver/serverfiles/garrysmod/cfg/mount.cfg |
| 90 | +``` |
| 91 | + |
| 92 | +Add game to mount.cfg |
| 93 | + |
| 94 | +``` |
| 95 | +"mountcfg" |
| 96 | +{ |
| 97 | + "cstrike" "/home/gmoduser/serverfiles/cstrike" |
| 98 | +} |
| 99 | +``` |
| 100 | + |
| 101 | +Restart the server. Check if the mount was successful by changing the level to a mounted map with console or rcon. |
| 102 | + |
| 103 | +``` |
| 104 | +changelevel cs_italy |
| 105 | +``` |
| 106 | + |
| 107 | +## Guides |
12 | 108 |
|
| 109 | +[Install Sourcemod on Gmod Server](../guides/sourcemod-csgo-server.md) |
0 commit comments