Setting default gamemode

From GMod Wiki

Jump to: navigation, search
Entity1.PNG Go to:
Mapping Entities
Mapping: Gamemode by default
Page white text.png Description:How to set default gamemode in your map.
link=User:Cuel Original Author:Cuel
Calendar.png Created:23rd April 2007


This tutorial will show you how to automatically start Garry's Mod Deathmatch gamemode when a map loads in GMod. First, you will need a working map.

Setting gamemode without garrysmod.fgd

If the garrysmod.fgd is not loaded into hammer, you will not find the entity needed to set gamemode. However, it can be done without the .fgd.

  1. Place any entity in hammer (Not brushed-based ones)
  2. Bring up properties by selecting the entity and pressing Alt + Enter, or click Edit -> Properties
  3. Type info_gamemode into Class (name of the entity) and press apply. (Image 1)
  4. SmartEdit must turned off
  5. Click "Add" and add these settings:
    KeyValue
    GamemodeNamegmdm
  6. Click Apply. GMod will now load Garry's Mod Deathmatch gamemode when the map loads
Image 1; Properties
Final result



Setting gamemode with the garrysmod.fgd

Quite easier.

  1. Select the Entity Tool (shift+e) and select info_gamemode in the Entity list and place the entity in the map.
  2. Select the entity and bring up properties. (Alt + Enter)
  3. In the "GameMode Name" box, type "gmdm" without the quotes.


Other Notes

"gmdm" can be replaced by other gamemodes. For example; "LightRP", "sandbox" and so on.

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox