From Garry's Mod
Jump to: navigation, search



In order to maintain consistency on the wiki, we require you to follow next rules:

  • All function/content links must use templates:
    • For class methods:
    • For library functions:
      • Code: {{LibraryFunction|ents|Create}}
      • Preview: ents.Create

    • For global functions:
      • Code: {{GlobalFunction|AddCSLuaFile}}
      • Preview: AddCSLuaFile

    • For hooks:
    • For enumerations:
    • For structures:
    • For types, classes and panels:
    • For libraries:
    • For shaders:

Lua Code

  • In descriptions or in articles wrap your Lua code in <pre></pre> tags manually. This is done automatically for function examples.
local function Test()
	print( "Kittens" )
  • Inline code <pre class="inline">code</pre>

CallThisFunction( "With these arguments" )

  • No syntax highlighting <code>text</code>

No "annoying" syntax highlighting

Page Content

  • It's Lua, not LUA, LUa, lua or LuA.
  • It's SENT, not SEnt.
  • It's SWEP, not SWep.
  • It's TOOL, not STOOL.

  • If you don't know how to name an argument or describe it, don't put UNKNOWN or anything like that, just leave it blank.
  • Put proper descriptions for arguments and return values, not just their names with one word.
  • Argument names must start with a lower case letter.
    • Position is bad, pos is good.
  • Do not put type indentifier as first letter.
    • iNum is bad, num is good.


  • Try to make the examples be ready for use by other people, they shouldn't produce errors if people copy it into a Lua file or use lua_run.
    • For gamemode hook examples, use the hook library instead of GM:HookName.
  • Examples must not rely on addons being installed
  • If output of an example is not available, don't put N/A, just leave the field empty.
  • Use Fixed Width checkbox in example output instead of adding manual new line formatting when needed.
  • Try to match coding style of your examples with coding style of other examples on other pages.
    • Do not put any semicolons.
    • Keep underscores to minimum.
    • Use Entity( 1 ) for player.
    • Use Vector( 0, 0, 0 ) and Angle( 0, 0, 0 ) for arguments, not just something like vPos.
    • Use Player1 in place of a player's nickname in example output. Additional players can be Player2, Player3, and so on.
    • Use STEAM_0:1:12345678 in place of player's SteamID in example output.
    • Avoid useless globals.
    • Use --, not //.
    • Try to space out function arguments to make the code more readable, put a space after each coma, bracket like so:
function ENT:Think()
	self:MyFunction( "test argument", 1, false )


Tutorials submitted to the wiki should be short and sweet where possible.
They should focus only on the subject they're covering - and not try to cover too much.


Tutorials should not contain slashes in their names. They should be titled as the subject they're covering, with appropriate capitals and spaces.

Try to give your page a name starting with the letter that a user might be searching for. For example, if your page is about developing for the Kinect - call it "Kinect Development" - not "Developing For Kinect". This way when the page is in an alphabetical list it's listed under K and not D.


You can see a list of categories here. You should add your page to all appropriate categories by ticking the category boxes on the edit page.

All tutorials should be at least in the Modding Tutorials category.

Special Pages

Page Creation Templates

To edit a page using a template - please click on the "edit with form" link on the top left.

Useful Pages

Ways to contribute


  • Special:Upload - Allows the uploading and embedding of images into pages.

Formatting Guide

As a rule of thumb, all Notes and Warnings should be on the bottom of page descriptions.
Definitions like Stub, Deprecated, Internal and NextUpdate should be on top.


  • Code: {{Note|This is a note.}}
  • Preview:

This is a note.

  • Code: {{Warning|This is a warning.}}
  • Preview:

This is a warning.

This feature is deprecated.
You should avoid using it as it may be removed in a future version.

Feature removal notes.

This is an internal function or feature.
This means you will be able to use it, but you really shouldn't.

Alternative method.

This article is a stub.
Please help the Garry's Mod wiki by adding to it.

This function or feature is only available in the Sandbox gamemode and its derivatives.

  • Code: {{Validate|Validation notes.}}
  • Category: Category:Pages To Validate. You can hide a Validate tag from the category by adding "Category=No" to the tag arguments. Ex. {{Validate|Category=No|Validation notes.}}
  • Preview:
Validation required.
This page contains possibly incorrect or incomplete information. Further testing is required.

Validation notes.

  • Code: {{NextUpdate}}

Specifying an argument will replace the default text, like so:

{{NextUpdate|Next update notes.}}

  • Category: Category:Next_Update_Changes. You can hide a NextUpdate tag from the category by adding "Category=No" to the tag arguments.
  • Preview:
Next Update Change

This feature is only available in the next update.

Next Update Change

Next update notes.

  • Code: {{Bug|Bug notes.}}

You can also specify a specific issue number from various Garry's Mod repos.

{{Bug|Issue=1|Bug notes.}}

{{Bug|Request=1|Bug notes.}}

{{Bug|Pull=1|Bug notes.}}

  • Category: Category:Bugs. You can hide a Bug tag from the category by adding "Category=No" to the tag arguments.
  • Preview:

Bug notes.


Bug notes.

Issue Tracker: #1


Bug notes.

Request Tracker: #1


Bug notes.

Pull Request: #1

Personal tools