> For the complete documentation index, see [llms.txt](https://none-fivem.gitbook.io/nonem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://none-fivem.gitbook.io/nonem/resources/no-spy/exports-and-events.md).

# Exports & Events

## Client Exports

***

<details>

<summary>GetDeviceList</summary>

Returns device list.

### Returns

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

</details>

<details>

<summary>GetDeviceId</summary>

Returns device id from entity.

### Parameters

* entity: number

### Returns

* deviceId?: number

</details>

<details>

<summary>HasDevice</summary>

Returns has access to given device id.

### Parameters

* deviceId: number

### Returns

* hasAccess: boolean

</details>

<details>

<summary>AddInteraction</summary>

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);}

</details>

## Server Exports

***

<details>

<summary>GetDeviceList</summary>

Returns device list.

### Parameters

* source: number

### Returns

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

</details>

<details>

<summary>GetDeviceListByUserId</summary>

Returns device list.

### Parameters

* userId: number

### Returns

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

</details>

<details>

<summary>AccessGive</summary>

Grants device access to the given source.

### Parameters

* deviceId: number
* source: number

### Returns

* success: boolean

</details>

<details>

<summary>AccessGiveByUserId</summary>

Grants device access to the given userId.

### Parameters

* deviceId: number
* userId: number

### Returns

* success: boolean

</details>

<details>

<summary>AccessRemove</summary>

Removes device access from the given source.

### Parameters

* deviceId: number
* source: number

### Returns

* success: boolean

</details>

<details>

<summary>AccessRemoveByUserId</summary>

Removes device access from the given userId.

### Parameters

* deviceId: number
* userId: number

### Returns

* success: boolean

</details>

<details>

<summary>AccessReset</summary>

Resets device accesses.

### Parameters

* deviceId: number

### Returns

* success: boolean

</details>

<details>

<summary>AccessShare</summary>

Shares access with given target if player has access.

### Parameters

* deviceId: number
* source: number
* targetSource: number

### Returns

* success: boolean

</details>

<details>

<summary>Destroy</summary>

Removes device entirely.

### Parameters

* deviceId: number

### Returns

* success: boolean

</details>

## Client Net Events

***

<details>

<summary>no-spy:close</summary>

Turns off all devices.

</details>

<details>

<summary>no-spy:devicemanager:menu</summary>

Opens the devices menu.

### Parameters

* type?: cam | motionsensor

</details>

<details>

<summary>no-spy:glasses:use</summary>

Toggles spy glasses.

</details>

<details>

<summary>no-spy:glasses:putOn</summary>

Puts on glasses.

</details>

<details>

<summary>no-spy:glasses:remove</summary>

Removes glasses.

</details>

<details>

<summary>no-spy:glasses:activate</summary>

Activates glasses if equipped.

</details>

<details>

<summary>no-spy:glasses:deactivate</summary>

Deactivates glasses.

</details>

<details>

<summary>no-spy:cam:use</summary>

Starts cam placement.

</details>

<details>

<summary>no-spy:cam:connect</summary>

Connects to cam.

### Parameters

* deviceId: number

</details>

<details>

<summary>no-spy:cam:disconnect</summary>

Disconnects from cam.

</details>

<details>

<summary>no-spy:motionsensor:use</summary>

Starts motion sensor placement.

</details>

<details>

<summary>no-spy:motionsensor:notify</summary>

Sends sensor notification.

### Parameters

* deviceLabel: string

</details>

<details>

<summary>no-spy:photo:use</summary>

Toggles photo.

### Parameters

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

</details>

<details>

<summary>no-spy:photo:show</summary>

Shows photo.

### Parameters

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

</details>

<details>

<summary>no-spy:photo:close</summary>

Closes photo.

</details>

<details>

<summary>no-spy:photo:ready</summary>

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

### Parameters&#x20;

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

</details>

***

## Server Net Events

***

<details>

<summary>no-spy:photo:ready</summary>

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

### Parameters&#x20;

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

</details>

<details>

<summary>no-spy:cam:place</summary>

Places cam.

### Parameters

* deviceCtx: {label: string}
* placementCtx: {coords: vector3; rotation: vector3}

</details>

<details>

<summary>no-spy:motionsensor:notify</summary>

Sends sensor notification to device owners.

### Parameters

* deviceId: number

</details>

<details>

<summary>no-spy:motionsensor:place</summary>

Places motion sensor.

### Parameters

* deviceCtx: {label: string}
* placementCtx: {coords: vector3; rotation: vector3}

</details>
