From Garry's Mod
Revision as of 00:15, 28 July 2018 by NeatNit (Talk | contribs)
Jump to: navigation, search



In order to maintain consitency 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:
  • 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 output of an example is not available, don't put N/A, just leave the field empty.
  • If you don't know an argument name or description, don't put UNKNOWN, 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 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.
    • Avoid useless globals.
    • Use --, not //.
    • Try to make the example be ready for use by other people, so that they can throw it into their Lua file or use lua_run and it works.
    • Try to space out function arguments, put a space after each coma, bracket like so:
function ENT:Think()
	self:MyFunction( "test argument", 1, false )

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.

Lua Code

Wrap your Lua code in <pre></pre> tags.

local function Test()
	print( "Kittens" )


  • 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.

  • 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


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.

Personal tools