add function in Client.lua
Example
function startSound (killer, weapon, bodypart)
showPlayerHudComponent ( 'radar', false )
sound = playSound("music/music.mp3", true)
end
addEventHandler("onClientPlayerWasted", getLocalPlayer(), startSound)
function destroySound()
showPlayerHudComponent ( 'radar', true )
if isElement(sound) then
stopSound(sound)
end
end
addEventHandler("onClientPlayerSpawn", getLocalPlayer(), destroySound)