# 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`
