Learn Lua and practice it.

Hello, I’ve been trying to get SRCDS working so I could learn/master Lua by doing projects.

I’m here to ask what is the best way to practice Lua?

Sorry, I wasn’t clear with that.

I’m pretty confused how everything works in gmod. Since there is a single player, will it work the same as multiplayer? Such as dark RP, bhop, or PERP?

Yes, you can load and play gamemodes the same way in single player. However, there can be errors that can happen in multiplayer instances and not single players. Best thing to do is start a lan game with your gamemode/addon. This way you can add bots to simulate players.

How would I incorporate a database into a lan game?

You would need to run a mysql server on your local machine or make your gamemode connect to a remote one.

First of all, read this: http://www.lua.org/pil/contents.html
Then this: http://wiki.garrysmod.com/page/Beginner_Tutorial_Intro
Then ask someone to tell you the difference between clientside and serverside functions and basic networking via net library (preferably)

Do your developing in a listen server. Otherwise you’ll be lost when it comes to how prediction and networking happens in a proper multiplayer environment.

You don’t need mysql as someone suggested above. You can use your own system (which I strongly recommend doing so you can learn) or you can use the built-in sqlite library.

Strongly agree. You can also use text files and I believe you should start with that.

Ah okay thanks I understand now. :smile: