From the reference libraryRedM

AUDIO Natives - Part 1 of 5

natives/AUDIO/AUDIO_natives_part1.md

AUDIO Natives - Part 1 of 5

Red Dead Redemption 3 Native Functions Reference

Namespace: AUDIO
Natives in this file: 50
Total natives in namespace: 221
Generated from: RDR3natives JSON data


AUDIO_TRIGGER_EXPLOSION

Property Value
Native Name AUDIO_TRIGGER_EXPLOSION
Hash 0x374F0E716BFCDE82
Return Type void
Build 1207
Parameters name (char*), x (float), y (float), z (float)

Usage

Lua (Direct):

AudioTriggerExplosion(name, x, y, z)

Lua (Hash):

Citizen.InvokeNative(0x374F0E716BFCDE82, name, x, y, z)

CLEAR_CONVERSATION_HISTORY

Property Value
Native Name CLEAR_CONVERSATION_HISTORY
Hash 0x33D51F801CB16E4F
Return Type void
Build 1207
Parameters None

Usage

Lua (Direct):

ClearConversationHistory()

Lua (Hash):

Citizen.InvokeNative(0x33D51F801CB16E4F, )

IS_SCRIPTED_CONVERSATION_PLAYING

Property Value
Native Name IS_SCRIPTED_CONVERSATION_PLAYING
Hash 0x1ECC76792F661CF5
Return Type BOOL
Build 1207
Parameters p0 (char*)

Usage

Lua (Direct):

local result = IsScriptedConversationPlaying(p0)

Lua (Hash):

local result = Citizen.InvokeNative(0x1ECC76792F661CF5, p0)

PLAY_SOUND_FROM_ENTITY

Property Value
Native Name PLAY_SOUND_FROM_ENTITY
Hash 0x6FB1DA3CA9DA7D90
Return Type void
Build 1207
Parameters audioName (char*), entity (Entity), audioRef (char*), isNetwork (BOOL), p4 (Any), p5 (Any)

Usage

Lua (Direct):

PlaySoundFromEntity(audioName, entity, audioRef, isNetwork, p4, p5)

Lua (Hash):

Citizen.InvokeNative(0x6FB1DA3CA9DA7D90, audioName, entity, audioRef, isNetwork, p4, p5)

PREPARE_SOUND

Property Value
Native Name PREPARE_SOUND
Hash 0xE368E8422C860BA7
Return Type BOOL
Build 1207
Parameters soundName (char*), soundsetName (char*), soundId (int)

Description: soundId maybe be incorrect name for param p2, in the decompiles is always -2

Usage

Lua (Direct):

local result = PrepareSound(soundName, soundsetName, soundId)

Lua (Hash):

local result = Citizen.InvokeNative(0xE368E8422C860BA7, soundName, soundsetName, soundId)

PREPARE_SOUNDSET

Property Value
Native Name PREPARE_SOUNDSET
Hash 0xD9130842D7226045
Return Type BOOL
Build 1207
Parameters soundsetName (char*), p1 (BOOL)

Description: https://github.com/femga/rdr3_discoveries/tree/master/audio/soundsets

Usage

Lua (Direct):

local result = PrepareSoundset(soundsetName, p1)

Lua (Hash):

local result = Citizen.InvokeNative(0xD9130842D7226045, soundsetName, p1)

PREPARE_SOUND_WITH_ENTITY

Property Value
Native Name PREPARE_SOUND_WITH_ENTITY
Hash 0x4AD019591E94C064
Return Type BOOL
Build 1207
Parameters soundName (char*), entity (Entity), soundsetName (char*), soundId (int)

Usage

Lua (Direct):

local result = PrepareSoundWithEntity(soundName, entity, soundsetName, soundId)

Lua (Hash):

local result = Citizen.InvokeNative(0x4AD019591E94C064, soundName, entity, soundsetName, soundId)

ADD_ENTITY_TO_AUDIO_MIX_GROUP

Property Value
Native Name ADD_ENTITY_TO_AUDIO_MIX_GROUP
Hash 0x153973AB99FE8980
Return Type void
Build 1207
Parameters entity (Entity), groupName (char*), fadeIn (float)

Description: ``` All found occurrences in b678d: pastebin.com/ceu67jz8


### Usage

**Lua (Direct):**
```lua
AddEntityToAudioMixGroup(entity, groupName, fadeIn)

Lua (Hash):

Citizen.InvokeNative(0x153973AB99FE8980, entity, groupName, fadeIn)

ADD_PED_TO_CONVERSATION

Property Value
Native Name ADD_PED_TO_CONVERSATION
Hash 0x95D9F4BC443956E7
Return Type void
Build 1207
Parameters speakerConversationIndex (int), ped (Ped), voiceName (char*)

Usage

Lua (Direct):

AddPedToConversation(speakerConversationIndex, ped, voiceName)

Lua (Hash):

Citizen.InvokeNative(0x95D9F4BC443956E7, speakerConversationIndex, ped, voiceName)

AUDIO_IS_MUSIC_PLAYING

Property Value
Native Name AUDIO_IS_SCRIPTED_MUSIC_PLAYING
Hash 0x845FFC3A4FEEFA3E
Return Type BOOL
Build 1207

Description: Old name: AUDIO_IS_SCRIPTED_MUSIC_PLAYING

Usage

Lua (Direct):

local result = AudioIsScriptedMusicPlaying()

Lua (Hash):

local result = Citizen.InvokeNative(0x845FFC3A4FEEFA3E)

CANCEL_MUSIC_EVENT

Property Value
Native Name CANCEL_MUSIC_EVENT
Hash 0x5B17A90291133DA5
Return Type BOOL
Build 1207
Parameters eventName (char*)

Description: ``` All music event names found in the b617d scripts: pastebin.com/GnYt0R3P


### Parameters
- **`eventName`** (`char*`) — the name of the event to cancel

### Usage

**Lua (Direct):**
```lua
local result = CancelMusicEvent(eventName)

Lua (Hash):

local result = Citizen.InvokeNative(0x5B17A90291133DA5, eventName)

CLEAR_AMBIENT_ZONE_LIST_STATE

Property Value
Native Name CLEAR_AMBIENT_ZONE_LIST_STATE
Hash 0x120C48C614909FA4
Return Type void
Build 1207
Parameters zoneListName (char*), forceUpdate (BOOL)

Description: 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.

Parameters

  • zoneListName (char*) — The zone name to clear
  • forceUpdate (BOOL) — Whether ot not to force a zone to become disabled even if its currently active

Usage

Lua (Direct):

ClearAmbientZoneListState(zoneListName, forceUpdate)

Lua (Hash):

Citizen.InvokeNative(0x120C48C614909FA4, zoneListName, forceUpdate)

CLEAR_AMBIENT_ZONE_STATE

Property Value
Native Name CLEAR_AMBIENT_ZONE_STATE
Hash 0x218DD44AAAC964FF
Return Type void
Build 1207
Parameters zoneName (char*), forceUpdate (BOOL)

Description: 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.

Parameters

  • zoneName (char*) — the zone name to clear
  • forceUpdate (BOOL) — Whether ot not to force a zone to become disabled even if its currently active

Usage

Lua (Direct):

ClearAmbientZoneState(zoneName, forceUpdate)

Lua (Hash):

Citizen.InvokeNative(0x218DD44AAAC964FF, zoneName, forceUpdate)

CREATE_NEW_SCRIPTED_CONVERSATION

Property Value
Native Name CREATE_NEW_SCRIPTED_CONVERSATION
Hash 0xD2C91A0B572AAE56
Return Type void
Build 1207

Usage

Lua (Direct):

CreateNewScriptedConversation()

Lua (Hash):

Citizen.InvokeNative(0xD2C91A0B572AAE56)

DISABLE_PED_PAIN_AUDIO

Property Value
Native Name DISABLE_PED_PAIN_AUDIO
Hash 0xA9A41C1E940FB0E8
Return Type void
Build 1207
Parameters ped (Ped), shouldDisable (BOOL)

Usage

Lua (Direct):

DisablePedPainAudio(ped, shouldDisable)

Lua (Hash):

Citizen.InvokeNative(0xA9A41C1E940FB0E8, ped, shouldDisable)

DOES_CONTEXT_EXIST_FOR_THIS_PED

Property Value
Native Name DOES_CONTEXT_EXIST_FOR_THIS_PED
Hash 0x49B99BF3FDA89A7A
Return Type BOOL
Build 1207
Parameters ped (Ped), speechName (char*), allowBackupPVGs (BOOL)

Description: 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

Usage

Lua (Direct):

local result = DoesContextExistForThisPed(ped, speechName, allowBackupPVGs)

Lua (Hash):

local result = Citizen.InvokeNative(0x49B99BF3FDA89A7A, ped, speechName, allowBackupPVGs)

FORCE_PED_PANIC_WALLA

Property Value
Native Name FORCE_PED_PANIC_WALLA
Hash 0x062D5EAD4DA2FA6A
Return Type void
Build 1207

Description: Forces the ambient peds into their panic walla state

Usage

Lua (Direct):

ForcePedPanicWalla()

Lua (Hash):

Citizen.InvokeNative(0x062D5EAD4DA2FA6A)

FORCE_USE_AUDIO_GAME_OBJECT

Property Value
Native Name FORCE_USE_AUDIO_GAME_OBJECT
Hash 0x4F0C413926060B38
Return Type void
Build 1207
Parameters vehicle (Vehicle), gameObjectName (char*)

Description: This native sets the audio to the specific vehicle hash's audioNameHash.

Usage

Lua (Direct):

ForceUseAudioGameObject(vehicle, gameObjectName)

Lua (Hash):

Citizen.InvokeNative(0x4F0C413926060B38, vehicle, gameObjectName)

GET_CURRENT_SCRIPTED_CONVERSATION_LINE

Property Value
Native Name GET_CURRENT_SCRIPTED_CONVERSATION_LINE
Hash 0x480357EE890C295A
Return Type int
Build 1207

Usage

Lua (Direct):

local result = GetCurrentScriptedConversationLine()

Lua (Hash):

local result = Citizen.InvokeNative(0x480357EE890C295A)

GET_MUSIC_PLAYTIME

Property Value
Native Name GET_MUSIC_PLAYTIME
Hash 0xE7A0D23DC414507B
Return Type int
Build 1207

Usage

Lua (Direct):

local result = GetMusicPlaytime()

Lua (Hash):

local result = Citizen.InvokeNative(0xE7A0D23DC414507B)

GET_SOUND_ID

Property Value
Native Name GET_SOUND_ID
Hash 0x430386FE9BF80B45
Return Type int
Build 1207

Description: 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.

Usage

Lua (Direct):

local result = GetSoundId()

Lua (Hash):

local result = Citizen.InvokeNative(0x430386FE9BF80B45)

IS_AMBIENT_SPEECH_DISABLED

Property Value
Native Name IS_AMBIENT_SPEECH_DISABLED
Hash 0x932C2D096A2C3FFF
Return Type BOOL
Build 1207
Parameters ped (Ped)

Usage

Lua (Direct):

local result = IsAmbientSpeechDisabled(ped)

Lua (Hash):

local result = Citizen.InvokeNative(0x932C2D096A2C3FFF, ped)

IS_AMBIENT_SPEECH_PLAYING

Property Value
Native Name IS_AMBIENT_SPEECH_PLAYING
Hash 0x9072C8B49907BFAD
Return Type BOOL
Build 1207
Parameters ped (Ped)

Usage

Lua (Direct):

local result = IsAmbientSpeechPlaying(ped)

Lua (Hash):

local result = Citizen.InvokeNative(0x9072C8B49907BFAD, ped)

IS_ANIMAL_VOCALIZATION_PLAYING

Property Value
Native Name IS_ANIMAL_VOCALIZATION_PLAYING
Hash 0xC265DF9FB44A9FBD
Return Type BOOL
Build 1207
Parameters pedHandle (Ped)

Usage

Lua (Direct):

local result = IsAnimalVocalizationPlaying(pedHandle)

Lua (Hash):

local result = Citizen.InvokeNative(0xC265DF9FB44A9FBD, pedHandle)

IS_ANY_SPEECH_PLAYING

Property Value
Native Name IS_ANY_SPEECH_PLAYING
Hash 0x729072355FA39EC9
Return Type BOOL
Build 1207
Parameters ped (Ped)

Usage

Lua (Direct):

local result = IsAnySpeechPlaying(ped)

Lua (Hash):

local result = Citizen.InvokeNative(0x729072355FA39EC9, ped)

IS_AUDIO_SCENE_ACTIVE

Property Value
Native Name IS_AUDIO_SCENE_ACTIVE
Hash 0xB65B60556E2A9225
Return Type BOOL
Build 1207
Parameters scene (char*)

Parameters

  • scene (char*) — the name of the scene

Usage

Lua (Direct):

local result = IsAudioSceneActive(scene)

Lua (Hash):

local result = Citizen.InvokeNative(0xB65B60556E2A9225, scene)

IS_HORN_ACTIVE

Property Value
Native Name IS_HORN_ACTIVE
Hash 0x9D6BFC12B05C6121
Return Type BOOL
Build 1207
Parameters vehicle (Vehicle)

Description: Checks whether the horn of a vehicle is currently played.

Usage

Lua (Direct):

local result = IsHornActive(vehicle)

Lua (Hash):

local result = Citizen.InvokeNative(0x9D6BFC12B05C6121, vehicle)

IS_PED_IN_CURRENT_CONVERSATION

Property Value
Native Name IS_PED_IN_CURRENT_CONVERSATION
Hash 0x049E937F18F4020C
Return Type BOOL
Build 1207
Parameters ped (Ped)

Usage

Lua (Direct):

local result = IsPedInCurrentConversation(ped)

Lua (Hash):

local result = Citizen.InvokeNative(0x049E937F18F4020C, ped)

IS_SCRIPTED_CONVERSATION_LOADED

Property Value
Native Name IS_SCRIPTED_CONVERSATION_LOADED
Hash 0xDF0D54BE7A776737
Return Type BOOL
Build 1207

Usage

Lua (Direct):

local result = IsScriptedConversationLoaded()

Lua (Hash):

local result = Citizen.InvokeNative(0xDF0D54BE7A776737)

IS_SCRIPTED_SPEECH_PLAYING

Property Value
Native Name IS_SCRIPTED_SPEECH_PLAYING
Hash 0xCC9AA18DCC7084F4
Return Type BOOL
Build 1207
Parameters ped (Ped)

Usage

Lua (Direct):

local result = IsScriptedSpeechPlaying(ped)

Lua (Hash):

local result = Citizen.InvokeNative(0xCC9AA18DCC7084F4, ped)

IS_STREAM_PLAYING

Property Value
Native Name IS_STREAM_PLAYING
Hash 0xD11FA52EB849D978
Return Type BOOL
Build 1207

Usage

Lua (Direct):

local result = IsStreamPlaying()

Lua (Hash):

local result = Citizen.InvokeNative(0xD11FA52EB849D978)

LOAD_STREAM

Property Value
Native Name LOAD_STREAM
Hash 0x1F1F957154EC51DF
Return Type BOOL
Build 1207
Parameters streamName (char*), soundSet (char*)

Description: 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.

Parameters

  • streamName (char*)
  • soundSet (char*) — an optional sound set, default is null

Usage

Lua (Direct):

local result = LoadStream(streamName, soundSet)

Lua (Hash):

local result = Citizen.InvokeNative(0x1F1F957154EC51DF, streamName, soundSet)

PAUSE_SCRIPTED_CONVERSATION

Property Value
Native Name PAUSE_SCRIPTED_CONVERSATION
Hash 0x8530AD776CD72B12
Return Type void
Build 1207
Parameters finishCurrentLine (BOOL)

Description: To resume the conversation use RESTART_SCRIPTED_CONVERSATION

Usage

Lua (Direct):

PauseScriptedConversation(finishCurrentLine)

Lua (Hash):

Citizen.InvokeNative(0x8530AD776CD72B12, finishCurrentLine)

PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE

Property Value
Native Name PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE
Hash 0xED640017ED337E45
Return Type void
Build 1207
Parameters speechName (char*), voiceName (char*), x (float), y (float), z (float), speechParam (char*)

Description: Old name: _PLAY_AMBIENT_SPEECH_AT_COORDS

Parameters

Usage

Lua (Direct):

PlayAmbientSpeechFromPositionNative(speechName, voiceName, x, y, z, speechParam)

Lua (Hash):

Citizen.InvokeNative(0xED640017ED337E45, speechName, voiceName, x, y, z, speechParam)

PLAY_ANIMAL_VOCALIZATION

Property Value
Native Name PLAY_ANIMAL_VOCALIZATION
Hash 0xEE066C7006C49C0A
Return Type void
Build 1207
Parameters pedHandle (Ped), animalType (int), speechName (char*)

Description: ```cpp 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 }


### Usage

**Lua (Direct):**
```lua
PlayAnimalVocalization(pedHandle, animalType, speechName)

Lua (Hash):

Citizen.InvokeNative(0xEE066C7006C49C0A, pedHandle, animalType, speechName)

PLAY_END_CREDITS_MUSIC

Property Value
Native Name PLAY_END_CREDITS_MUSIC
Hash 0xCD536C4D33DCC900
Return Type void
Build 1207
Parameters bActive (BOOL)

Usage

Lua (Direct):

PlayEndCreditsMusic(bActive)

Lua (Hash):

Citizen.InvokeNative(0xCD536C4D33DCC900, bActive)

PLAY_PAIN

Property Value
Native Name PLAY_PAIN
Hash 0xBC9AE166038A5CEC
Return Type void
Build 1207
Parameters ped (Ped), damageReason (int), rawDamage (float)

Description: 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
}

Parameters

  • ped (Ped) — The ped entity.
  • damageReason (int) — The damage reason/type, refer to eAudDamageReason
  • rawDamage (float) — Damage value, defaults to 0.0

Usage

Lua (Direct):

PlayPain(ped, damageReason, rawDamage)

Lua (Hash):

Citizen.InvokeNative(0xBC9AE166038A5CEC, ped, damageReason, rawDamage)

Examples

-- Play ON_FIRE (8) for all nearby peds, don't create an event (last parameter set to false)
for _, ped in ipairs(GetGamePool('CPed')) do
    PlayPain(ped, 8, 0.0, false)
end

PLAY_PED_AMBIENT_SPEECH_NATIVE

Property Value
Native Name PLAY_PED_AMBIENT_SPEECH_NATIVE
Hash 0x8E04FEDD28D42462
Return Type void
Build 1207
Parameters ped (Ped), speechName (char*), speechParam (char*)

Description: Plays ambient speech; see also PLAY_PED_AMBIENT_SPEECH_AND_CLONE_NATIVE. Some speeches only play on certain ped models.

A full list of speech names can be found here.

static const char *SpeechParams[] = {
    "SPEECH_PARAMS_ADD_BLIP",
    "SPEECH_PARAMS_ADD_BLIP_ALLOW_REPEAT",
    "SPEECH_PARAMS_ADD_BLIP_FORCE",
    "SPEECH_PARAMS_ADD_BLIP_INTERRUPT",
    "SPEECH_PARAMS_ADD_BLIP_INTERRUPT_FORCE",
    "SPEECH_PARAMS_ADD_BLIP_SHOUTED",
    "SPEECH_PARAMS_ADD_BLIP_SHOUTED_FORCE",
    "SPEECH_PARAMS_ALLOW_REPEAT",
    "SPEECH_PARAMS_BEAT",
    "SPEECH_PARAMS_FORCE",
    "SPEECH_PARAMS_FORCE_FRONTEND",
    "SPEECH_PARAMS_FORCE_HELI",
    "SPEECH_PARAMS_FORCE_MEGAPHONE",
    "SPEECH_PARAMS_FORCE_NO_REPEAT_FRONTEND",
    "SPEECH_PARAMS_FORCE_NORMAL",
    "SPEECH_PARAMS_FORCE_NORMAL_CLEAR",
    "SPEECH_PARAMS_FORCE_NORMAL_CRITICAL",
    "SPEECH_PARAMS_FORCE_PRELOAD_ONLY",
    "SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED",
    "SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CLEAR",
    "SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CRITICAL",
    "SPEECH_PARAMS_FORCE_SHOUTED",
    "SPEECH_PARAMS_FORCE_SHOUTED_CLEAR",
    "SPEECH_PARAMS_FORCE_SHOUTED_CRITICAL",
    "SPEECH_PARAMS_HELI",
    "SPEECH_PARAMS_INTERRUPT",
    "SPEECH_PARAMS_INTERRUPT_FRONTEND",
    "SPEECH_PARAMS_INTERRUPT_NO_FORCE",
    "SPEECH_PARAMS_INTERRUPT_NO_FORCE_FRONTEND",
    "SPEECH_PARAMS_INTERRUPT_SHOUTED",
    "SPEECH_PARAMS_INTERRUPT_SHOUTED_CLEAR",
    "SPEECH_PARAMS_INTERRUPT_SHOUTED_CRITICAL",
    "SPEECH_PARAMS_MEGAPHONE",
    "SPEECH_PARAMS_SHOUTED",
    "SPEECH_PARAMS_SHOUTED_CLEAR",
    "SPEECH_PARAMS_SHOUTED_CRITICAL",
    "SPEECH_PARAMS_STANDARD"
}

Parameters

  • ped (Ped) — The ped to play the ambient speech.
  • speechName (char*) — Name of the speech to play, eg. "GENERIC_HI".
  • speechParam (char*) — Name of the speechParam rage game object to look to for various details on how the speech should be played.

Usage

Lua (Direct):

PlayPedAmbientSpeechNative(ped, speechName, speechParam)

Lua (Hash):

Citizen.InvokeNative(0x8E04FEDD28D42462, ped, speechName, speechParam)

PLAY_SOUND

Property Value
Native Name PLAY_SOUND
Hash 0x7FF4944CC209192D
Return Type void
Build 1207
Parameters soundId (int), audioName (char*), audioRef (char*), p3 (BOOL), p4 (Any), p5 (BOOL)

Description: ``` All found occurrences in b617d, sorted alphabetically and identical lines removed: pastebin.com/A8Ny8AHZ


### Usage

**Lua (Direct):**
```lua
PlaySound(soundId, audioName, audioRef, p3, p4, p5)

Lua (Hash):

Citizen.InvokeNative(0x7FF4944CC209192D, soundId, audioName, audioRef, p3, p4, p5)

PLAY_SOUND_FRONTEND

Property Value
Native Name PLAY_SOUND_FRONTEND
Hash 0x67C540AA08E4A6F5
Return Type void
Build 1207
Parameters soundId (int), audioName (char*), audioRef (char*), p3 (BOOL)

Description: ``` List: https://pastebin.com/DCeRiaLJ All occurrences as of Cayo Perico Heist DLC (b2189), sorted alphabetically and identical lines removed: https://git.io/JtLxM


### Usage

**Lua (Direct):**
```lua
PlaySoundFrontend(soundId, audioName, audioRef, p3)

Lua (Hash):

Citizen.InvokeNative(0x67C540AA08E4A6F5, soundId, audioName, audioRef, p3)

PLAY_STREAM_FROM_PED

Property Value
Native Name PLAY_STREAM_FROM_PED
Hash 0x89049DD63C08B5D1
Return Type void
Build 1207
Parameters ped (Ped)

Description: Plays a preloaded stream back from the specified ped.

Usage

Lua (Direct):

PlayStreamFromPed(ped)

Lua (Hash):

Citizen.InvokeNative(0x89049DD63C08B5D1, ped)

PLAY_STREAM_FROM_POSITION

Property Value
Native Name PLAY_STREAM_FROM_POSITION
Hash 0x21442F412E8DE56B
Return Type void
Build 1207
Parameters x (float), y (float), z (float)

Description: Plays a preloaded stream back from the specified Vector3.

Usage

Lua (Direct):

PlayStreamFromPosition(x, y, z)

Lua (Hash):

Citizen.InvokeNative(0x21442F412E8DE56B, x, y, z)

PLAY_STREAM_FRONTEND

Property Value
Native Name PLAY_STREAM_FRONTEND
Hash 0x58FCE43488F9F5F4
Return Type void
Build 1207

Usage

Lua (Direct):

PlayStreamFrontend()

Lua (Hash):

Citizen.InvokeNative(0x58FCE43488F9F5F4)

PRELOAD_SCRIPT_CONVERSATION

Property Value
Native Name PRELOAD_SCRIPT_CONVERSATION
Hash 0x3B3CAD6166916D87
Return Type void
Build 1207
Parameters displaySubtitles (BOOL), addToBriefScreen (BOOL), cloneConversation (BOOL), interruptible (BOOL)

Description: 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

Parameters

  • displaySubtitles (BOOL)
  • addToBriefScreen (BOOL) — Defaults to true
  • cloneConversation (BOOL) — Defaults to false
  • interruptible (BOOL) — Defaults to true

Usage

Lua (Direct):

PreloadScriptConversation(displaySubtitles, addToBriefScreen, cloneConversation, interruptible)

Lua (Hash):

Citizen.InvokeNative(0x3B3CAD6166916D87, displaySubtitles, addToBriefScreen, cloneConversation, interruptible)

PREPARE_MUSIC_EVENT

Property Value
Native Name PREPARE_MUSIC_EVENT
Hash 0x1E5185B72EF5158A
Return Type BOOL
Build 1207
Parameters eventName (char*)

Description: Prepares the specified music event. Preparing it in advance will preload any required data so that it's ready to play immediately.

Usage

Lua (Direct):

local result = PrepareMusicEvent(eventName)

Lua (Hash):

local result = Citizen.InvokeNative(0x1E5185B72EF5158A, eventName)

REGISTER_SCRIPT_WITH_AUDIO

Property Value
Native Name REGISTER_SCRIPT_WITH_AUDIO
Hash 0xC6ED9D5092438D91
Return Type void
Build 1207
Parameters inChargeOfAudio (BOOL)

Description: This native does absolutely nothing, just a nullsub

Usage

Lua (Direct):

RegisterScriptWithAudio(inChargeOfAudio)

Lua (Hash):

Citizen.InvokeNative(0xC6ED9D5092438D91, inChargeOfAudio)

RELEASE_NAMED_SCRIPT_AUDIO_BANK

Property Value
Native Name RELEASE_NAMED_SCRIPT_AUDIO_BANK
Hash 0x77ED170667F50170
Return Type void
Build 1207
Parameters audioBank (char*)

Description: Unloads the specified audioBank

Usage

Lua (Direct):

ReleaseNamedScriptAudioBank(audioBank)

Lua (Hash):

Citizen.InvokeNative(0x77ED170667F50170, audioBank)

RELEASE_SCRIPT_AUDIO_BANK

Property Value
Native Name RELEASE_SCRIPT_AUDIO_BANK
Hash 0x7A2D8AD0A9EB9C3F
Return Type void
Build 1207

Description: Unloads all audio banks requested by this script.

Usage

Lua (Direct):

ReleaseScriptAudioBank()

Lua (Hash):

Citizen.InvokeNative(0x7A2D8AD0A9EB9C3F)

RELEASE_SOUND_ID

Property Value
Native Name RELEASE_SOUND_ID
Hash 0x353FC880830B88FA
Return Type void
Build 1207
Parameters soundId (int)

Description: This should be called once a sound has finished being manipulated by the script so that its SoundId can be released and re-used.

Usage

Lua (Direct):

ReleaseSoundId(soundId)

Lua (Hash):

Citizen.InvokeNative(0x353FC880830B88FA, soundId)

REMOVE_ENTITY_FROM_AUDIO_MIX_GROUP

Property Value
Native Name REMOVE_ENTITY_FROM_AUDIO_MIX_GROUP
Hash 0x18EB48CFC41F2EA0
Return Type void
Build 1207
Parameters entity (Entity), fadeOut (float)

Description: Removes an entity from its current mix group.

Parameters

  • entity (Entity)
  • fadeOut (float) — Defaults to 0.0

Usage

Lua (Direct):

RemoveEntityFromAudioMixGroup(entity, fadeOut)

Lua (Hash):

Citizen.InvokeNative(0x18EB48CFC41F2EA0, entity, fadeOut)
Back to documentation