-- strona klienta sound = nil addEventHandler("onClientResourceStart", getRootElement(), function() setTimer(function() sound = playSound("intro.mp3") end, 2000, 1) end) function stopIntroSound() stopSound(sound) sound = nil end addEvent("stopSound", true) addEventHandler("stopSound", getRootElement(), stopIntroSound)
-- strona serwera addEventHandler("onPlayerLogin", getRootElement(), function (pacc, cacc, login) triggerClientEvent(source, "stopSound", source) end)