Merge branch 'dev' of https://github.com/The-Order-Of-The-Sacred-Framework/community_bridge into dev
This commit is contained in:
commit
4d814f176d
11 files changed
+68
-19
No files matched your search
@@ -0,0 +1,42 @@
|
||||
if GetResourceState('qs-dispatch') ~= 'started' then return end
|
||||
|
||||
Dispatch = {}
|
||||
|
||||
Dispatch.SendAlert = function(data)
|
||||
local playerData = exports['qs-dispatch']:GetPlayerInfo()
|
||||
if not playerData then
|
||||
print("Error getting player data")
|
||||
return
|
||||
end
|
||||
|
||||
local customData = {
|
||||
job = data.job or { 'police', 'sheriff', 'traffic', 'patrol' }, -- Job Names
|
||||
callLocation = data.coords or vec3(0.0, 0.0, 0.0),
|
||||
callCode = {
|
||||
code = data.code or '10-80',
|
||||
snippet = data.snippet or 'General Alert'
|
||||
},
|
||||
message = data.message or "No message provided.",
|
||||
flashes = data.flash or false,
|
||||
image = data.image or nil,
|
||||
blip = {
|
||||
sprite = data.sprite or 1,
|
||||
scale = data.scale or 1.0,
|
||||
colour = data.color or 1,
|
||||
flashes = data.flash or false,
|
||||
text = data.blipText or "Alert",
|
||||
time = data.length and (data.length * 1000) or 20000 -- Default to 20 seconds
|
||||
},
|
||||
otherData = {
|
||||
{
|
||||
text = data.name or 'N/A',
|
||||
icon = data.icon or 'fas fa-question'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports['qs-dispatch']:getSSURL(function(image)
|
||||
customData.image = image or customData.image
|
||||
TriggerServerEvent('qs-dispatch:server:CreateDispatchCall', customData)
|
||||
end)
|
||||
end
|
||||
@@ -40,7 +40,7 @@ function Language.Locale(str, ...)
|
||||
return locale
|
||||
end
|
||||
|
||||
if BridgeSharedConfig.DebugLevel == 3 then
|
||||
if BridgeSharedConfig.DebugLevel == 2 then
|
||||
-- if outside this resource, use local whatever = Require("modules/locales/shared.lua")
|
||||
-- whatever.Locales("some-index-in-language-.json-file")
|
||||
-- Files must be stored in "locales" folder, within the resource.
|
||||
|
||||
@@ -6,17 +6,17 @@ Notify.SendNotify = function(message, type, time)
|
||||
time = time or 3000
|
||||
if notifyType == 'qb' then
|
||||
return TriggerEvent('QBCore:Notify', message, 'primary', time)
|
||||
elseif notifyType == 'mythic_notify' then
|
||||
elseif notifyType == 'mythic' then
|
||||
return exports['mythic_notify']:SendAlert('inform', message, time)
|
||||
elseif notifyType == 'pNotify' then
|
||||
return exports['pNotify']:SendNotification({ text = message, type = type, timeout = time, layout = 'centerRight' })
|
||||
elseif notifyType == 'esx_notify' then
|
||||
elseif notifyType == 'esx' then
|
||||
return ESX.ShowNotification(message, type, time)
|
||||
elseif notifyType == 'ox' then
|
||||
return exports.ox_lib:notify({ description = message, type = type, position = 'center-left' })
|
||||
elseif notifyType == 't-notify' then
|
||||
return exports['t-notify']:Alert({ style = 'info', message = message, duration = time, })
|
||||
elseif notifyType == 'wasabi_notify' then
|
||||
elseif notifyType == 'wasabi' then
|
||||
return exports.wasabi_notify:notify(type, message, time, type)
|
||||
elseif notifyType == 'lab' then
|
||||
return exports['swe-notify']:SendNotification(message, time, type)
|
||||
|
||||
@@ -2,7 +2,7 @@ if GetResourceState('ox_target') ~= 'started' then return end
|
||||
|
||||
local targetDebug = false
|
||||
local function detectDebugEnabled()
|
||||
if BridgeClientConfig.DebugLevel == 3 then
|
||||
if BridgeClientConfig.DebugLevel == 2 then
|
||||
targetDebug = true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@ if GetResourceState('qb-target') ~= 'started' or GetResourceState('ox_target') =
|
||||
|
||||
local targetDebug = false
|
||||
local function detectDebugEnabled()
|
||||
if BridgeClientConfig.DebugLevel == 3 then
|
||||
if BridgeClientConfig.DebugLevel == 2 then
|
||||
targetDebug = true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,7 +5,6 @@ lib.locale()
|
||||
|
||||
-- Object placer --
|
||||
local placementText = {
|
||||
locale('place_object'),
|
||||
locale('place_object_place'),
|
||||
locale('place_object_cancel'),
|
||||
locale('place_object_scroll_up'),
|
||||
|
||||
Reference in new issue
Block a user