Lua Modules Loading HELP!!!!

Hello. I have created a lua module by following the tutorials on the wiki. I want to make something more advance but I need you to answer the following question.

Is there a way to load your module without the use of the console, or any way to load it on game start up?

Thanks in advance, I have been struggling trying to do this.

You need to rummage through your installation in lua/includes and look for an unit file or something like it then write this at the end of the code :

require("<module name>")

The only other file I have in my includes is gm_sqlite.dll

Well I am on my iPod so I can’t help further. Just look arround alot for a file with loads of require thingys in it

Ok thanks for the help, I will look. If anyone knows of this file can you please inform me.


I do not have this file. My garrysmod folder is weird it doesnt have many files, perhaps they are all hidden or something.

Nope, checked. They went in the update. Sorry

I answered in another thread already, but anyways:
Put the require(“module name”) in lua/includes/menu.lua

Ahem. If you had read the thread you would 1 know your ninja’d and 2 you fail cause it doesn’t eciste since the update


Existe* and by that I mean the file

It doesn’t exist. So I should create the file?

It’s probably still in the GCF. Extract it using GCFScape

If you had not been retarded you would have:

  1. Seen that nobody ninja’d me, lua/menu was given, I gave another file I thought would work.
  2. I am not on my main pc and do not have Garry’s Mod installed here, I figured that I could use to help this person.

Flame much?

Useless post much? Using your awesome social skills, you could’ve figured that when you tell someone he fails he might react in the way I did.

So this will not work?

Damn guys I thought this was as easy question and I was just being noobish.

Make a lua file, place it in autorun and insert the piece of code I provided. Fixed. Next question?


Thejoker: that post was useless so stop flaming and gtfo facepunch if ur gonna act like that. Good day to you all.

Modules go in lua/includes/modules

Call require passing the filename of the module (without .dll or gmcl / gmsv / gm)

This does not load the module before the game has started ie the main menu.
I want the code to of already be run before I join a server or create one.

Sorry for being bad, I am still learning and I appreciate your help guys.

Ok, well sorry for not solving your problem but this is the end of my knowledge.


Why does it need to be loaded at the same time as the menu?

I see some people with the facepunch logo on their main menu, so I want to draw to the screen at the main menu. I figured I would be able to do it using modules, and even if you can’t It would still be handy to know if it is possible.

Well, no, just edit the files in lua/menu to add stuff.