LocalObject
Hierarchy
- Object
- LocalObject
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Properties
publicalpha
Object transparency, values are between 0 and 255. (0 being fully transparent)
publicdimension
Object dimension.
publicreadonlydynamic
publicfrozen
publichasGravity
Whether the object is affected by gravity.
publicreadonlyid
publicreadonlyisCollisionEnabled
publicreadonlyisRemote
Whether this entity was created clientside or serverside. (Clientside = false, Serverside = true).
publicreadonlyisSpawned
Returns whether the entity is spawned in the game world.
publicreadonlyisStreamedIn
publicreadonlyisWorldObject
publiclodDistance
The distance at which the LOD model of the object starts being applied.
publicreadonlynetOwner
Network owner of the entity.
publicpos
publicpositionFrozen
Freeze the object on the position
publicreadonlyrefCount
Returns the ref count of the entity.
publicreadonlyremoteID
The serverside id of this entity.
publicrot
publicreadonlyscriptID
Internal game id that can be used in native calls
publicreadonlystreamingDistance
publictextureVariation
publicreadonlytype
Type of the object.
publicreadonlyuseStreaming
publicreadonlyvalid
Object usability.
publicvisible
publicstaticreadonlyall
publicstaticreadonlyallWorld
All objects created by the game. For example, a weapon item in the player’s hand or a bag of rubbish in the street.
publicstaticreadonlycount
publicstaticreadonlystreamedIn
Accessors
publicmodel
Getter
Setter
Methods
publicactivatePhysics
publicattachToEntity
Attaches the object to another entity.
publicdeleteMeta
publicdestroy
Removes the object from the world.
publicdetach
Detaches the object from the current attached entity.
publicgetMeta
Type parameters
- K: string
publicgetMetaDataKeys
publicgetStreamSyncedMeta
Gets a value using the specified key.
Type parameters
- K: string
publicgetStreamSyncedMetaKeys
publicgetSyncInfo
publicgetSyncedMeta
Gets a value using the specified key.
Type parameters
- K: string
publicgetSyncedMetaKeys
publichasMeta
publichasStreamSyncedMeta
Determines whether contains the specified key.
publichasSyncedMeta
Determines whether contains the specified key.
publicplaceOnGroundProperly
Places the object properly on the ground.
publicresetAlpha
publicsetMeta
Type parameters
- K: string
publictoggleCollision
publicwaitForSpawn
Waits asynchronously until the object spawns.
publicstaticgetByID
Retrieves the ped from the pool.
publicstaticgetByRemoteID
Gets the object with the given remote id
publicstaticgetByScriptID
Retrieves the entity from the pool.
Creates a new object.
Remarks
The model for the object is automatically loaded, but because this happens asynchronously, the scriptID property might not be immediately available after creating the object. Setters will always work regardless of whether the model is already loaded or not.