Hello, I am new to FiveM and I’d like to start my own server with my own script(s) but I’m having some trouble understanding how all of this works, especially with the documentation being incomplete. Feel free to get technical with explanations, as I am not new to programming.
From what I understand there are scripts that run on the client and scripts that run on the server and almost everything I’ve read suggests that most scripts are written as client scripts. Really what I’d like to know is what can server scripts do and why do I see so many posts asking about making client scripts “server side” if they have no access to the native functions?
People usually reference client and server scripts as both being on the hosted server. It’s rare people say client in a way of stuff that goes into the plugins folder or in the users game - or at least for me.
Server is pretty much things that are synced server side whereas client is usually synced client side. There are many uses for both and it’s a tad hard to explain but I’ll link some useful docs for you. A good place I’d say to start is Lua but you can do whatever floats your boat, available languages being (Lua, JS, C#).
Native Reference, This is used to view natives and their params
I appreciate the response, however I have already looked through basically all of available documentation and the first script guide ends without discussing server scripts.
I guess maybe to clarify my question I should ask whether or not I can use a server script to trigger things in a client script, and if not, what would I actually use a server script for?