Exports & Events

Client Exports


chevron-rightGetDeviceListhashtag

Returns device list.

Returns

  • list: {id: number; label: string; type: string; coords: vector3; location: string; date: string}

chevron-rightGetDeviceIdhashtag

Returns device id from entity.

Parameters

  • entity: number

Returns

  • deviceId?: number

chevron-rightHasDevicehashtag

Returns has access to given device id.

Parameters

  • deviceId: number

Returns

  • hasAccess: boolean

chevron-rightAddInteractionhashtag

Adds interaction to the devices.

Parameters

  • ctx: {id: string; devices: string[]; label: string; icon: string; accessRequired?: boolean; onInteract: function(entity, deviceId); isEnabled: function(entity, deviceId);}

Server Exports


chevron-rightGetDeviceListhashtag

Returns device list.

Parameters

  • source: number

Returns

  • list: {id: number; label: string; type: string; owned: boolean; coords: vector3; netId: number; date: string}

chevron-rightGetDeviceListByUserIdhashtag

Returns device list.

Parameters

  • userId: number

Returns

  • list: {id: number; label: string; type: string; owned: boolean; coords: vector3; netId: number; date: string}

chevron-rightAccessGivehashtag

Grants device access to the given source.

Parameters

  • deviceId: number

  • source: number

Returns

  • success: boolean

chevron-rightAccessGiveByUserIdhashtag

Grants device access to the given userId.

Parameters

  • deviceId: number

  • userId: number

Returns

  • success: boolean

chevron-rightAccessRemovehashtag

Removes device access from the given source.

Parameters

  • deviceId: number

  • source: number

Returns

  • success: boolean

chevron-rightAccessRemoveByUserIdhashtag

Removes device access from the given userId.

Parameters

  • deviceId: number

  • userId: number

Returns

  • success: boolean

chevron-rightAccessResethashtag

Resets device accesses.

Parameters

  • deviceId: number

Returns

  • success: boolean

chevron-rightAccessSharehashtag

Shares access with given target if player has access.

Parameters

  • deviceId: number

  • source: number

  • targetSource: number

Returns

  • success: boolean

chevron-rightDestroyhashtag

Removes device entirely.

Parameters

  • deviceId: number

Returns

  • success: boolean

Client Net Events


chevron-rightno-spy:closehashtag

Turns off all devices.

chevron-rightno-spy:devicemanager:menuhashtag

Opens the devices menu.

Parameters

  • type?: cam | motionsensor

chevron-rightno-spy:glasses:usehashtag

Toggles spy glasses.

chevron-rightno-spy:glasses:putOnhashtag

Puts on glasses.

chevron-rightno-spy:glasses:removehashtag

Removes glasses.

chevron-rightno-spy:glasses:activatehashtag

Activates glasses if equipped.

chevron-rightno-spy:glasses:deactivatehashtag

Deactivates glasses.

chevron-rightno-spy:cam:usehashtag

Starts cam placement.

chevron-rightno-spy:cam:connecthashtag

Connects to cam.

Parameters

  • deviceId: number

chevron-rightno-spy:cam:disconnecthashtag

Disconnects from cam.

chevron-rightno-spy:motionsensor:usehashtag

Starts motion sensor placement.

chevron-rightno-spy:motionsensor:notifyhashtag

Sends sensor notification.

Parameters

  • deviceLabel: string

chevron-rightno-spy:photo:usehashtag

Toggles photo.

Parameters

  • ctx: {image: string, date?: number}

chevron-rightno-spy:photo:showhashtag

Shows photo.

Parameters

  • ctx: {image: string, date?: number}

chevron-rightno-spy:photo:closehashtag

Closes photo.

chevron-rightno-spy:photo:readyhashtag

This event will be triggered by us when the photo is ready. You can change normal behavior by listening this event.

Parameters

  • ctx: {image: string; date: number}


Server Net Events


chevron-rightno-spy:photo:readyhashtag

This event will be triggered by us when the photo is ready. You can change normal behavior by listening this event.

Parameters

  • ctx: {image: string; date: number}

chevron-rightno-spy:cam:placehashtag

Places cam.

Parameters

  • deviceCtx: {label: string}

  • placementCtx: {coords: vector3; rotation: vector3}

chevron-rightno-spy:motionsensor:notifyhashtag

Sends sensor notification to device owners.

Parameters

  • deviceId: number

chevron-rightno-spy:motionsensor:placehashtag

Places motion sensor.

Parameters

  • deviceCtx: {label: string}

  • placementCtx: {coords: vector3; rotation: vector3}

Last updated