Skip to content

Ownership and simulation

A network owner is the player whose client simulates a networked vehicle, NPC ped or object. That client sends state updates to the server, which validates them and forwards the accepted state to other clients. Each player simulates their own ped.

The server chooses owners automatically from eligible clients that have the entity ready in a visible dimension. It generally keeps an eligible owner. Leaving streaming range, changing dimension, disconnecting or stopping simulation reports can trigger reassignment.

Vehicle drivers take priority. A truck and its attached trailer share an owner, and NPC occupants prefer their vehicle’s owner when that client can simulate them. Movable objects can transfer to a closer player before contact.

Handoffs retain the synchronized state. Late simulation updates from the previous owner are rejected. Arbitrary GTA tasks started through natives are not guaranteed to survive a handoff.

API Meaning
Server ped.netOwner, vehicle.netOwner, object.netOwner The assigned Player, or null when there is no owner.
Client entity.netOwner The owner as a client Player object. Returns null if there is no owner, its player object is unavailable, or the entity is client-only.
Client entity.isLocallySimulated Whether this client is responsible for simulation. Also true for client-only entities.

Both the server and client expose netOwnerChanged(entity, oldOwner, newOwner). The client event runs after the handoff is applied and the GTA instance is ready. It includes the initial owner assignment. Changes before delivery are combined, so newOwner matches the current entity.netOwner. An unavailable player is passed as null.

Ownership properties are read-only, and scripts cannot manually assign an owner through the current API.

isLocallySimulated does not indicate that the GTA instance is loaded. Use ready when accessing it.

An NPC becoming locally simulated has its GTA tasks reset during the handoff. Keep its intended behavior, such as a destination or follow target, in server state or synchronized metadata.

In the client netOwnerChanged handler, check entity.isLocallySimulated and restore the instruction through natives. The handoff setup has finished by this point. Use entityStreamIn for an already-owned ped returning to streaming range or receiving a replacement model. Make this initialization safe to repeat because initial assignment can produce both events.

Clear completed or cancelled instructions so they are not restarted later. Reissuing a task starts it from the current state. It does not preserve the exact progress of an arbitrary GTA task or animation.

Ordinary assignments have these per-client limits, with a combined limit of 128 vehicles, NPC peds and objects:

Entity type Ordinary assignments per client
Vehicles 64
NPC peds 32
Objects 64

Every assigned entity counts, including stationary entities. Required driver, trailer and NPC occupant relationships can exceed these limits. Those assignments still count toward capacity and prevent further ordinary assignments.

An entity can remain without an owner when no eligible client has capacity. It continues to exist on the server, and server scripts can still change it. GTA physics and NPC simulation require a client and do not continue on the server.

Stationary entities can send state less frequently while their owners continue sending heartbeats. A parked vehicle can therefore keep its owner without constant movement updates.

Simulation ownership does not grant additional client API write permissions. Client entity setters remain restricted to the resource’s local entities, with the documented exceptions for the local player. Use server APIs to change server-created entities. Network updates can overwrite direct native changes.

Collisions involving entities with different owners can show corrections as authoritative updates arrive from the other client.

A complete destination example is available in NPCs and scripted behavior.