> For the complete documentation index, see [llms.txt](https://piotreq-scripts.gitbook.io/piotreq-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://piotreq-scripts.gitbook.io/piotreq-scripts/assets-and-guides/police-job/server-exports/misc.md).

# Misc

## playersWithBand

With following state bag you can get all players with tracking bands.

```lua
GlobalState.playersWithBand
```

Return:

* `object` | `{ [identifier]: playerData }`

### playerData

* object
  * identifier: `string`
  * coords: `vector3`
  * heading: `number` or `nil`
  * online: `boolean`
  * name: `string`

***

## PoliceObject

Use following statebag to check if entity is police object.

```lua
Entity(entity).state.PoliceObject
```

* entity: `number`
  * Existing entity on server

***

## PlaySound

Use following export to play sound for players within distance.

```lua
exports['p_policejob']:PlaySound(playerId, data)
```

* playerId: `number`
  * Existing player server id
* data: `table`
  * file: `string`
  * distance: `number` | max: 150.0
  * volume: `number` | 0.0 - 1.0

***

## hasTrackingBand

Use following statebag to check if player has tracking band

```lua
Player(playerId).state.hasTrackingband
```

* playerId: `number`
  * Existing player server id

Return:

* state: `boolean`
