[Help] Client vs server files

I sort of explained this to a similar question a while ago:

You would need to use both. As I said in the other post, the server has no idea about the game or the player. The server simply relays traffic between the players.

This is incorrect (sort of). The server can trigger a client event (on all clients), which will run some code.

This is correct. Clients can also trigger to run an event on the server.

All of the natives are client-side only (because they are native to the game). You can see everything here Native Reference - Cfx.re Docs Plus, you can also see a CFX section. Those are not natives exactly. They are added by FiveM and have a description saying whether they are client, server, or shared. Otherwise, everything else on there is client.

3 Likes