General > Developers Corner

Learning Lua

<< < (3/3)

MrPresident:

--- Quote from: Janjakob2000 on July 29, 2015, 05:30:39 AM ---Well for now I don't really have any interests for anything else, unless my friends bug me about it on steam, but I tryed this out, restarted my gmod, and it won't work, I have no errors at all, why does it not work then?

--- End quote ---

That code will work. Where did you put it?

This would need to be in a serverside autorun location.

garrysmod/lua/autorun/server

If any of those folders don't exist, create them.

If you're doing it inside an addon, similar path.

garrysmod/addons/{youraddon}/lua/autorun/server

Gamemodes are a bit different. If you're doing a gamemode, you'd want to put this code INSIDE of the init.lua file for your gamemode.

Janjakob2000:
Thanks MrPresident, you're really helpful, I really appreciate it, I hope someday I can do the same. :D

Navigation

[0] Message Index

[*] Previous page

Go to full version