Client exports#
| Signature | Source and return behavior |
|---|---|
useGizmo(entity) |
Implementation |
getClosestObject(coords, maxDistance) |
Implementation |
Server exports#
| Signature | Source and return behavior |
|---|---|
createObject(src, model, data, sceneType, duration) |
Implementation |
updateObject(src, model, data, objectID) |
Implementation |
deleteObject(src, id) |
Implementation |
Commands#
/spawnobject opens placement and /syncedobjects opens management by default; rename them through Config.commands. Both require the configured permissions.
Object data and lifetime#
createObject(src, model, data, sceneType, duration) receives a player source, model name, a data table with position and rotation vectors/tables, an optional scene type, and optional duration in minutes. Omit duration or use 0 for persistence. updateObject takes the existing object ID as its final argument; deleteObject takes the player source and ID. Database operations are asynchronous: do not assume creation returns the inserted ID.
getClosestObject(coords, maxDistance) returns the synced object record and distance, or no object. useGizmo(entity) is a client placement helper. See Examples for integration code.