misc cleanup
Adjusted force config values to match the required values. Also removed unused config options. Swapped default logger to built-in
This commit is contained in:
1 parent
6e418f406c
commit
4138bc84ef
13 files changed
+22
-10
No files matched your search
@@ -1,7 +1,7 @@
|
||||
Logs = Logs or {}
|
||||
|
||||
local WebhookURL = ""
|
||||
local LogoForEmbed = ""
|
||||
local WebhookURL = "" -- Add webhook URL here if using built-in logging system
|
||||
local LogoForEmbed = "" -- optional logo for the embed
|
||||
|
||||
---This will send a log to the configured webhook or log system.
|
||||
---@param src number
|
||||
@@ -9,7 +9,7 @@ local LogoForEmbed = ""
|
||||
---@return nil
|
||||
Logs.Send = function(src, message)
|
||||
if not src or not message then return end
|
||||
if BridgeServerConfig.LogSystem == "builtin" then
|
||||
if BridgeServerConfig.LogSystem == "built-in" then
|
||||
PerformHttpRequest(WebhookURL, function(err, text, headers) end, 'POST', json.encode(
|
||||
{
|
||||
username = "Community_Bridge's Logger",
|
||||
@@ -48,7 +48,7 @@ Logs.Send = function(src, message)
|
||||
}), { ['Content-Type']= 'application/json' })
|
||||
elseif BridgeServerConfig.LogSystem == "qb" then
|
||||
return TriggerEvent('qb-log:server:CreateLog', GetCurrentResourceName(), GetCurrentResourceName(), 'green', message)
|
||||
elseif BridgeServerConfig.LogSystem == "ox" then
|
||||
elseif BridgeServerConfig.LogSystem == "ox_lib" then
|
||||
return lib.logger(src, GetCurrentResourceName(), message)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Phone = Phone or {}
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
Phone.SendEmail = function(email, title, message)
|
||||
return false, Print.Error('There Is No Phone Bridged.')
|
||||
end
|
||||
@@ -1,9 +1,11 @@
|
||||
Phone = Phone or {}
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
Phone.GetPlayerPhone = function(src)
|
||||
return false, Print.Error('There Is No Phone Bridged.')
|
||||
end
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
Phone.SendEmail = function(src, email, title, message)
|
||||
return false, Print.Error('There Is No Phone Bridged.')
|
||||
end
|
||||
@@ -9,6 +9,7 @@ Phone = Phone or {}
|
||||
---@param title string
|
||||
---@param message string
|
||||
---@return boolean
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
Phone.SendEmail = function(email, title, message)
|
||||
return exports["gksphone"]:SendNewMail({ sender = email, image = '/html/static/img/icons/mail.png', subject = title, message = message })
|
||||
end
|
||||
@@ -5,7 +5,8 @@ Phone = Phone or {}
|
||||
|
||||
---comment
|
||||
---@param src number
|
||||
---@return number||boolean
|
||||
---@return number| boolean
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
Phone.GetPlayerPhone = function(src)
|
||||
return exports["gksphone"]:GetPhoneBySource(src) or false
|
||||
end
|
||||
@@ -16,6 +17,7 @@ end
|
||||
---@param title string
|
||||
---@param message string
|
||||
---@return boolean
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
Phone.SendEmail = function(src, email, title, message)
|
||||
local data = {}
|
||||
data.sender = email
|
||||
|
||||
@@ -8,6 +8,7 @@ Phone = Phone or {}
|
||||
---@param title string
|
||||
---@param message string
|
||||
---@return nil
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
Phone.SendEmail = function(email, title, message)
|
||||
TriggerServerEvent('community_bridge:Server:genericEmail', {email = email, title = title, message = message})
|
||||
end
|
||||
@@ -3,6 +3,7 @@ local configValue = BridgeSharedConfig.Phone
|
||||
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end
|
||||
Phone = Phone or {}
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
Phone.GetPlayerPhone = function(src)
|
||||
return exports["lb-phone"]:GetEquippedPhoneNumber(src) or false
|
||||
end
|
||||
@@ -13,6 +14,7 @@ end
|
||||
---@param title string
|
||||
---@param message string
|
||||
---@return boolean
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
Phone.SendEmail = function(src, email, title, message)
|
||||
local numberNumber = exports["lb-phone"]:GetEquippedPhoneNumber(src)
|
||||
if not numberNumber then return false, Prints.Error("Could not Find Phone number") end
|
||||
|
||||
@@ -8,11 +8,11 @@ Phone = Phone or {}
|
||||
---@param title string
|
||||
---@param message string
|
||||
---@return nil
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
Phone.SendEmail = function(email, title, message)
|
||||
return TriggerServerEvent('qs-smartphone:server:sendNewMail', { sender = email, subject = title, message = message, button = {} })
|
||||
return true, TriggerServerEvent('qs-smartphone:server:sendNewMail', { sender = email, subject = title, message = message, button = {} })
|
||||
end
|
||||
|
||||
RegisterNetEvent('community_bridge:Server:genericEmail', function(data)
|
||||
TriggerServerEvent('qs-smartphone:server:sendNewMail', { sender = data.email, subject = data.title, message = data.message, button = {} })
|
||||
return true
|
||||
end)
|
||||
@@ -2,9 +2,11 @@ local resourceName = "qs-smartphone"
|
||||
local configValue = BridgeSharedConfig.Phone
|
||||
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end
|
||||
Phone = Phone or {}
|
||||
|
||||
---comment
|
||||
---@param src number
|
||||
---@return number||boolean
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
Phone.GetPlayerPhone = function(src)
|
||||
return exports['qs-base']:GetPlayerPhone(src) or false
|
||||
end
|
||||
|
||||
@@ -49,6 +49,7 @@ end
|
||||
---@param cb any
|
||||
---@param isQBInput boolean
|
||||
---@return nil
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function ProgressBar.Open(options, cb, isQBInput)
|
||||
if isQBInput then
|
||||
options = convertFromQB(options)
|
||||
|
||||
@@ -45,6 +45,7 @@ end
|
||||
---@param cb any
|
||||
---@param qbFormat boolean
|
||||
---@return success boolean
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function ProgressBar.Open(options, cb, qbFormat)
|
||||
if not exports['progressbar'] then return false end
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
BridgeClientConfig = {}
|
||||
BridgeClientConfig.InputSystem = "auto" -- [ auto | ox | qb ]
|
||||
BridgeClientConfig.InputSystem = "auto" -- [ auto | ox_lib | qb-input ]
|
||||
BridgeClientConfig.MenuSystem = "auto" -- [ auto | ox_lib | qb-menu ]
|
||||
BridgeClientConfig.ProgressBarSystem = "auto" -- [ auto | ox_lib | progressbar ]
|
||||
BridgeClientConfig.ZoneSystem = "ox" -- [ ox | poly ]
|
||||
BridgeClientConfig.VehicleKey = "auto" -- [ auto | qb-vehiclekeys | MrNewbVehicleKeys | jaksams_VehiclesKeys | wasabi_carlock | mk_vehiclekeys | qbx_vehiclekeys | qs-vehiclekeys | t1ger_keys | Renewed-Vehiclekeys | mono_carkeys| cd_garage | okokGarage | F_RealCarKeysSystem
|
||||
BridgeClientConfig.Fuel = "auto" -- [ auto | LegacyFuel | ox_fuel | ps-fuel | qs-fuelstations | Renewed-Fuel | ti_fuel | lc_fuel | x-fuel | cdn-fuel | esx-sna-fuel | BigDaddy-Fuel | okokGasStation ]
|
||||
BridgeClientConfig.TargetSystem = "auto" -- [ auto | ox_target | qb-target | sleepless_interact ] -- sleepless is only partially supported and would need another system in place
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
BridgeServerConfig = {}
|
||||
BridgeServerConfig.LogSystem = "ox" -- [ builtin | qb | ox ]
|
||||
BridgeServerConfig.LogSystem = "built-in" -- [ built-in | qb | ox_lib ]
|
||||
BridgeServerConfig.WebhookURL = "PUT_WEBHOOK_URL_HERE" -- only if using builtin
|
||||
BridgeServerConfig.WebhookImage = "https://cdn.discordapp.com/avatars/299410129982455808/31ce635662206e8bd0132c34ce9ce683?size=1024"
|
||||
BridgeServerConfig.MaxInventorySlots = 50
|
||||
|
||||
Reference in new issue
Block a user