#Client, Shared and Server

1 messages · Page 1 of 1 (latest)

keen arrow
#

I'm struggling to understand the infrastructure as to how fivem overall and the qbcore works. I noticed it's split into three sections but I have no clue as to how this interacts, where to process stuff, what the pros and cons are or anything like that. Could someone provide an example of how this would work in a resource?

For example, I'm trying to create my own simple bank system. Very simple just with a money value. How would each section play into it?

fast bronze
#

client - Runs on each player's game
Think: "What does THIS player see/do?"

server - Runs on the server machine
Think: "What needs to be secure and shared between all players?"

shared - Runs on BOTH client AND server
Think: "What do both sides need to know?"

keen arrow
#

So

Client - UI displaying bank money

Server - Processing player transaction from client

Shared - Nothing?

fast bronze
#

Entirely depends on your specific needs for the resource, but yes, at its most basic that seems like you've got it.