client
PlaySoundFrontend
FiveM client native documentation with a Lua example.
Summary
Plays a UI/frontend sound (button clicks, alerts, confirmations). Adds audio feedback to menus and interactions.
Returns
void
Parameters
soundIdnumber-1 to auto-assign.audioNamestringThe sound name.audioRefstringThe sound set/ref.p3booleanUsually true/false flag.Example
PlaySoundFrontend(-1, 'SELECT', 'HUD_FRONTEND_DEFAULT_SOUNDSET', false)Common pitfalls
- Sound names/refs are fixed GTA values; keep a reference list.
- Great for menu feedback; don't spam it every frame.
Related natives
Related guides
FiveM scripts done right
Optimized, dual-framework scripts for QBCore and ESX from Viper Development — escrow protected, delivered instantly to your Cfx portal.
Browse Scripts →