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.
[editline]07:28PM[/editline]
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
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
[editline]10:19PM[/editline]
Existe* and by that I mean the file
It doesn't exist. So I should create the file?
Flame much?
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?
[editline]10:58PM[/editline]
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.
[editline]11:01PM[/editline]
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.
I don't have these files. Forgive my noobness but where can I get them?
require("modulename")
in lua/vgui/
Do I create a lua file at this location?
I don't have these locations and files you guys are on about.
Yes. And create the folder if it does not exist, general rule. The people talking about lua/menu have never loaded anything in the menu environment.
Thankyou, you are a good guy to not get annoyed at my bad questions.
Sorry, you need to Log In to post a reply to this thread.