Basic newbie questions

Hello, FiveM Community!

Today I’ve got some questions for you, I’m new to this and still trying to understand couple things before getting started.

To start with, can somebody explain to me (with examples if possible) how the functions AddEventHandler,TriggerClientEvent,RegisterNetEvent,RegisterServerEvent work? How is this whole thing working, how and when do you need to use them, how the client and the server are communicating to each other etc?

Secondly, how do we use player variables and global server variables? For example if i want to load player data from mysql for a specific player how do i store this data in the vars.

Again, examples would be very appreciated.

Thanks!

I am not expert by any means but just test around download people script from the #development Releases and just see how it is all put together. You need to have a plan, don’t just set out to “learn Lua” think of a script you could benefit from and try make it. In the FiveM discord you can always go to the #scripting and ask - but make sure you try first. If you have any more questions just pm me :slight_smile: