HyperGaming Network

Other Forums => Development => Old Forum Boards => Scrapyard => Coding => Topic started by: LinkinEleven on 14-11-2009

Title: Basic knowlage on making a gamemode.
Post by: LinkinEleven on 14-11-2009
If you don't already know lua, this tutorial isn't for you.

First download this.

http://www.garrysmod.org/downloads/?a=view&id=39584 (http://www.garrysmod.org/downloads/?a=view&id=39584)

There are three files in your gamemode folder, or should be.

One init.lua
Two cl_init.lua
Three Shared.lua

cl_init.lua is where your derma frames and other menus are going to go.
init.lua is where server side information will go such as player load outs, player spawn, commands ect.
shared.lua is where your main format for the gamemode should be, it should look like the following


GM.Name = ""
GM.Author = ""
GM.Email = ""
GM.Website        = ""


This is also where your team will be set up.

While setting up your gamemode you should normally be on this page for server side commands in lua

http://wiki.garrysmod.com/?title=Serverside_Lua#gamemode (http://wiki.garrysmod.com/?title=Serverside_Lua#gamemode)

and clientside

http://wiki.garrysmod.com/?title=Clientside_Lua#gamemode (http://wiki.garrysmod.com/?title=Clientside_Lua#gamemode)

There is no shared lua because shared isn't a big part of the lua library.

simple as that.