diff --git a/client/main.lua b/client/main.lua index b0d2561..ffe6892 100644 --- a/client/main.lua +++ b/client/main.lua @@ -113,7 +113,7 @@ local function fight(ped) if CheckJob(Config.Events.fight.jobwhitelist, QBX.PlayerData.job) and QBX.PlayerData.job.onduty then return end fightAntiSpam = true - exports['qbx-dispatch']:Fight() + exports.qbx_dispatch:Fight() SetTimeout(30 * 1000, function() -- Wait 30 seconds to avoid spam. fightAntiSpam = false end) @@ -129,9 +129,9 @@ local function shotfired(ped) shotsfiredAntiSpam = true if cache.vehicle then - exports['qbx-dispatch']:DriveBy() + exports.qbx_dispatch:DriveBy() else - exports['qbx-dispatch']:Shooting() + exports.qbx_dispatch:Shooting() end SetTimeout(30 * 1000, function() -- Wait 30 seconds to avoid spam. shotsfiredAntiSpam = false @@ -195,7 +195,7 @@ RegisterNetEvent('qbx-dispatch:client:AddCall', function(Data, CallId) if not Data.coords then return end if Data.speed then Data.speed = (Config.UseMPH and math.ceil(Data.speed * 2.236936) .. " Mph") or (math.ceil(Data.speed * 3.6) .. " Km/h") end Data.distance = math.round(#(GetEntityCoords(cache.ped) - Data.coords)) - + SendNUIMessage({ type = "AddCall", id = CallId, diff --git a/config.lua b/config.lua index b6e523f..e873881 100644 --- a/config.lua +++ b/config.lua @@ -24,6 +24,7 @@ Config.AllowAnonCalls = true -- Requires UseNpwd = true, Allow anonymous Texts t Config.UseMPH = false -- Use MPH instead of KMH +-- These need to be tested and might spam the dispatch Config.Events = { fight = { enabled = true, diff --git a/html/main.js b/html/main.js index 557a8f9..60d24ec 100644 --- a/html/main.js +++ b/html/main.js @@ -39,8 +39,8 @@ function NewCall(Id, length, data) {