Architecture
Architecture Overview
How mp.* is built and routed across server, client, and CEF contexts.
High-Level Flow
- Bridge initializes
globalThis.mp. - Your gamemode code attaches handlers and uses pools/entities.
- Bridge translates actions into FiveM primitives (
emitNet, natives, NUI callbacks). - Built-in plugins extend behavior (
spawnmanager,vehicle-sync, and more).
Runtime Contexts
- Server runtime: entities, pools, world state, command parsing, plugin loading.
- Client runtime: local player state tracking, input/key handling, browser pool, game native wrappers.
- CEF runtime:
mp.eventsandmp.triggerfor browser pages.
Why This Matters
When debugging, always identify context first.
A method existing in server types does not mean it exists in CEF types.