GetVehicleModelAudioSettings

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

ADDED/UPDATED IN VERSION 1.6.0 r23140:
This function retrieves audio properties for a specific vehicle model. It allows inspection of various vehicle sound settings such as engine sounds, horn characteristics, door sounds, and radio settings.

Syntax

table getVehicleModelAudioSettings ( int modelID )

Required Arguments

  • modelID: The vehicle model ID to retrieve audio settings for

Returns

Returns a table containing audio settings if successful, false otherwise. The returned table contains the following properties:

  • sound-type - Sound effect type
  • engine-on-soundbank-id - Engine startup sound bank ID (0-410)
  • engine-off-soundbank-id - Engine shutdown sound bank ID (0-410)
  • bass-setting - Bass settings
  • bass-eq - Bass equalizer
  • field-c - Field C parameter
  • horn-ton - Horn tone
  • horn-high - Horn high frequency
  • engine-upgrade - Engine upgrade sound effect
  • door-sound - Door sound effects
  • radio-num - Radio number
  • radio-type - Radio type
  • vehicle-type-for-audio - Audio vehicle type
  • horn-volume-delta - Horn volume delta
[[{{{image}}}|link=|]] Note: This function only works with standard vehicle models. For custom models, it will return the audio settings of the parent model.

Example

-- Retrieve and display the engine-on sound bank ID for Infernus (model 411)
local settings = getVehicleModelAudioSettings(411)
if settings then
    outputChatBox("Infernus engine sound ID: " .. tostring(settings["engine-on-soundbank-id"]))
else
    outputChatBox("Failed to retrieve audio settings.")
end


See Also