diff --git a/resources/[Developer]/[Max]/ticketpanel_qb/client/cl_main.lua b/resources/[Developer]/[Max]/ticketpanel_qb/client/cl_main.lua index 43784e973..3f8bcfc4d 100644 --- a/resources/[Developer]/[Max]/ticketpanel_qb/client/cl_main.lua +++ b/resources/[Developer]/[Max]/ticketpanel_qb/client/cl_main.lua @@ -75,7 +75,7 @@ RegisterNetEvent('rlo_ticketpanel:client:syncRequest', function(activeTickets, n if Config.Sound.Enabled then print('Sound is enabled, trying to play sound...') - -- Prüfe, ob xSound gestartet ist + -- Prüfe, ob xSound gestartet ist local xsoundState = GetResourceState('xsound') print('xSound resource state: ' .. xsoundState) @@ -86,15 +86,15 @@ RegisterNetEvent('rlo_ticketpanel:client:syncRequest', function(activeTickets, n print('Sound URL: ' .. Config.Sound.URL) print('Sound Volume: ' .. Config.Sound.Volume) - -- Eindeutige Sound-ID für jede Benachrichtigung + -- Eindeutige Sound-ID für jede Benachrichtigung local soundId = 'ticket_notify_' .. math.random(100000, 999999) - -- Direkter Aufruf ohne pcall für bessere Fehlermeldungen + -- Direkter Aufruf ohne pcall für bessere Fehlermeldungen print('Trying to play sound with direct method...') exports['xsound']:PlayUrl(soundId, Config.Sound.URL, Config.Sound.Volume, false) -- Sound nach 10 Sekunden stoppen - Citizen.SetTimeout(1500, function() + Citizen.SetTimeout(2000, function() if exports['xsound']:soundExists(soundId) then exports['xsound']:Destroy(soundId) print('Sound stopped after 10 seconds timeout')