This allows you to play a custom sound to players once they die. Replace the sound.ogg in the folder with your own sound (has to be named exactly like that too). Also you can change the volume in the configuration.
Add Wait(amount of time in milliseconds) between if not GetEntityHealth(playerPed) and not alreadyDied then
and SendNUIMessage({ playdeathsound = true, deathvolume = volume })