Understanding the FiveM scope concept with diagram

Hi,

I’m an experienced dev and I’m training a few new devs on FiveM.

I made a diagram for them to explain to complex concept of FiveM scopes (variable, functions, events, exports, blocs of code etc)

I was wondering if it is correct and pretty much self explanatory for a beginner.

I have voluntary named “superglobal” variable even if they actually don’t exist in LUA just to image the wide scope of a variable on the client or server side, since t’s not well documented and the name fits pretty good IMO.

(right click > open image in a new tab if it’s blurry)

Thanks in advance for feedback.

PS: I wanted to post it in the Cookbook section but I can create a new topic so here am I.

1 Like

I just noticed i’ve forgot convar, to split the client/server exports and manifest metadata.

Might add later.