Audio::setPedFootstepLoud
Summary
The setPedFootstepLoud function controls whether a pedestrian's footsteps are loud or soft. When toggle is set to true, the pedestrian's footsteps become louder, making them more noticeable. This can be used to enhance realism or to emphasize certain NPCs in specific gameplay scenarios.
Required Params
- ped: number — The handle of the pedestrian entity.
- toggle: boolean — Set to
trueto make footsteps loud, orfalsefor softer footsteps.
Return value
- void
Syntax
mp.game.audio.setPedFootstepLoud(ped, toggle)
Example
// Make the player's footsteps loud
const playerPed = mp.players.local.handle;
mp.game.audio.setPedFootstepLoud(playerPed, true);