{"slug":"audio/frontend_soundsets","category":"audio","title":"Frontend soundsets","kind":"markdown","intro":"","body":"## FRONTEND SOUNDSETS\n\nSome frontend_soundset_refs need according audio banks loaded! Usually name of audio bank is the name of frontend_soundset_ref without '\\_Sounds' or '\\_soundset'. You can see audio banks here: https://github.com/femga/rdr3_discoveries/blob/master/audio/audio_banks/audio_banks.lua\n\n## Example of playing frontend soundsets:\n\n```lua\n\nlocal is_frontend_sound_playing = false\nlocal frontend_soundset_ref = \"Player_Core_Empty_Sounds\"\nlocal frontend_soundset_name =  \"DEADEYE\"\n\nCitizen.CreateThread(function()\n  while true do\n      Citizen.Wait(0)\n      if Citizen.InvokeNative(0x91AEF906BCA88877,0, 0x17BEC168) then   -- pressed E\n        if not is_frontend_sound_playing then\n          if frontend_soundset_ref ~= 0 then\n            Citizen.InvokeNative(0x0F2A2175734926D8,frontend_soundset_name, frontend_soundset_ref);   -- load sound frontend\n          end\n          Citizen.InvokeNative(0x67C540AA08E4A6F5,frontend_soundset_name, frontend_soundset_ref, true, 0);  -- play sound frontend\n          is_frontend_sound_playing = true\n          print(\"sound frontend is playing\")\n        else\n          Citizen.InvokeNative(0x9D746964E0CF2C5F,frontend_soundset_name, frontend_soundset_ref)  -- stop audio\n          is_frontend_sound_playing = false\n          print(\"sound frontend is stopped\")\n        end\n      end\n  end\nend)\n\n```","tables":[],"sourceUrl":"https://github.com/femga/rdr3_discoveries/tree/477aaaccadb7f0c042286611d9939009636cff12/audio/frontend_soundsets","rows":[]}