Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions AUDIO/DoesPlayerVehHaveRadio.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ aliases: ["0x109697E2FFBAC8A1"]
BOOL DOES_PLAYER_VEH_HAVE_RADIO();
```

Checks if the vehicle the local player is currently in has a radio.

## Return value

Returns `true` if the player's current vehicle has a radio. Returns `false` if it does not, or if the player is not in any vehicle.
26 changes: 25 additions & 1 deletion VEHICLE/IsVehicleSirenAudioOn.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,32 @@ aliases: ["0xB5CC40FBCB586380","_IS_VEHICLE_SIREN_SOUND_ON"]
BOOL IS_VEHICLE_SIREN_AUDIO_ON(Vehicle vehicle);
```

Checks if the siren audio is currently playing on the given vehicle.

This only checks the sound not the lights. A vehicle can have its siren lights active while the audio is silent, for example when [`SET_VEHICLE_HAS_MUTED_SIRENS`](#_0xD8050E0EB60CF274) has been used to suppress the sound.

## Parameters
* **vehicle**:

* **vehicle**: The vehicle to check.

## Return value

Returns `true` if the siren audio is currently playing, `false` if it is silent or the vehicle does not have a siren.

## Examples

```lua
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)

if IsVehicleSirenAudioOn(vehicle) then
print("Siren is audible")
end
```

```js
const vehicle = GetVehiclePedIsIn(PlayerPedId(), false);

if (IsVehicleSirenAudioOn(vehicle)) {
console.log("Siren is audible");
}
```
Loading