SetAudioVehiclePriority
DocsSetAudioVehiclePriority(vehicle, priority)Description
Sets the priority for the given vehicle. This is a hint for the audio system as to what LOD the
vehicle should use.
'High' priority will bump up the activation range significantly and prevent it
from dropping when the vehicle is not within the view frustrum.
'Max' will attempt to keep the vehicle at maximum LOD regardless of how far it is from the listener or what it is currently doing. Be careful with this!
There is a hard limit of 5 simulataneous granular cars (including the player) so we are quite limited on the number
we can play at once, so setting vehicles to max priority will reduce the number of engines availble for regular NPC vehicles
enum eAudVehiclePriority {
AUDIO_VEHICLE_PRIORITY_NORMAL = 0,
AUDIO_VEHICLE_PRIORITY_MEDIUM = 1,
AUDIO_VEHICLE_PRIORITY_MAX = 2,
AUDIO_VEHICLE_PRIORITY_HIGH = 3,
}Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | — |
priority | int | — |
Quick Snippet: Get Vehiclevehicle
vehicleUse this to get the current vehicle handle for this native.
-- Get the vehicle the player is currently in
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
if vehicle ~= 0 then
print("Vehicle handle: " .. vehicle)
print("Model: " .. GetEntityModel(vehicle))
else
print("Player is not in a vehicle")
endVehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaReturns
voidThis native does not return a value.