SetEntityController
Hands the simulation of an entity to a player, or to nobody.
The way a horse changes hands: the new controller’s client spawns and drives the real thing, the others see a puppet.
nil gives it to nobody - it stands still until the minder hands it to the nearest player. Refused while someone else
rides it.
Syntax
Section titled “Syntax”SetEntityController(id, pid)| Parameter | Type | |
|---|---|---|
id |
number | the entity |
pid |
number | nil | the new controller; nil = nobody |
Returns
Section titled “Returns”boolean - false when refused
Example
Section titled “Example”SetEntityController(horse, pid)See also
Section titled “See also”GetEntityController · MountPlayer · the World entities group of the index
