How to learn GLua in an efficient way?

I’m not going to lie, I’m a pretty lazy person and I tend to be able to do things if I put my mind to it. However, it is the sheer fact that I never have any motivation to do anything that I’m never able to stay at something.

Does anyone know some good resources to learn Lua? Someone recommended to me to learn how to make DarkRP huds and just keep making them but everytime try and make them slightly more advanced. However, this is the thing that throws me off and it then starts to get boring.

The basic resources I know about are;

In GLua, I do have an ultimate goal to make a gamemode of some kind or maybe make my own weapon pack. I’m not really sure as I pretty much just want to do this as a hobby for enjoyment. That’s why I don’t do the DarkRP Hud’s anymore as they got pretty boring and I started to not get enjoyment from it.

So I’m pretty much stuck with certain knowledge and I only know very basic GLua like Derma Creation and things like that.

Any help someone could provide would be greatly appreciated! :slight_smile:

Start out with looking at entity/swep and modify small things example color, sound it play etc. As stuff like that gives almost instant result ans you’ll feel good about yourself.

You should watch these videos done by MrCosmicSeagull, which cover many useful things.


Yeah I’ve been doing that recently. It’s pretty fun changing weapons to debug white. :stuck_out_tongue:

[editline]7th October 2014[/editline]

Forgot to mention I’ve seen those ahahah. Thanks for the suggestion though. :slight_smile:

Learn normal lua (there’s tons of resources for that) to some extend, you don’t need to be a pro at it though.
Then just look at scripts and google the parts you dont understand

learning and doing lua stuff with a friend has been helping me a lot, plus the wikis and tutorials, there’s also nothing wrong in going to github and looking at how other people do stuff (the search function works great there) but obviously copy pasting everything from there won’t help, it’s best to see how people do it and think if there’s another way you could do it that might be better or something, but either way it’s useful seeing other people’s code

Yeah, I once tried doing normal lua, didn’t really understand it ahaha. Like, in GLua, you do something and then it will change in game (depending on what it is). With normal Lua, in my opinion it’s UI was more like Python where it had it’s own program etc… and that just confused me.

Yeah, me and a friend did do lua a while back, we were trying to code our own gamemode, but he gave up so then I gave up and I want to try and get average/above average at lua so I can encourage him to do it again. :3

What the hell are you talking about? Lua is a language, there is no ui to it, only syntax and that’s pretty much exactly the same as in gmod, just that gmod adds some things to the language itself you may or may not like (i.e. ! as not or != as ~=, // comments, continue keyword in loops, etc)

I mean, I prefer Garry’s Mod and how it visually shows you what you have changed. Say you are editing an IronSight or something. It visually shows you what you have changed. When I used just lua, it didn’t feel the same and I felt pretty uncomfortable with it. I don’t really know aha, I’m pretty tired lol.

Eat. Sleep. Code. Repeat.

Eat. Sleep. *Learn Code. Repeat. :wink:

You learn code by coding so it’s still the same.

have a goal and create it. that’s the best way just think of anything at all no matter how small and then just make it. (first learn basics) then once u start just google errors and ask for help when u get stuck. just remember to start don’t just sit and dream about what you could make. just make it. i started with just simple chat commands then welcome message now i’m making NPC and much more.

[editline]7th October 2014[/editline]

i found the lua tuts very anoying because they were making things i did not really care about, so i just started only watching the parts i needed to make what ever i was making.

I help out users where I can. Feel free to add me on Steam if you like.

Hey, welcome to FacePunch.
I have written over 400 tutorials and completed “systems” in Lua for Garry’s Mod. I tutor and answer questions for free; feel free to add me on Steam if you need some guidance. This forum is for devs that need help working on things. Here are some resources to help you get started:

Generalized Lua Help ( Links to Wikis, Answers the question of “Where do I post a simple question or DarkRP Specific question”, links to other resources compiled by forum members )
https://dl.dropboxusercontent.com/u/26074909/tutoring/___welcome_docs/_welcome_general_lua_learning.lua.html

Useful Programs ( SteamCMD, Autosizer, Desktops, Process Explorer ) and Notepad++ Upgrades
https://dl.dropboxusercontent.com/u/26074909/tutoring/___welcome_docs/_welcome_useful_programs_and_notepadpp_upgrades.lua.html

AcecoolDev_Base Skeletonized Dev Base Game-Mode ( Never worry about Include or AddCSLuaFile ever again; comes with New Hooks, Console Commands, Meta-Table Objects, Helper Functions, Extended Functionality, and more! )
https://dl.dropboxusercontent.com/u/26074909/tutoring/___welcome_docs/_welcome_acecooldev_base_gamemode_info.lua.html

EDIT: oh yeah and ask Acecool when u need help… he always has a nice little link for you.

Dat auto merge

Thanks Acecool, I definitely found this useful and have added you on Steam. :slight_smile: