I am currently making a server. I’ve been working on it for the past few months, and things are looking pretty good. I am giving a lot of effort and paying really close attention to detail so I believe that the server will be nicely put together. Of course that’s a little biased though, as it’s my own server.
However, the issue is, the vast majority of my server is just like any other server out there. There isn’t really much to give it a unique touch, aside from UI things.
I really want to learn how to code scripts so I can make custom things for the server. Anything from rather simple scripts like a menu to toggle vehicle extras, to more complicated things like robbery scripts or inventory scripts. Of course the more complicated things will be later down the line, but still, I eventually want to have the majority of my server be custom, and special.
I don’t really know where to start though. So for those of you who have went from no coding experience, to competent FiveM script developers could you point my in the right direction and maybe give some advice?
Where did you start learning? How did you start learning?
Could you point me towards tutorials, books, forums, etc. that helped you turn from no knowledge on the subject to being able to code fully functional scripts?
I personally recommend either watching a video like @CozyCloud advises, or test what happens when you do something and keep doing it until you get the result you want.
For me personally, I started by following tutorials, and one day it just clicked.
On top of what @CozyCloud said, start making your own scripts. The best way would be to try and recreate already existing scripts or servers.
When I first started coding in FiveM, I just recreated a SA:MP Stunt server. Basically: a teleport command, a gun command, a vehicle command and some mapping.
You have to get into the “coding mindset”. After that you’ll realise that most of it is if statements and for loops, combined with lots of natives
Just look at a bunch of examples of GitHub. Search the natives you want to learn about and filter by Lua language. There will be so many examples.
And you need to get a general programming understanding, so learn anything on some coding learning website like udemy if you don’t know what a variable is, what scope is, what a method is, what polymorphism is etc.
I second a udemy course. The lua mastery course is a great course on there that I took a few years ago even after I had forced myself to learn how to code in Lua via brute force learning of constant trial and error. Had I took the course before brute force learning for 2 years I would have saved a lot of time and headaches. And for like 11-12$ you can’t beat the price.