ObjectManager
@vimp-mp/types 2.0.1Creates client-local objects and tracks server-owned object wrappers.
ts
interface ObjectManagerMembers
all
ts
readonly all: Array<Object>All known non-destroyed objects, including remote objects with handle === 0.
count
ts
readonly count: numberNumber of known non-destroyed objects.
create
ts
create(model: string | number, position: Vec3, rotation?: Vec3, options?: ObjectCreateOptions): Object | nullCreates a client-local object, or returns null if its model cannot be loaded.
destroy
ts
destroy(id: number): booleanDestroys the client-local object identified by its wrapper id.
getById
ts
getById(id: number): Object | nullReturns a known object by client-local wrapper id.
getByRemoteId
ts
getByRemoteId(remoteId: number): Object | nullReturns a remote object by server/network id, including objects that are not currently streamed.