diff --git a/AUDIO/OverrideMicrophoneSettings.md b/AUDIO/OverrideMicrophoneSettings.md index 3aed59ca8..43955de27 100644 --- a/AUDIO/OverrideMicrophoneSettings.md +++ b/AUDIO/OverrideMicrophoneSettings.md @@ -1,17 +1,19 @@ --- ns: AUDIO -aliases: ["0x75773E11BA459E90"] +aliases: ["0x75773E11BA459E90", "_OVERRIDE_MICROPHONE_SETTINGS"] --- -## _OVERRIDE_MICROPHONE_SETTINGS +## OVERRIDE_MICROPHONE_SETTINGS ```c // 0x75773E11BA459E90 -void _OVERRIDE_MICROPHONE_SETTINGS(cs_type(Any) Hash hash, BOOL toggle); +void OVERRIDE_MICROPHONE_SETTINGS(cs_type(Any) Hash hash, BOOL toggle); ``` Sets audio flag "OverrideMicrophoneSettings" +Allows the script to ovverride the current microphone settings + ## Parameters -* **hash**: -* **toggle**: +* **hash**: +* **toggle**: diff --git a/AUDIO/OverridePlayerGroundMaterial.md b/AUDIO/OverridePlayerGroundMaterial.md index d65de9ba0..862ac38c2 100644 --- a/AUDIO/OverridePlayerGroundMaterial.md +++ b/AUDIO/OverridePlayerGroundMaterial.md @@ -6,11 +6,12 @@ aliases: ["0xD2CC78CD3D0B50F9"] ```c // 0xD2CC78CD3D0B50F9 0xC307D531 -void OVERRIDE_PLAYER_GROUND_MATERIAL(cs_type(Any) Hash hash, BOOL toggle); +void OVERRIDE_PLAYER_GROUND_MATERIAL(cs_type(Any) Hash overriddenMaterialHash, BOOL scriptOverrides); ``` +Sets the footstep tuning modes ## Parameters -* **hash**: -* **toggle**: +* **overriddenMaterialHash**: +* **scriptOverrides**: True to override with the given overridenMaterialHash, false to stop overriding diff --git a/AUDIO/OverrideTrevorRage.md b/AUDIO/OverrideTrevorRage.md index 2c2dc4cbc..67e0bee50 100644 --- a/AUDIO/OverrideTrevorRage.md +++ b/AUDIO/OverrideTrevorRage.md @@ -10,6 +10,8 @@ void OVERRIDE_TREVOR_RAGE(char* voiceEffect); This native enables the audio flag "TrevorRageIsOverridden" and sets the voice effect to `voiceEffect` +To clear the override use [RESET_TREVOR_RAGE](#_0xE78503B10C4314E0) + ## Parameters -* **voiceEffect**: +* **voiceEffect**: diff --git a/AUDIO/OverrideUnderwaterStream.md b/AUDIO/OverrideUnderwaterStream.md index 49b8f3471..f1fa74880 100644 --- a/AUDIO/OverrideUnderwaterStream.md +++ b/AUDIO/OverrideUnderwaterStream.md @@ -5,11 +5,15 @@ ns: AUDIO ```c // 0xF2A9CDABCEA04BD6 0x9A083B7E -void OVERRIDE_UNDERWATER_STREAM(Any* p0, BOOL p1); +void OVERRIDE_UNDERWATER_STREAM(cs_type(AnyPtr) char* streamName, BOOL override); ``` +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. ## Parameters -* **p0**: -* **p1**: +* **streamName**: +* **override**: diff --git a/AUDIO/PauseScriptedConversation.md b/AUDIO/PauseScriptedConversation.md index 6e93fc2aa..f8407d51d 100644 --- a/AUDIO/PauseScriptedConversation.md +++ b/AUDIO/PauseScriptedConversation.md @@ -5,10 +5,11 @@ ns: AUDIO ```c // 0x8530AD776CD72B12 0xE2C9C6F8 -void PAUSE_SCRIPTED_CONVERSATION(BOOL p0); +void PAUSE_SCRIPTED_CONVERSATION(BOOL finishCurrentLine); ``` +To resume the conversation use [RESTART_SCRIPTED_CONVERSATION](#_0x9AEB285D1818C9AC) ## Parameters -* **p0**: +* **finishCurrentLine**: diff --git a/AUDIO/PlayAmbientSpeechFromPositionNative.md b/AUDIO/PlayAmbientSpeechFromPositionNative.md index 57e833c56..058e7da83 100644 --- a/AUDIO/PlayAmbientSpeechFromPositionNative.md +++ b/AUDIO/PlayAmbientSpeechFromPositionNative.md @@ -9,12 +9,10 @@ aliases: ["0xED640017ED337E45","_PLAY_AMBIENT_SPEECH_AT_COORDS"] void PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE(char* speechName, char* voiceName, float x, float y, float z, char* speechParam); ``` - ## Parameters -* **speechName**: -* **voiceName**: -* **x**: -* **y**: -* **z**: -* **speechParam**: - +* **speechName**: +* **voiceName**: +* **x**: +* **y**: +* **z**: +* **speechParam**: See [`PLAY_PED_AMBIENT_SPEECH_NATIVE`](#_0x8E04FEDD28D42462) for params diff --git a/AUDIO/PlayAnimalVocalization.md b/AUDIO/PlayAnimalVocalization.md index b68d6e76c..b4d9f01d1 100644 --- a/AUDIO/PlayAnimalVocalization.md +++ b/AUDIO/PlayAnimalVocalization.md @@ -6,17 +6,23 @@ aliases: ["0xEE066C7006C49C0A"] ```c // 0xEE066C7006C49C0A 0x498849F3 -void PLAY_ANIMAL_VOCALIZATION(Ped pedHandle, int p1, char* speechName); +void PLAY_ANIMAL_VOCALIZATION(Ped pedHandle, int animalType, char* speechName); ``` -``` -Plays sounds from a ped with chop model. For example it used to play bark or sniff sounds. p1 is always 3 or 4294967295 in decompiled scripts. By a quick disassembling I can assume that this arg is unused. -This native is works only when you call it on the ped with right model (ac_chop only ?) -Speech Name can be: CHOP_SNIFF_SEQ CHOP_WHINE CHOP_LICKS_MOUTH CHOP_PANT bark GROWL SNARL BARK_SEQ +```c +enum eAudAnimalType { + AUD_ANIMAL_NONE = -1, + AUD_ANIMAL_BOAR, + AUD_ANIMAL_CHICKEN, + AUD_ANIMAL_DOG, + AUD_ANIMAL_DOG_ROTTWEILER, + AUD_ANIMAL_HORSE, + AUD_NUM_ANIMALS +} ``` ## Parameters -* **pedHandle**: -* **p1**: -* **speechName**: +* **pedHandle**: +* **animalType**: +* **speechName**: diff --git a/AUDIO/PlayDeferredSoundFrontend.md b/AUDIO/PlayDeferredSoundFrontend.md index 1a612e64e..85d9b10da 100644 --- a/AUDIO/PlayDeferredSoundFrontend.md +++ b/AUDIO/PlayDeferredSoundFrontend.md @@ -9,12 +9,7 @@ aliases: ["0xCADA5A0D0702381E"] void PLAY_DEFERRED_SOUND_FRONTEND(char* soundName, char* soundsetName); ``` -``` -Only call found in the b617d scripts: -AUDIO::PLAY_DEFERRED_SOUND_FRONTEND("BACK", "HUD_FREEMODE_SOUNDSET"); -``` - ## Parameters -* **soundName**: -* **soundsetName**: +* **soundName**: +* **soundsetName**: diff --git a/AUDIO/PlayEndCreditsMusic.md b/AUDIO/PlayEndCreditsMusic.md index e4919da2e..370dd4ff8 100644 --- a/AUDIO/PlayEndCreditsMusic.md +++ b/AUDIO/PlayEndCreditsMusic.md @@ -5,10 +5,10 @@ ns: AUDIO ```c // 0xCD536C4D33DCC900 0x8E88B3CC -void PLAY_END_CREDITS_MUSIC(BOOL play); +void PLAY_END_CREDITS_MUSIC(BOOL bActive); ``` ## Parameters -* **play**: +* **bActive**: diff --git a/AUDIO/PlayPain.md b/AUDIO/PlayPain.md index cc416401c..c04e7031a 100644 --- a/AUDIO/PlayPain.md +++ b/AUDIO/PlayPain.md @@ -5,65 +5,55 @@ ns: AUDIO ```c // 0xBC9AE166038A5CEC 0x874BD6CB -void PLAY_PAIN(Ped ped, int painID, int p1); +void PLAY_PAIN(Ped ped, int damageReason, cs_type(int) float rawDamage); ``` -**Warning**: +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. -Parameters are wrong after painID. To preserve C-Sharp backwards compatibility, we can't add or remove parameters. - -Correct parameters should be: -`PLAY_PAIN(Ped ped, int painID, float p3, bool createNetEvent)` - -Check the *examples* section for the correct usage of this native. - -**Description:** - -Plays a pain sound. A maximum of 33 pain IDs are allowed. -`createNetEvent` creates a `CPedPlayPainEvent` when set to true. - -Below is a list of all the pain IDs (Asterisks indicate that sounds can play in a Low, Medium or High fashion), for example: `PAIN_LOW_GENERIC`. The corresponding pain strings belong to the game exe. - -**Pain IDs:** - -- 0: PAIN_*_GENERIC (Low, Medium, High) -- 1: UNUSED -- 2: UNUSED -- 3: SCREAM_PANIC (Nothing can be heard) -- 4: SCREAM_PANIC_SHORT -- 5: SCREAM_SCARED -- 6: SCREAM_SHOCKED -- 7: SCREAM_TERROR -- 8: ON_FIRE -- 9: UNUSED -- 10: UNUSED -- 11: INHALE (Nothing can be heard) -- 12: EXHALE (Nothing can be heard) -- 13: DEATH_HIGH_SHORT -- 14: UNUSED -- 15: PAIN_HIGH_GENERIC -- 16: PAIN_*_GENERIC (Low, Medium, High) -- 17: PAIN_SHOVE -- 18: PAIN_WHEEZE -- 19: COUGH -- 20: PAIN_TAZER -- 21: UNUSED -- 22: CLIMB_LARGE (Nothing can be heard) -- 23: CLIMB_SMALL (Nothing can be heard) -- 24: JUMP (Nothing can be heard) -- 25: COWER -- 26: WHIMPER -- 27: DYING_MOAN -- 28: EXHALE_CYCLING (Nothing can be heard) -- 29: PAIN_RAPIDS (Nothing can be heard) -- 30: SNEEZE -- 31: MELEE_SMALL_GRUNT (Nothing can be heard) -- 32: MELEE_LARGE_GRUNT (Nothing can be heard) -- 33: PAIN_*_GENERIC (Low, Medium, High) +```c +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, + AUD_DAMAGE_REASON_SURFACE_DROWNING = 10, // drowning on the surface of water, after we time out + 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**: The ped entity. -* **painID**: The pain id, max allowed id is 33. +* **damageReason**: The damage reason/type, refer to eAudDamageReason +* **rawDamage**: Damage value, defaults to 0.0 ## Examples ```lua