Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
gimicze committed Apr 15, 2024
1 parent 45eccaa commit 86c7ed7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions client/dispatch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Dispatch = {
playingTone = nil,
__index = self,
init = function(o)
o = o or {active = {}, removed = {}}
o = o or {lastCall = {}, blips = {}, playingTone = nil}
setmetatable(o, self)
self.__index = self
return o
Expand Down Expand Up @@ -90,7 +90,7 @@ function Dispatch:create(dispatchNumber, coords)
end

function Dispatch:playTone()
if not (self.playingTone and Config.Dispatch.toneSources and type(Config.Dispatch.toneSources) == "table") then
if self.playingTone or not (Config.Dispatch.toneSources and type(Config.Dispatch.toneSources) == "table") then
return false
end

Expand Down
4 changes: 3 additions & 1 deletion client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -428,5 +428,7 @@ AddEventHandler(
RegisterNetEvent('fireClient:playTone')
AddEventHandler(
'fireClient:playTone',
Dispatch.playTone
function()
Dispatch:playTone()
end
)

0 comments on commit 86c7ed7

Please sign in to comment.