Audio::setPedFootstepLoud

From RAGE Multiplayer Wiki
Revision as of 08:42, 10 November 2024 by Shr0x (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


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 `true` to make footsteps loud, or `false` for 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);



See also