Skip to content

Commit

Permalink
Merge pull request #93 from ollymonger/chore/voice-chat-improv-typings
Browse files Browse the repository at this point in the history
chore: Updates to game audio / voiceChat typings
  • Loading branch information
shr0x authored Aug 19, 2024
2 parents c09cd5f + c891b07 commit 5d9e91b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/client/game/audio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,11 @@ declare interface GameAudio extends GameAudioLegacy {
setVehicleHornVariation(vehicle: number, value: number): void;
playPoliceCrimeReport(position: Vector3, crimeIndex: number, playDelay: number, localPlayer: boolean): void;
unk: GameAudioUnk;

getCategoryVariable(categoryHash: number, fieldNameHash: number): void;
setCategoryVariable(categoryHash: number, fieldNameHash: number, value: any): void;
copyCategoryVariables(categoryTo: number, categoryFrom: number): void;
restoreCategoryVariables(categoryHash: number): void;
}

declare interface GameAudioMp extends GameAudio { }
23 changes: 23 additions & 0 deletions packages/client/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,26 @@ declare interface VoiceChatMp {
setPreprocessingParam(setting: number, value: any): void;

cleanupAndReload(p0: boolean, p1: boolean, p2: boolean): void;

/**
* Disabled by default.
* @example
* mp.voiceChat.gameOutputEnabled = true;
*/
gameOutputEnabled: boolean;

/**
* Default value is set to 'mp.game.joaat('SPEECH_SCRIPTED')'
* @example
* mp.voiceChat.gameOutputCategory = hash;
*/
gameOutputCategory: number;

advancedNoiseSuppression: boolean;

networkOptimisations: boolean;

bitrate: number;
}

declare interface RaycastingMp {
Expand Down Expand Up @@ -2358,6 +2378,8 @@ declare interface PlayerMp extends PedMpBase {
voiceAutoVolume: boolean;
voiceVolume: number;
voice3d: any;
voiceGameOutputEnabled: boolean;
voiceGameOutputCategory: number;

readonly action: string;
readonly aimTarget: boolean;
Expand Down Expand Up @@ -2473,6 +2495,7 @@ declare interface PlayerMp extends PedMpBase {
setVehicleDamageModifier(damageAmount: number): void;
setVehicleDefenseModifier(modifier: number): void;
setVoiceAttribute(attribute: any, value: any): void; // TODO
closeVoiceStream(): void;
setWantedCentrePosition(x: number, y: number, z: number): void;
setWantedLevel(wantedLevel: number, disableNoMission: boolean): void;
setWantedLevelNoDrop(wantedLevel: number, p2: boolean): void;
Expand Down

0 comments on commit 5d9e91b

Please sign in to comment.