Server, client, and UI contexts
VIMP separates authority, GTA integration, and presentation.
| Context | Use it for | Do not trust it with |
|---|---|---|
| Server | Rules, persistence, entity creation, validation | Rendering or GTA handles |
| Client | GTA natives, input, cameras, streamed wrappers | Authoritative economy or permissions |
| CEF UI | HTML/CSS interfaces and local presentation state | Direct world mutation |
Server
The server owns network entity state and receives every client request together with the sending Player. Validate identity, permissions, distance, ownership, and payload shape here.
Client
The client observes streamed entities and controls local presentation. A wrapper's id can be client-local; use remoteId when an API explicitly asks for the server/network identifier.
CEF UI
A CEF page receives the small UI bridge as window.vimp and globalThis.vimp. It can emit named messages to the client or server but does not expose players, entities, or natives.
text
CEF --emitClient--> client script --emitServer--> server script
CEF -------------------emitServer---------------> server script
server --player.emit / emitAllClients-----------> client scriptTreat every event crossing from client or CEF to server as untrusted input.