Class LocalObject
Inheritance
BaseObject
LocalObject
Inherited Members
Object.type
Object.valid
Object.id
Object.destroy
Object.getMetaDataKeys
Object.refCount
Package: @altmp/altv-types
Syntax
class LocalObject extends Object
Constructors
|
Improve this Doc
View Source
LocalObject(string | number, Vector3, Vector3, boolean, boolean, boolean, number)
Declaration
LocalObject(model: string | number, pos: Vector3, rot: Vector3, noOffset?: boolean, dynamic?: boolean, useStreaming?: boolean, streamingDistance?: number): LocalObject
Parameters
Type |
Name |
Description |
string | number |
model |
|
Vector3 |
pos |
|
Vector3 |
rot |
|
boolean |
noOffset |
|
boolean |
dynamic |
|
boolean |
useStreaming |
|
number |
streamingDistance |
|
Properties
|
Improve this Doc
View Source
all
Declaration
public readonly static all: readonly LocalObject[]
Property Value
|
Improve this Doc
View Source
allWorld
Declaration
public readonly static allWorld: readonly LocalObject[]
Property Value
|
Improve this Doc
View Source
count
Declaration
public readonly static count: number
Property Value
|
Improve this Doc
View Source
pos
Declaration
Property Value
|
Improve this Doc
View Source
rot
Declaration
Property Value
|
Improve this Doc
View Source
model
Declaration
public get model(): number
public set model(model: string | number): void
Parameters
Type |
Name |
Description |
string | number |
model |
|
Property Value
|
Improve this Doc
View Source
alpha
Declaration
Property Value
|
Improve this Doc
View Source
dynamic
Declaration
public readonly dynamic: boolean
Property Value
|
Improve this Doc
View Source
lodDistance
Declaration
public lodDistance: number
Property Value
|
Improve this Doc
View Source
hasGravity
Declaration
public hasGravity: boolean
Property Value
|
Improve this Doc
View Source
isStreamedIn
Declaration
public readonly isStreamedIn: boolean
Property Value
|
Improve this Doc
View Source
useStreaming
Declaration
public readonly useStreaming: boolean
Property Value
|
Improve this Doc
View Source
streamingDistance
Declaration
public readonly streamingDistance: number
Property Value
|
Improve this Doc
View Source
visible
Declaration
Property Value
|
Improve this Doc
View Source
isCollisionEnabled
Declaration
public readonly isCollisionEnabled: boolean
Property Value
|
Improve this Doc
View Source
positionFrozen
Declaration
public positionFrozen: boolean
Property Value
|
Improve this Doc
View Source
textureVariation
Declaration
public textureVariation: number
Property Value
|
Improve this Doc
View Source
isWorldObject
Declaration
public readonly isWorldObject: boolean
Property Value
Methods
|
Improve this Doc
View Source
getByID(number)
Declaration
public static getByID(id: number): null | LocalObject
Parameters
Type |
Name |
Description |
number |
id |
|
Returns
|
Improve this Doc
View Source
resetAlpha()
Declaration
public resetAlpha(): void
|
Improve this Doc
View Source
attachToEntity(Entity, number, Vector3, Vector3, boolean, boolean, boolean)
Declaration
public attachToEntity(entity: Entity, boneIndex: number, offset: Vector3, rot: Vector3, useSoftPinning?: boolean, collision?: boolean, fixedRot?: boolean): void
Parameters
Type |
Name |
Description |
Entity |
entity |
|
number |
boneIndex |
|
Vector3 |
offset |
|
Vector3 |
rot |
|
boolean |
useSoftPinning |
|
boolean |
collision |
|
boolean |
fixedRot |
|
|
Improve this Doc
View Source
attachToEntity(number, number, Vector3, Vector3, boolean, boolean, boolean)
Declaration
public attachToEntity(scriptID: number, boneIndex: number, offset: Vector3, rot: Vector3, useSoftPinning?: boolean, collision?: boolean, fixedRot?: boolean): void
Parameters
Type |
Name |
Description |
number |
scriptID |
|
number |
boneIndex |
|
Vector3 |
offset |
|
Vector3 |
rot |
|
boolean |
useSoftPinning |
|
boolean |
collision |
|
boolean |
fixedRot |
|
|
Improve this Doc
View Source
detach(boolean)
Declaration
public detach(dynamic?: boolean): void
Parameters
Type |
Name |
Description |
boolean |
dynamic |
|
|
Improve this Doc
View Source
toggleCollision(boolean, boolean)
Declaration
public toggleCollision(toggle: boolean, keepPhysics: boolean): void
Parameters
Type |
Name |
Description |
boolean |
toggle |
|
boolean |
keepPhysics |
|
|
Improve this Doc
View Source
placeOnGroundProperly()
Declaration
public placeOnGroundProperly(): void
|
Improve this Doc
View Source
activatePhysics()
Declaration
public activatePhysics(): void
|
Improve this Doc
View Source
waitForSpawn(number)
Declaration
public waitForSpawn(timeout?: number): Promise<void>
Parameters
Type |
Name |
Description |
number |
timeout |
|
Returns
Type |
Description |
Promise<void> |
|