class Audio
package fivem.client.natives
Static methods
staticForceVehicleEngineSynth(vehicle:Dynamic, force:Bool):Dynamic
This native is used alongside with SET_VEHICLE_TYRE_BURST.
NativeDB Introduced: v3258staticGetCurrentRadioTrackPlaybackTime(radioStationName:String):Int
Return the playback time (in milliseconds) of the radio stations current track.
NativeDB Introduced: v1493staticSetPedAudioFootstepLoud(ped:Dynamic, toggle:Bool):Dynamic
Enables/disables ped's "loud" footstep sound.
NativeDB Introduced: v1493staticSetPedAudioGender(ped:Dynamic, p1:Bool):Dynamic
staticSetPedVoiceGroup(ped:Dynamic, voiceGroupHash:Int):Dynamic
From the scripts:
AUDIO::_SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("PAIGE_PVG"));
AUDIO::_SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("TALINA_PVG"));
AUDIO::_SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("FEMALE_LOST_BLACK_PVG"));
AUDIO::_SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("FEMALE_LOST_WHITE_PVG"));staticSetPedVoiceGroupRace(ped:Dynamic, voiceGroupHash:Int):Dynamic
Dat151RelType == 29
NativeDB Introduced: v2699staticSetRadioStationIsVisible(radioStation:String, toggle:Bool):Dynamic
Doesn't have an effect in Story Mode.
NativeDB Introduced: v2372staticSetRadioTrackMix(radioStationName:String, mixName:String, p2:Int):Dynamic
NativeDB Introduced: v1493staticactivateAudioSlowmoMode(mode:String):Dynamic
Below is a list of modes and their respective hashes.
| Mode (string) | Hash |
|---|---|
| SLOWMO_BIG_SCORE_JUMP | 0x2B981B0C |
| JSH_EXIT_TUNNEL_SLOWMO | 0x2562AA6 |
| SLOW_MO_METH_HOUSE_RAYFIRE | 0xDB9E1909 |
| SLOWMO_FIB4_TRUCK_SMASH | 0x9E144347 |
| SLOWMO_PROLOGUE_VAULT | 0xEA2E68E1 |
| SLOWMO_T1_RAYFIRE_EXPLOSION | 0xD6D358F3 |
| SLOWMO_T1_TRAILER_SMASH | 0xBE607345 |
| BARRY_01_SLOWMO | 0xD59540D4 |
| BARRY_02_SLOWMO | 0x12F140B3 |
| SLOWMO_EXTREME_04 | 0xF562EA50 |
| NIGEL_02_SLOWMO_SETTING | 0x384689B0 |
staticaddEntityToAudioMixGroup(entity:Dynamic, groupName:String, fadeIn:Float):Dynamic
All found occurrences in b678d:
pastebin.com/ceu67jz8staticaddLineToConversation(speakerConversationIndex:Int, context:String, subtitle:String, listenerNumber:Int, volumeType:Int, isRandom:Bool, interruptible:Bool, ducksRadio:Bool, ducksScore:Bool, audibility:Int, headset:Bool, dontInterruptForSpecialAbility:Bool, isPadSpeakerRoute:Bool):Dynamic
enum eAudibility {
AUD_AUDIBILITY_NORMAL = 0,
AUD_AUDIBILITY_CLEAR = 1,
AUD_AUDIBILITY_CRITICAL = 2,
AUD_AUDIBILITY_LEAD_IN = 3
}staticaddPedToConversation(speakerConversationIndex:Int, ped:Dynamic, voiceName:String):Dynamic
staticaudioIsScriptedMusicPlaying():Bool
staticblipSiren(vehicle:Dynamic):Dynamic
Plays a siren blip from the vehicle when you double press the horn key.
This only works on vehicles with sirens.
staticblockAllSpeechFromPed(ped:Dynamic, shouldBlock:Bool, suppressOutgoingNetworkSpeech:Bool):Dynamic
Blocks all speech playing on the given ped, including speech triggered by natives such as PLAY_PED_AMBIENT_SPEECH_WITH_VOICE_NATIVE
The flag itself is not synced, it must be called on each machine that wishes to suppress the speech.
The SuppressOutgoingNetworkSpeech flag can be set to false if you want speech triggered locally through PLAY_PED_AMBIENT_SPEECH_* related native calls to still be audible on remote machines, even though it was blocked on the local one.
staticblockDeathJingle(blocked:Bool):Dynamic
staticblockSpeechContextGroup(groupName:String, contextBlockTarget:Int):Dynamic
enum eAudContextBlockTarget {
AUD_CONTEXT_BLOCK_PLAYER = 0,
AUD_CONTEXT_BLOCK_NPCS = 1,
AUD_CONTEXT_BLOCK_BUDDYS = 2,
AUD_CONTEXT_BLOCK_EVERYONE = 3,
AUD_CONTEXT_BLOCK_TARGETS_TOTAL
}
Stop a certain group of peds from using a certain group of speech contexts.
Note that the block will be automatically removed when the calling script finishes
staticcanVehicleReceiveCbRadio(vehicle:Dynamic):Bool
staticcancelAllPoliceReports():Dynamic
staticcancelMusicEvent(eventName:String):Bool
All music event names found in the b617d scripts: pastebin.com/GnYt0R3PstaticclearAllBrokenGlass():Dynamic
staticclearAmbientZoneListState(zoneListName:String, forceUpdate:Bool):Dynamic
Resets the list of ambients zones enabled/disabled status to its value before it was modified by this script.
Default behaviour is that any state change only gets applied once the player leaves the zone.
staticclearAmbientZoneState(zoneName:String, forceUpdate:Bool):Dynamic
Resets the ambient zone enabled/disabled status to its value before it was modified by this script
Default behaviour is that any state change only gets applied once the player leaves the zone.
staticclearCustomRadioTrackList(radioStation:String):Dynamic
Clears the previously queued custom track lost for the given radio station.
staticcreateNewScriptedConversation():Dynamic
staticdisablePedPainAudio(ped:Dynamic, shouldDisable:Bool):Dynamic
staticdoesContextExistForThisPed(ped:Dynamic, speechName:String, allowBackupPVGs:Bool):Bool
Checks if the context exists for the ped, searching through the voices in its PedVoiceGroup.
The final argument can be set to true to allow searching in backup PVGs
staticdoesPlayerVehHaveRadio():Bool
staticenableStallWarningSounds(vehicle:Dynamic, enable:Bool):Dynamic
Enable or disable the plane stall warning sounds
staticenableStuntJumpAudio():Dynamic
Enable the stunt jump audio detection code
This native is meant to be called per-frame for as long as detection is wanted.
staticenableVehicleExhaustPops(vehicle:Dynamic, toggle:Bool):Dynamic
Enable or disable exhaust pops on the given vehicle.
staticenableVehicleFanbeltDamage(vehicle:Dynamic, enableFanbeltDamage:Bool):Dynamic
staticfindRadioStationIndex(stationNameHash:Int):Int
staticforceMusicTrackList(radioStation:String, trackListName:String, timeOffsetMilliseconds:Int):Dynamic
Forces the chosen station to paly the given music track list. All other music track lists will be locked.
staticforceUseAudioGameObject(vehicle:Dynamic, gameObjectName:String):Dynamic
This native sets the audio to the specific vehicle hash's audioNameHash.
staticfreezeMicrophone():Dynamic
Allows script to freeze the microphone for a single frame, mantaining its current transform/settings. This native should be called every frame you want to keep the microphone frozen, when you stop calling it it will automatically unfreeze
staticfreezeRadioStation(radioStation:String):Dynamic
staticgetAmbientVoiceNameHash(ped:Dynamic):Int
staticgetAudibleMusicTrackTextId():Int
staticgetCurrentScriptedConversationLine():Int
staticgetCurrentTrackSoundName(radioStationName:String):Int
staticgetIsPreloadedConversationReady():Bool
staticgetMusicPlaytime():Int
staticgetMusicVolSlider():Int
staticgetNetworkIdFromSoundId(soundId:Int):Int
staticgetNextAudibleBeat(timeInSeconds:Dynamic, bpm:Dynamic, beatNum:Dynamic):Bool
staticgetNumUnlockedRadioStations():Int
staticgetPlayerRadioStationGenre():Int
staticgetPlayerRadioStationIndex():Int
staticgetPlayerRadioStationName():String
staticgetRadioStationName(stationIndex:Int):String
staticgetSoundId():Int
If a playback function has a soundId field but the sound doesn't need to be altered after triggering then pass a value of -1 for fire-and-forget playback, rather than getting a soundId.
SoundId's can be reused, without needing to release them and grab a new one.
If a sound's finished playing, you can reuse its SoundId to kick off another one.
If the sound's not finished playing, it'll be stopped first (fading out or whatever is set up in RAVE by the sound designer), and the new one kicked off; usually it is safer to just get a new SoundId.
SoundId's are not automatically cleaned up, you must use RELEASE_SOUND_ID after you've finished using them to allow the engine to recycle the sound id.
staticgetStreamPlayTime():Int
staticgetVariationChosenForScriptedLine(textLabel:String):Int
staticgetVehicleDefaultHorn(vehicle:Dynamic):Int
staticgetVehicleDefaultHornIgnoreMods(vehicle:Dynamic):Int
statichasLoadedMpDataSet():Bool
statichasLoadedSpDataSet():Bool
statichasSoundFinished(soundId:Int):Bool
statichintAmbientAudioBank(bankName:String, bOverNetwork:Bool):Bool
This native is marked as a deprecated native internally, use HINT_SCRIPT_AUDIO_BANK instead
statichintMissionAudioBank(bankName:String, bOverNetwork:Bool, playerBits:Int):Bool
This is marked as a deprecated function internally, please use HINT_SCRIPT_AUDIO_BANK instead.
statichintScriptAudioBank(bankName:String, bOverNetwork:Bool):Bool
Hints that this bank would be good to load if there are free slots. Does not guarentee loading of the bank, REQUEST_SCRIPT_AUDIO_BANK MUST be used as normal before triggering sounds"
This native has a new argument on newer game builds:
- playerBits: likely used to specifiy players to sync to as a bit mask (1 << (0-128))
staticinitSynchSceneAudioWithEntity(audioName:String, entity:Dynamic):Dynamic
staticinitSynchSceneAudioWithPosition(audioName:String, x:Float, y:Float, z:Float):Dynamic
staticinterruptConversation(interrupterPed:Dynamic, context:String, voiceName:String):Dynamic
Handles conversation interrupts, using the code-side system for improved timing and to minimize unfriendly logic interactions.
staticinterruptConversationAndPause(interrupterPed:Dynamic, context:String, voiceName:String):Dynamic
Handles conversation interrupts and pauses, using the code-side system for improved timing and to minimize unfriendly logic interactions.
staticisAlarmPlaying(alarmName:String):Bool
staticisAmbientSpeechDisabled(ped:Dynamic):Bool
staticisAmbientSpeechPlaying(ped:Dynamic):Bool
staticisAmbientZoneEnabled(ambientZone:String):Bool
staticisAnimalVocalizationPlaying(pedHandle:Dynamic):Bool
staticisAnyPositionalSpeechPlaying():Bool
Determines if any ped-independent, positionally-based scripted speech is currently active. This typically includes speech events triggered using PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE.
NativeDB Introduced: v2189staticisAnySpeechPlaying(ped:Dynamic):Bool
staticisAudioSceneActive(scene:String):Bool
staticisHornActive(vehicle:Dynamic):Bool
staticisMissionCompletePlaying():Bool
staticisMissionCompleteReadyForUi():Bool
staticisMissionNewsStoryUnlocked(newsStory:Int):Bool
staticisMobileInterferenceActive():Bool
staticisMobilePhoneCallOngoing():Bool
staticisMobilePhoneRadioActive():Bool
staticisMusicOneshotPlaying():Bool
staticisPedInCurrentConversation(ped:Dynamic):Bool
staticisPedRingtonePlaying(ped:Dynamic):Bool
staticisPlayerVehRadioEnable():Bool
staticisRadioFadedOut():Bool
staticisRadioRetuning():Bool
staticisRadioStationFavourited(radioStation:String):Bool
staticisScriptedConversationLoaded():Bool
staticisScriptedConversationOngoing():Bool
staticisScriptedSpeechPlaying(ped:Dynamic):Bool
staticisStreamPlaying():Bool
staticisVehicleAudiblyDamaged(vehicle:Dynamic):Bool
staticisVehicleRadioOn(vehicle:Dynamic):Bool
staticlinkStaticEmitterToEntity(emitterName:String, entity:Dynamic):Dynamic
Links a static emitter to the given entity
staticloadStream(streamName:String, soundSet:String):Bool
Load in named stream. Optionally can specify a sound set which contains the sound specified by name.
Names for the streams can be found here, the list will be updated as more are found.
staticloadStreamWithStartOffset(streamName:String, startOffset:Int, soundSet:String):Bool
Load in named stream. Optionally can specify a sound set which contains the sound specified by name.
staticlockRadioStation(radioStationName:String, toggle:Bool):Dynamic
This disables the radio station completely - it won't be selectable on the radio wheel or ever be heard coming from a vehicle/ambient emitter
NativeDB Introduced: v1493staticlockRadioStationTrackList(radioStation:String, trackListName:String):Dynamic
staticoverrideMicrophoneSettings(hash:Int, toggle:Bool):Dynamic
Sets audio flag "OverrideMicrophoneSettings"
Allows the script to ovverride the current microphone settings
staticoverridePlayerGroundMaterial(overriddenMaterialHash:Int, scriptOverrides:Bool):Dynamic
Sets the footstep tuning modes
staticoverrideTrevorRage(voiceEffect:String):Dynamic
This native enables the audio flag "TrevorRageIsOverridden" and sets the voice effect to voiceEffect
To clear the override use RESET_TREVOR_RAGE
staticoverrideUnderwaterStream(streamName:String, override_:Bool):Dynamic
This native allows a scripter to override the current underwater stream. It needs to be called before going into the water
It needs to also be called with OVERRIDE_UNDERWATER_STREAM("", false) in order to stop overriding.
staticoverrideVehHorn(vehicle:Dynamic, override_:Bool, hornHash:Int):Dynamic
Overrides the vehicle's horn hash.
When changing this hash on a vehicle, _GET_VEHICLE_HORN_HASH will not return the 'overwritten' hash. It will still always return the default horn hash (same as GET_VEHICLE_DEFAULT_HORN).
List of possible hashes (found in decompiled scripts):
| signed | unsigned | hex |
|---|---|---|
1604822495 | 1604822495 | 0x5FA7A5DF |
-1262465009 | 3032502287 | 0xB4C0500F |
-889553789 | 3405413507 | 0xCAFA7C83 |
-1557943086 | 2737024210 | 0xA323ACD2 |
-1318696617 | 2976270679 | 0xB1664957 |
-7740003 | 4287227293 | 0xFF89E59D |
-1815146967 | 2479820329 | 0x93CF0E29 |
-339919356 | 3955047940 | 0xEBBD3E04 |
staticpauseScriptedConversation(finishCurrentLine:Bool):Dynamic
To resume the conversation use RESTART_SCRIPTED_CONVERSATION
staticplayAmbientSpeechFromPositionNative(speechName:String, voiceName:String, x:Float, y:Float, z:Float, speechParam:String):Dynamic
staticplayAnimalVocalization(pedHandle:Dynamic, animalType:Int, speechName:String):Dynamic
enum eAudAnimalType {
AUD_ANIMAL_NONE = -1,
AUD_ANIMAL_BOAR = 0,
AUD_ANIMAL_CHICKEN = 1,
AUD_ANIMAL_DOG = 2,
AUD_ANIMAL_DOG_ROTTWEILER = 3,
AUD_ANIMAL_HORSE = 4,
AUD_NUM_ANIMALS = 5
}staticplayDeferredSoundFrontend(soundName:String, soundsetName:String):Dynamic
staticplayEndCreditsMusic(bActive:Bool):Dynamic
staticplayMissionCompleteAudio(audioName:String):Dynamic
Called 38 times in the scripts. There are 5 different audioNames used.
One unknown removed below.
AUDIO::PLAY_MISSION_COMPLETE_AUDIO("DEAD");
AUDIO::PLAY_MISSION_COMPLETE_AUDIO("FRANKLIN_BIG_01");
AUDIO::PLAY_MISSION_COMPLETE_AUDIO("GENERIC_FAILED");
AUDIO::PLAY_MISSION_COMPLETE_AUDIO("TREVOR_SMALL_01");staticplayPain(ped:Dynamic, damageReason:Int, rawDamage:Float):Dynamic
This native had a 4th parameter added in newer game builds
syncOverNetwork creates a CPedPlayPainEvent when set to true, by default this variable is false.
You won't be able to use this for clones (remote pedestrians that are not owned by you) or migrating peds if syncOverNetwork is set to true; it simply won't execute.
The ped should also have speech for this to work.
enum eAudDamageReason {
AUD_DAMAGE_REASON_DEFAULT = 0,
AUD_DAMAGE_REASON_FALLING = 1,
AUD_DAMAGE_REASON_SUPER_FALLING = 2,
AUD_DAMAGE_REASON_SCREAM_PANIC = 3,
AUD_DAMAGE_REASON_SCREAM_PANIC_SHORT = 4,
AUD_DAMAGE_REASON_SCREAM_SCARED = 5,
AUD_DAMAGE_REASON_SCREAM_SHOCKED = 6,
AUD_DAMAGE_REASON_SCREAM_TERROR = 7,
AUD_DAMAGE_REASON_ON_FIRE = 8,
AUD_DAMAGE_REASON_DROWNING = 9,
// drowning on the surface of water, after we time out
AUD_DAMAGE_REASON_SURFACE_DROWNING = 10,
AUD_DAMAGE_REASON_INHALE = 11,
AUD_DAMAGE_REASON_EXHALE = 12,
AUD_DAMAGE_REASON_POST_FALL_GRUNT = 13,
AUD_DAMAGE_REASON_ENTERING_RAGDOLL_DEATH = 14,
AUD_DAMAGE_REASON_EXPLOSION = 15,
AUD_DAMAGE_REASON_MELEE = 16,
AUD_DAMAGE_REASON_SHOVE = 17,
AUD_DAMAGE_REASON_WHEEZE = 18,
AUD_DAMAGE_REASON_COUGH = 19,
AUD_DAMAGE_REASON_TAZER = 20,
AUD_DAMAGE_REASON_EXHAUSTION = 21,
AUD_DAMAGE_REASON_CLIMB_LARGE = 22,
AUD_DAMAGE_REASON_CLIMB_SMALL = 23,
AUD_DAMAGE_REASON_JUMP = 24,
AUD_DAMAGE_REASON_COWER = 25,
AUD_DAMAGE_REASON_WHIMPER = 26,
AUD_DAMAGE_REASON_DYING_MOAN = 27,
AUD_DAMAGE_REASON_CYCLING_EXHALE = 28,
AUD_DAMAGE_REASON_PAIN_RAPIDS = 29,
AUD_DAMAGE_REASON_SNEEZE = 30,
AUD_DAMAGE_REASON_MELEE_SMALL_GRUNT = 31,
AUD_DAMAGE_REASON_MELEE_LARGE_GRUNT = 32,
AUD_DAMAGE_REASON_POST_FALL_GRUNT_LOW = 33
}staticplayPedAmbientSpeechAndCloneNative(ped:Dynamic, speechName:String, speechParam:String):Dynamic
See PLAY_PED_AMBIENT_SPEECH_NATIVE for parameter specifications.
NativeDB Added Parameter 4: Any p3staticplayPedAmbientSpeechNative(ped:Dynamic, speechName:String, speechParam:String):Dynamic
Plays ambient speech; see also PLAY_PED_AMBIENT_SPEECH_AND_CLONE_NATIVE.
speechParam: Can be one of the following:
SPEECH_PARAMS_STANDARD
SPEECH_PARAMS_ALLOW_REPEAT
SPEECH_PARAMS_BEAT
SPEECH_PARAMS_FORCE
SPEECH_PARAMS_FORCE_FRONTEND
SPEECH_PARAMS_FORCE_NO_REPEAT_FRONTEND
SPEECH_PARAMS_FORCE_NORMAL
SPEECH_PARAMS_FORCE_NORMAL_CLEAR
SPEECH_PARAMS_FORCE_NORMAL_CRITICAL
SPEECH_PARAMS_FORCE_SHOUTED
SPEECH_PARAMS_FORCE_SHOUTED_CLEAR
SPEECH_PARAMS_FORCE_SHOUTED_CRITICAL
SPEECH_PARAMS_FORCE_PRELOAD_ONLY
SPEECH_PARAMS_MEGAPHONE
SPEECH_PARAMS_HELI
SPEECH_PARAMS_FORCE_MEGAPHONE
SPEECH_PARAMS_FORCE_HELI
SPEECH_PARAMS_INTERRUPT
SPEECH_PARAMS_INTERRUPT_SHOUTED
SPEECH_PARAMS_INTERRUPT_SHOUTED_CLEAR
SPEECH_PARAMS_INTERRUPT_SHOUTED_CRITICAL
SPEECH_PARAMS_INTERRUPT_NO_FORCE
SPEECH_PARAMS_INTERRUPT_FRONTEND
SPEECH_PARAMS_INTERRUPT_NO_FORCE_FRONTEND
SPEECH_PARAMS_ADD_BLIP
SPEECH_PARAMS_ADD_BLIP_ALLOW_REPEAT
SPEECH_PARAMS_ADD_BLIP_FORCE
SPEECH_PARAMS_ADD_BLIP_SHOUTED
SPEECH_PARAMS_ADD_BLIP_SHOUTED_FORCE
SPEECH_PARAMS_ADD_BLIP_INTERRUPT
SPEECH_PARAMS_ADD_BLIP_INTERRUPT_FORCE
SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED
SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CLEAR
SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CRITICAL
SPEECH_PARAMS_SHOUTED
SPEECH_PARAMS_SHOUTED_CLEAR
SPEECH_PARAMS_SHOUTED_CRITICAL
Note: A list of Name and Parameters can be found here pastebin.com/1GZS5dCL
NativeDB Added Parameter 4: Any p3staticplayPedAmbientSpeechWithVoiceNative(ped:Dynamic, speechName:String, voiceName:String, speechParam:String, p4:Bool):Dynamic
This is the same as PLAY_PED_AMBIENT_SPEECH_NATIVE and PLAY_PED_AMBIENT_SPEECH_AND_CLONE_NATIVE but it will allow you to play a speech file from a specific voice file. It works on players and all peds, even animals.
EX (C#):
GTA.Native.Function.Call(Hash._0x3523634255FC3318, Game.Player.Character, "GENERIC_INSULT_HIGH", "s_m_y_sheriff_01_white_full_01", "SPEECH_PARAMS_FORCE_SHOUTED", 0);
The first param is the ped you want to play it on, the second is the speech name, the third is the voice name, the fourth is the speech param, and the last param is usually always 0.staticplayPedRingtone(ringtoneName:String, ped:Dynamic, p2:Bool):Dynamic
All found occurrences in b617d, sorted alphabetically and identical lines removed: pastebin.com/RFb4GTny
AUDIO::PLAY_PED_RINGTONE("Remote_Ring", PLAYER::PLAYER_PED_ID(), 1);
AUDIO::PLAY_PED_RINGTONE("Dial_and_Remote_Ring", PLAYER::PLAYER_PED_ID(), 1); staticplayPoliceReport(name:String, p1:Float):Int
Plays the given police radio message.
All found occurrences in b617d, sorted alphabetically and identical lines removed: pastebin.com/GBnsQ5hrstaticplaySound(soundId:Int, audioName:String, audioRef:String, p3:Bool, p4:Dynamic, p5:Bool):Dynamic
All found occurrences in b617d, sorted alphabetically and identical lines removed: pastebin.com/A8Ny8AHZ staticplaySoundFromCoord(soundId:Int, audioName:String, x:Float, y:Float, z:Float, audioRef:String, isNetwork:Bool, range:Int, p8:Bool):Dynamic
All found occurrences in b617d, sorted alphabetically and identical lines removed: pastebin.com/eeFc5DiW
gtaforums.com/topic/795622-audio-for-mods staticplaySoundFromEntity(soundId:Int, audioName:String, entity:Dynamic, audioRef:String, isNetwork:Bool, p5:Dynamic):Dynamic
All found occurrences in b617d, sorted alphabetically and identical lines removed: pastebin.com/f2A7vTj0
No changes made in b678d.
gtaforums.com/topic/795622-audio-for-mods staticplaySoundFrontend(soundId:Int, audioName:String, audioRef:String, p3:Bool):Dynamic
List: https://pastebin.com/DCeRiaLJ
All occurrences as of Cayo Perico Heist DLC (b2189), sorted alphabetically and identical lines removed: https://git.io/JtLxMstaticplayStreamFromObject(object:Dynamic):Dynamic
Plays a preloaded stream back from the specified object.
staticplayStreamFromPosition(x:Float, y:Float, z:Float):Dynamic
Plays a preloaded stream back from the specified Vector3.
staticplayStreamFromVehicle(vehicle:Dynamic):Dynamic
Plays a preloaded stream back from the specified ped vehicle
staticplayStreamFrontend():Dynamic
staticplaySynchronizedAudioEvent(sceneId:Int):Bool
staticplayVehicleDoorCloseSound(vehicle:Dynamic, doorIndex:Int):Dynamic
staticplayVehicleDoorOpenSound(vehicle:Dynamic, doorIndex:Int):Dynamic
staticpreloadScriptConversation(displaySubtitles:Bool, addToBriefScreen:Bool, cloneConversation:Bool, interruptible:Bool):Dynamic
Similar to START_SCRIPT_CONVERSATION, except that is starts the conversation off paused.
A scripter can then kick off the conversation by calling START_PRELOADED_CONVERSATION.
If they want to check that the conversation is done preloading, they can use GET_IS_PRELOADED_CONVERSATION_READY
staticpreloadScriptPhoneConversation(displaySubtitles:Bool, addToBriefScreen:Bool):Dynamic
staticpreloadVehicleAudioBank(model:Int):Dynamic
Request that we preload the required audio bank for a given vehicle model.
NativeDB Introduced: v1180staticprepareMusicEvent(eventName:String):Bool
Prepares the specified music event. Preparing it in advance will preload any required data so that it's ready to play immediately.
staticprepareSynchronizedAudioEvent(audioEvent:String, startOffsetMs:Int):Bool
staticprepareSynchronizedAudioEventForScene(sceneId:Int, audioEvent:String):Bool
staticrefreshClosestOceanShoreline():Dynamic
Refreshes the closest shoreline using the nearest road position.
staticregisterScriptWithAudio(inChargeOfAudio:Bool):Dynamic
**This native does absolutely nothing, just a nullsub
staticreleaseAmbientAudioBank():Dynamic
This native has been marked as deprecated internally, please use RELEASE_SCRIPT_AUDIO_BANK instead.
staticreleaseMissionAudioBank():Dynamic
This native has been marked as deprecated internally, please use RELEASE_SCRIPT_AUDIO_BANK instead.
staticreleaseSoundId(soundId:Int):Dynamic
This should be called once a sound has finished being manipulated by the script so that its SoundId can be released and re-used.
staticremoveEntityFromAudioMixGroup(entity:Dynamic, fadeOut:Float):Dynamic
Removes an entity from its current mix group.
staticremovePortalSettingsOverride(portalSettingsName:String):Dynamic
Found in the b617d scripts, duplicates removed:
AUDIO::_B4BBFD9CD8B3922B("V_CARSHOWROOM_PS_WINDOW_UNBROKEN");
AUDIO::_B4BBFD9CD8B3922B("V_CIA_PS_WINDOW_UNBROKEN");
AUDIO::_B4BBFD9CD8B3922B("V_DLC_HEIST_APARTMENT_DOOR_CLOSED");
AUDIO::_B4BBFD9CD8B3922B("V_FINALEBANK_PS_VAULT_INTACT");
AUDIO::_B4BBFD9CD8B3922B("V_MICHAEL_PS_BATHROOM_WITH_WINDOW");
For events like cars driving through windows, allows script to unocclude that window
staticrequestAmbientAudioBank(bankName:String, bOverNetwork:Bool):Bool
This native is marked as deprecated internally, please use REQUEST_SCRIPT_AUDIO_BANK
This native has a new argument on newer game builds:
- playerBits:
staticrequestMissionAudioBank(bankName:String, bOverNetwork:Bool):Bool
This native is marked as deprecated internally, please use REQUEST_SCRIPT_AUDIO_BANK
This native has a new argument on newer game builds:
- playerBits:
staticrequestScriptAudioBank(bankName:String, bOverNetwork:Bool):Bool
This native has a new argument on newer game builds:
*
* * **playerBits**:
staticrequestTennisBanks(opponentPed:Dynamic):Dynamic
Loads the tennis vocalization banks into a couple animal slots.
staticresetPedAudioFlags(ped:Dynamic):Dynamic
staticresetVehicleStartupRevSound(vehicle:Dynamic):Dynamic
Resets the override for SET_VEHICLE_STARTUP_REV_SOUND
staticrestartScriptedConversation():Dynamic
Restarts a conversation that was previously paused with PAUSE_SCRIPTED_CONVERSATION
staticscriptOverridesWindElevation(override_:Bool, windElevationHashName:Int):Dynamic
Overrides wind elevation sounds
staticsetAggressiveHorns(toggle:Bool):Dynamic
Makes pedestrians sound their horn longer, faster and more agressive when they use their horn.
staticsetAmbientVoiceName(ped:Dynamic, voiceName:String):Dynamic
Sets the specified ped to use a specific voice different to the one associated with their model.
staticsetAmbientVoiceNameHash(ped:Dynamic, hash:Int):Dynamic
Sets the specified ped to use a specific voice different to the one associated with their model.
staticsetAmbientZoneListState(zoneListName:String, enabled:Bool, forceUpdate:Bool):Dynamic
staticsetAmbientZoneListStatePersistent(ambientZone:String, enabled:Bool, forceUpdate:Bool):Dynamic
staticsetAmbientZoneState(zoneName:String, enabled:Bool, forceUpdate:Bool):Dynamic
staticsetAmbientZoneStatePersistent(zoneName:String, enabled:Bool, forceUpdate:Bool):Dynamic
staticsetAnimalMood(animal:Dynamic, mood:Int):Dynamic
enum eAudAnimalMood {
AUD_ANIMAL_MOOD_ANGRY = 0,
AUD_ANIMAL_MOOD_PLAYFUL = 1,
AUD_ANIMAL_MOOD_NUM_MOODS = 2
}staticsetAudioFlag(flagName:String, toggle:Bool):Dynamic
Generic interface to toggle audio functionality, with auto-reset on script termination and support for multiple script threads
Flags used in game scripts: | Flag Name | Description of Usage | | ----- | -------- | | ActivateSwitchWheelAudio | | | AllowAmbientSpeechInSlowMo | | | AllowCutsceneOverScreenFade | | | AllowForceRadioAfterRetune | | | AllowPainAndAmbientSpeechToPlayDuringCutscene | | | AllowPlayerAIOnMission | | | AllowPoliceScannerWhenPlayerHasNoControl | | | AllowRadioDuringSwitch | | | AllowRadioOverScreenFade | | | AllowScoreAndRadio | | | AllowScriptedSpeechInSlowMo | | | AvoidMissionCompleteDelay | | | DisableAbortConversationForDeathAndInjury | | | DisableAbortConversationForRagdoll | | | DisableBarks | | | DisableFlightMusic | | | DisableNPCHeadsetSpeechAttenuation | | | DisableReplayScriptStreamRecording | | | EnableHeadsetBeep | | | EnableMissileLockWarningForAllVehicles | | | ForceConversationInterrupt | | | ForceSeamlessRadioSwitch | | | ForceSniperAudio | | | FrontendRadioDisabled | | | HoldMissionCompleteWhenPrepared | | | IsDirectorModeActive | Allows you to play speech infinitely without any pauses like in Director Mode. | | IsPlayerOnMissionForSpeech | | | ListenerReverbDisabled | | | LoadMPData | | | MobileRadioInGame | | | OnlyAllowScriptTriggerPoliceScanner | | | PlayerOnDLCHeist4Island | | | PlayMenuMusic | | | PoliceScannerDisabled | | | ScriptedConvListenerMaySpeak | | | SpeechDucksScore | | | SuppressPlayerScubaBreathing | | | UseQuietSceneSoftVersion | | | WantedMusicDisabled | | | WantedMusicOnMission | |
All flag IDs and hashes:
ID: 01 | Hash: 0x20A7858F
ID: 02 | Hash: 0xA11C2259
ID: 03 | Hash: 0x08DE4700
ID: 04 | Hash: 0x989F652F
ID: 05 | Hash: 0x3C9E76BA
ID: 06 | Hash: 0xA805FEB0
ID: 07 | Hash: 0x4B94EA26
ID: 08 | Hash: 0x803ACD34
ID: 09 | Hash: 0x7C741226
ID: 10 | Hash: 0x31DB9EBD
ID: 11 | Hash: 0xDF386F18
ID: 12 | Hash: 0x669CED42
ID: 13 | Hash: 0x51F22743
ID: 14 | Hash: 0x2052B35C
ID: 15 | Hash: 0x071472DC
ID: 16 | Hash: 0xF9928BCC
ID: 17 | Hash: 0x7ADBDD48
ID: 18 | Hash: 0xA959BA1A
ID: 19 | Hash: 0xBBE89B60
ID: 20 | Hash: 0x87A08871
ID: 21 | Hash: 0xED1057CE
ID: 22 | Hash: 0x1584AD7A
ID: 23 | Hash: 0x8582CFCB
ID: 24 | Hash: 0x7E5E2FB0
ID: 25 | Hash: 0xAE4F72DB
ID: 26 | Hash: 0x5D16D1FA
ID: 27 | Hash: 0x06B2F4B8
ID: 28 | Hash: 0x5D4CDC96
ID: 29 | Hash: 0x8B5A48BA
ID: 30 | Hash: 0x98FBD539
ID: 31 | Hash: 0xD8CB0473
ID: 32 | Hash: 0x5CBB4874
ID: 33 | Hash: 0x2E9F93A9
ID: 34 | Hash: 0xD93BEA86
ID: 35 | Hash: 0x92109B7D
ID: 36 | Hash: 0xB7EC9E4D
ID: 37 | Hash: 0xCABDBB1D
ID: 38 | Hash: 0xB3FD4A52
ID: 39 | Hash: 0x370D94E5
ID: 40 | Hash: 0xA0F7938F
ID: 41 | Hash: 0xCBE1CE81
ID: 42 | Hash: 0xC27F1271
ID: 43 | Hash: 0x9E3258EB
ID: 44 | Hash: 0x551CDA5B
ID: 45 | Hash: 0xCB6D663C
ID: 46 | Hash: 0x7DACE87F
ID: 47 | Hash: 0xF9DE416F
ID: 48 | Hash: 0x882E6E9E
ID: 49 | Hash: 0x16B447E7
ID: 50 | Hash: 0xBD867739
ID: 51 | Hash: 0xA3A58604
ID: 52 | Hash: 0x7E046BBC
ID: 53 | Hash: 0xD95FDB98
ID: 54 | Hash: 0x5842C0ED
ID: 55 | Hash: 0x285FECC6
ID: 56 | Hash: 0x9351AC43
ID: 57 | Hash: 0x50032E75
ID: 58 | Hash: 0xAE6D0D59
ID: 59 | Hash: 0xD6351785
ID: 60 | Hash: 0xD25D71BC
ID: 61 | Hash: 0x1F7F6423
ID: 62 | Hash: 0xE24C3AA6
ID: 63 | Hash: 0xBFFDD2B7staticsetAudioSceneVariable(scene:String, variableName:String, value:Float):Dynamic
staticsetAudioScriptCleanupTime(timeMs:Int):Dynamic
Set a delay in milliseconds for the audio to be cleaned up when the script finishes.
staticsetAudioSpecialEffectMode(mode:Int):Dynamic
Needs to be called every frame.
enum eAudSpecialEffectMode
{
kSpecialEffectModeNormal = 0,
kSpecialEffectModeUnderwater = 1,
kSpecialEffectModeStoned = 2,
kSpecialEffectModePauseMenu = 3,
kSpecialEffectModeSlowMotion = 4,
kSpecialEffectModeDrunkStage01 = 5,
kSpecialEffectModeDrunkStage02 = 6,
kSpecialEffectModeDrunkStage03 = 7,
NUM_AUDSPECIALEFFECTMODE
};staticsetAudioVehiclePriority(vehicle:Dynamic, priority:Int):Dynamic
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,
}staticsetConversationAudioControlledByAnim(enable:Bool):Dynamic
Sets whether or not scripted conversation flow should be controlled by anim triggers
staticsetConversationAudioPlaceholder(isPlaceHolder:Bool):Dynamic
Used to determine whether conversation should use robot speech or not
staticsetCustomRadioTrackList(radioStation:String, trackListName:String, forceNow:Bool):Dynamic
Queues up a custom track list on the specified radio station. The content in the track list will be played as soon as possible. The station does not have to be frozen.
staticsetCutsceneAudioOverride(name:String):Dynamic
All occurrences found in b617d, sorted alphabetically and identical lines removed:
AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_AK");
AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_CUSTOM");
AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_TOOTHLESS");
Add a suffix to the cutscene audio name. Call before loading the cutscene.
staticsetEmitterRadioStation(emitterName:String, radioStation:String):Dynamic
Retunes a named static emitter to the specified station
staticsetEntityForNullConvPed(speakerConversationIndex:Int, entity:Dynamic):Dynamic
staticsetGlobalRadioSignalLevel(signalLevel:Float):Dynamic
Sets the global radio signal level, lower value will cause radio static. Used only a handful of times in scripts.
staticsetGpsActive(active:Bool):Dynamic
staticsetHornEnabled(vehicle:Dynamic, toggle:Bool):Dynamic
staticsetInitialPlayerStation(radioStation:String):Dynamic
staticsetMicrophonePosition(p0:Bool, x1:Float, y1:Float, z1:Float, x2:Float, y2:Float, z2:Float, x3:Float, y3:Float, z3:Float):Dynamic
If this is the correct name, what microphone? I know your TV isn't going to reach out and adjust your headset so.. staticsetMobilePhoneRadioState(state:Bool):Dynamic
staticsetMobileRadioEnabledDuringGameplay(toggle:Bool):Dynamic
staticsetPedRaceAndVoiceGroup(ped:Dynamic, pedRace:Int, pvgHash:Int):Dynamic
staticsetPedVoiceFull(ped:Dynamic):Dynamic
Calls the same internal function _SET_PED_VOICE_GROUP calls, but passes voiceGroupHash (defined as a parameter in the referenced native) as 0.
staticsetPedWallaDensity(density:Float, applyValue:Float):Dynamic
Overrides the calculated ped density that is used to modulate the ambient ped walla sounds (in exteriors only)
If you want to use this for interiors, use SET_PED_INTERIOR_WALLA_DENSITY
staticsetPlayerAngry(ped:Dynamic, isAngry:Bool):Dynamic
Sets a player ped to use his ANGRY speech contexts
staticsetPlayerVehicleAlarmAudioActive(vehicle:Dynamic, active:Bool):Dynamic
Enable player vehicle specific alarm disarm/arm sound triggering
staticsetPortalSettingsOverride(oldPortalSettingsName:String, newPortalSettingsName:String):Dynamic
staticsetPositionForNullConvPed(speakerConversationIndex:Int, x:Float, y:Float, z:Float):Dynamic
staticsetPositionedPlayerVehicleRadioEmitterEnabled(enabled:Bool):Dynamic
staticsetRadioAutoUnfreeze(toggle:Bool):Dynamic
staticsetRadioFrontendFadeTime(fadeTime:Float):Dynamic
staticsetRadioStationMusicOnly(radioStation:String, toggle:Bool):Dynamic
6 calls in the b617d scripts, removed identical lines:
AUDIO::SET_RADIO_STATION_MUSIC_ONLY("RADIO_01_CLASS_ROCK", 1);
AUDIO::SET_RADIO_STATION_MUSIC_ONLY(AUDIO::GET_RADIO_STATION_NAME(10), 0);
AUDIO::SET_RADIO_STATION_MUSIC_ONLY(AUDIO::GET_RADIO_STATION_NAME(10), 1);staticsetRadioTrack(radioStation:String, radioTrack:String):Dynamic
Only found this one in the decompiled scripts:
AUDIO::SET_RADIO_TRACK("RADIO_03_HIPHOP_NEW", "ARM1_RADIO_STARTS"); staticsetScriptUpdateDoorAudio(doorHash:Int, toggle:Bool):Dynamic
staticsetSirenWithNoDriver(vehicle:Dynamic, toggle:Bool):Dynamic
staticsetStaticEmitterEnabled(emitterName:String, toggle:Bool):Dynamic
Example:
AUDIO::SET_STATIC_EMITTER_ENABLED((Any*)"LOS_SANTOS_VANILLA_UNICORN_01_STAGE", false); AUDIO::SET_STATIC_EMITTER_ENABLED((Any*)"LOS_SANTOS_VANILLA_UNICORN_02_MAIN_ROOM", false); AUDIO::SET_STATIC_EMITTER_ENABLED((Any*)"LOS_SANTOS_VANILLA_UNICORN_03_BACK_ROOM", false);
This turns off surrounding sounds not connected directly to peds.staticsetUserRadioControlEnabled(toggle:Bool):Dynamic
staticsetVariableOnSound(soundId:Int, variableName:String, value:Float):Dynamic
staticsetVariableOnStream(p0:String, p1:Float):Dynamic
From the scripts, p0:
"ArmWrestlingIntensity",
"INOUT",
"Monkey_Stream",
"ZoomLevel" staticsetVariableOnUnderWaterStream(variableName:String, value:Float):Dynamic
AUDIO::SET_VARIABLE_ON_UNDER_WATER_STREAM("inTunnel", 1.0);
AUDIO::SET_VARIABLE_ON_UNDER_WATER_STREAM("inTunnel", 0.0);staticsetVehRadioStation(vehicle:Dynamic, radioStation:String):Dynamic
Find the radio station list here
staticsetVehicleAudioBodyDamageFactor(vehicle:Dynamic, intensity:Float):Dynamic
Vehicle will make a 'rattling' noise when decelerating
staticsetVehicleAudioEngineDamageFactor(vehicle:Dynamic, damageFactor:Float):Dynamic
staticsetVehicleBoostActive(vehicle:Dynamic, toggle:Bool):Dynamic
SET_VEHICLE_BOOST_ACTIVE(vehicle, 1, 0);
SET_VEHICLE_BOOST_ACTIVE(vehicle, 0, 0);
Will give a boost-soundeffect. staticsetVehicleRadioEnabled(vehicle:Dynamic, toggle:Bool):Dynamic
can't seem to enable radio on cop cars etc staticsetVehicleRadioLoud(vehicle:Dynamic, loud:Bool):Dynamic
staticsetVehicleStartupRevSound(vehicle:Dynamic, soundName:String, setName:String):Dynamic
Overrides the vehicle's startup engine rev sound.
You can reset this with RESET_VEHICLE_STARTUP_REV_SOUND
staticskipRadioForward():Dynamic
staticskipToNextScriptedConversationLine():Dynamic
staticstartAlarm(alarmName:String, skipStartup:Bool):Dynamic
You should call PREPARE_ALARM and wait for its value to be true before using this
staticstartAudioScene(scene:String):Bool
Used to prepare a scene where the surrounding sound is muted or a bit changed. This does not play any sound.
List of all usable scene names found in b617d. Sorted alphabetically and identical names removed: pastebin.com/MtM9N9CC staticstartPreloadedConversation():Dynamic
For use with PRELOAD_SCRIPT_CONVERSATION and GET_IS_PRELOADED_CONVERSATION_READY
staticstartScriptConversation(displaySubtitles:Bool, addToBriefScreen:Bool, cloneConversation:Bool, interruptible:Bool):Dynamic
staticstartScriptPhoneConversation(displaySubtitles:Bool, addToBriefScreen:Bool):Dynamic
staticstopAlarm(alarmName:String, instantStop:Bool):Dynamic
staticstopAllAlarms(instantStop:Bool):Dynamic
staticstopAudioScene(sceneName:String):Dynamic
Stops the named mixing scene (which was previously started by this script)
staticstopCurrentPlayingSpeech(ped:Dynamic):Dynamic
Stops currently playing speech (Pain, ambient, scripted, breathing).
staticstopPedSpeaking(ped:Dynamic, shouldDisable:Bool):Dynamic
This doesn't stop a piece of dialogue that has been triggered.
This stops the ability to force ambient dialogue if set to true - however setting it to false, then triggering a context, then setting it to true again will allow this.
Nb. This does not sync over the network, it will only affect peds locally. Use STOP_PED_SPEAKING_SYNCED if you need to affect peds on other machines too.
staticstopPedSpeakingSynced(ped:Dynamic, shouldDisable:Bool):Dynamic
This doesn't stop a piece of dialogue that has been triggered.
This stops the ability to force ambient dialogue if set to true - however setting it to false, then triggering a context, then setting it to true again will allow this.
The ped will also be prevented from speaking on remote machines. Use STOP_PED_SPEAKING if you just want to affect the local machine.
staticstopScriptedConversation(finishCurrentLine:Bool):Int
staticstopSound(soundId:Int):Dynamic
Stops the sound from currently playing, there isn't a way to resume a sound after stopping it.
staticstopStream():Dynamic
staticstopSynchronizedAudioEvent(p0:Dynamic):Bool
statictriggerMusicEvent(eventName:String):Bool
List of all usable event names found in b617d used with this native. Sorted alphabetically and identical names removed: pastebin.com/RzDFmB1W
All music event names found in the b617d scripts: pastebin.com/GnYt0R3P staticunblockSpeechContextGroup(groupName:String):Dynamic
NativeDB Introduced: v1493
Removes all instances of a given context block.
staticunfreezeRadioStation(radioStation:String):Dynamic
staticunlockMissionNewsStory(newsStory:Int):Dynamic
staticunlockRadioStationTrackList(radioStation:String, trackListName:String):Dynamic
AUDIO::UNLOCK_RADIO_STATION_TRACK_LIST("RADIO_16_SILVERLAKE", "MIRRORPARK_LOCKED");staticunregisterScriptWithAudio():Dynamic
This native does absolutely nothing, just a nullsub
On last-gen this just runs blr and this func is called by several other functions other then the native's table. staticunrequestTennisBanks():Dynamic
Unloads tennis vocalization banks loaded with REQUEST_TENNIS_BANKS.
staticupdateSoundCoord(soundId:Int, x:Float, y:Float, z:Float):Dynamic
Updates a playing sounds absolute position.
staticupdateUnlockableDjRadioTracks(allowTrackReprioritization:Bool):Dynamic
Unlocks any available DJ radio tracks based on the tuneable status
NativeDB Introduced: v1493 staticuseFootstepScriptSweeteners(ped:Dynamic, useSweetner:Bool, soundSetHash:Int):Dynamic
Allows script to trigger a sweetener footstep sound