Merge branch 'dev' of https://github.com/The-Order-Of-The-Sacred-Framework/community_bridge into dev
This commit is contained in:
commit
aa551d6f58
30 files changed
+106
-54
No files matched your search
+1
-1
@@ -4,7 +4,7 @@ lua54 'yes'
|
||||
use_experimental_fxv2_oal 'yes'
|
||||
author 'The Order of the Sacred Framework'
|
||||
description 'A bridge made for the community to use as a base for their own projects. This bridge will allow a single format to work with nearly all commonly used systems while still offering expandability.'
|
||||
version '0.3.1'
|
||||
version '0.3.11'
|
||||
|
||||
shared_scripts {
|
||||
'@ox_lib/init.lua',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if GetResourceState('gksphone') ~= 'started' then return end
|
||||
if GetResourceState('gksphone') ~= 'started' or (BridgeSharedConfig.Phone ~= "gksphone" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
Phone = {}
|
||||
|
||||
Phone.SendEmail = function(email, title, message)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if GetResourceState('gksphone') ~= 'started' then return end
|
||||
if GetResourceState('gksphone') ~= 'started' or (BridgeSharedConfig.Phone ~= "gksphone" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
Phone = {}
|
||||
|
||||
Phone.GetPlayerPhone = function(src)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if GetResourceState('lb-phone') ~= 'started' then return end
|
||||
if GetResourceState('lb-phone') ~= 'started' or (BridgeSharedConfig.Phone ~= "lb-phone" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
Phone = {}
|
||||
|
||||
Phone.SendEmail = function(email, title, message)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if GetResourceState('lb-phone') ~= 'started' then return end
|
||||
if GetResourceState('lb-phone') ~= 'started' or (BridgeSharedConfig.Phone ~= "lb-phone" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
Phone = {}
|
||||
|
||||
Phone.GetPlayerPhone = function(src)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if GetResourceState('qs-smartphone') ~= 'started' then return end
|
||||
if GetResourceState('qs-smartphone') ~= 'started' or (BridgeSharedConfig.Phone ~= "qs-smartphone" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
Phone = {}
|
||||
|
||||
Phone.SendEmail = function(email, title, message)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if GetResourceState('qs-smartphone') ~= 'started' then return end
|
||||
if GetResourceState('qs-smartphone') ~= 'started' or (BridgeSharedConfig.Phone ~= "qs-smartphone" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
Phone = {}
|
||||
|
||||
Phone.GetPlayerPhone = function(src)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
if GetResourceState('F_RealCarKeysSystem') ~= 'started' then return end
|
||||
if GetResourceState('F_RealCarKeysSystem') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "F_RealCarKeysSystem" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(vehicle, plate)
|
||||
@@ -1,4 +1,5 @@
|
||||
if GetResourceState('MrNewbVehicleKeys') ~= 'started' then return end
|
||||
if GetResourceState('MrNewbVehicleKeys') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "MrNewbVehicleKeys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(vehicle, plate)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if GetResourceState('MrNewbVehicleKeys') ~= 'started' then return end
|
||||
if GetResourceState('MrNewbVehicleKeys') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "MrNewbVehicleKeys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(src, vehicle, plate)
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
if GetResourceState('Renewed-Vehiclekeys') ~= 'started' then return end
|
||||
if GetResourceState('Renewed-Vehiclekeys') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "Renewed-Vehiclekeys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(vehicle, plate)
|
||||
if not DoesEntityExist(vehicle) then return false end
|
||||
if not plate and not DoesEntityExist(vehicle) then return false end
|
||||
return exports['Renewed-Vehiclekeys']:addKey(plate)
|
||||
end
|
||||
|
||||
VehicleKey.RemoveKeys = function(vehicle, plate)
|
||||
if not DoesEntityExist(vehicle) then return false end
|
||||
if not plate and not DoesEntityExist(vehicle) then return false end
|
||||
return exports['Renewed-Vehiclekeys']:removeKey(plate)
|
||||
end
|
||||
@@ -1,10 +1,13 @@
|
||||
if GetResourceState('Renewed-Vehiclekeys') ~= 'started' then return end
|
||||
if GetResourceState('Renewed-Vehiclekeys') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "Renewed-Vehiclekeys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(src, vehicle, plate)
|
||||
--wip
|
||||
if not plate then plate = GetVehicleNumberPlateText(vehicle) end
|
||||
exports['Renewed-Vehiclekeys']:addKey(src, plate)
|
||||
end
|
||||
|
||||
VehicleKey.RemoveKeys = function(src, vehicle, plate)
|
||||
-- wip
|
||||
if not plate then plate = GetVehicleNumberPlateText(vehicle) end
|
||||
exports['Renewed-Vehiclekeys']:removeKey(src, plate)
|
||||
end
|
||||
@@ -1,4 +1,4 @@
|
||||
if GetResourceState('cd_garage') ~= 'started' then return end
|
||||
if GetResourceState('cd_garage') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "cd_garage" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(vehicle, plate)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if GetResourceState('cd_garage') ~= 'started' then return end
|
||||
if GetResourceState('cd_garage') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "cd_garage" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(src, vehicle, plate)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if GetResourceState('mk_vehiclekeys') ~= 'started' then return end
|
||||
if GetResourceState('mk_vehiclekeys') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "mk_vehiclekeys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(vehicle, plate)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if GetResourceState('mk_vehiclekeys') ~= 'started' then return end
|
||||
if GetResourceState('mk_vehiclekeys') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "mk_vehiclekeys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(src, vehicle, plate)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
if GetResourceState('mono_carkeys') ~= 'started' then return end
|
||||
if GetResourceState('mono_carkeys') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "mono_carkeys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
VehicleKey.GiveKeys = function(vehicle, plate)
|
||||
@@ -1,4 +1,5 @@
|
||||
if GetResourceState('okokGarage') ~= 'started' then return end
|
||||
if GetResourceState('okokGarage') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "okokGarage" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(vehicle, plate)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if GetResourceState('okokGarage') ~= 'started' then return end
|
||||
if GetResourceState('okokGarage') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "okokGarage" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(src, vehicle, plate)
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
if GetResourceState('qb-vehiclekeys') ~= 'started' then return end
|
||||
if GetResourceState('qbx_vehiclekeys') == 'started' then return end
|
||||
if GetResourceState('qb-vehiclekeys') ~= 'started' and not GetResourceState("qbx_vehiclekeys") == "started" or (BridgeSharedConfig.VehicleKey ~= "qb-vehiclekeys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(vehicle, plate)
|
||||
if plate == nil and vehicle and DoesEntityExist(vehicle) then
|
||||
plate = GetVehicleNumberPlateText(vehicle)
|
||||
end
|
||||
TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate)
|
||||
if not plate and vehicle then plate = GetVehicleNumberPlateText(vehicle) end
|
||||
TriggerServerEvent("qb-vehiclekeys:server:AcquireVehicleKeys", plate)
|
||||
end
|
||||
|
||||
VehicleKey.RemoveKeys = function(vehicle, plate)
|
||||
TriggerEvent('qb-vehiclekeys:client:RemoveKeys', plate)
|
||||
if not plate and vehicle then plate = GetVehicleNumberPlateText(vehicle) end
|
||||
TriggerEvent("qb-vehiclekeys:client:RemoveKeys", plate)
|
||||
end
|
||||
@@ -1,15 +1,17 @@
|
||||
if GetResourceState('qb-vehiclekeys') ~= 'started' then return end
|
||||
if GetResourceState('qbx_vehiclekeys') == 'started' then return end
|
||||
if GetResourceState('qb-vehiclekeys') ~= 'started' and not GetResourceState("qbx_vehiclekeys") == "started" or (BridgeSharedConfig.VehicleKey ~= "qb-vehiclekeys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(src, vehicle, plate)
|
||||
if plate then
|
||||
return exports["qb-vehiclekeys"]:GiveKeys(src, plate)
|
||||
if not plate and vehicle then
|
||||
plate = GetVehicleNumberPlateText(vehicle)
|
||||
end
|
||||
return exports["qb-vehiclekeys"]:GiveKeys(src, plate)
|
||||
end
|
||||
|
||||
VehicleKey.RemoveKeys = function(src, vehicle, plate)
|
||||
if plate then
|
||||
return exports["qb-vehiclekeys"]:RemoveKeys(src, plate)
|
||||
if not plate and vehicle then
|
||||
plate = GetVehicleNumberPlateText(vehicle)
|
||||
end
|
||||
return exports["qb-vehiclekeys"]:RemoveKeys(src, plate)
|
||||
end
|
||||
@@ -1,7 +1,9 @@
|
||||
if GetResourceState('qbx_vehiclekeys') ~= 'started' then return end
|
||||
if GetResourceState('qbx_vehiclekeys') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "qbx_vehiclekeys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(vehicle, plate)
|
||||
if not plate and vehicle then plate = GetVehicleNumberPlateText(vehicle) end
|
||||
TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate)
|
||||
end
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if GetResourceState('qbx_vehiclekeys') ~= 'started' then return end
|
||||
if GetResourceState('qbx_vehiclekeys') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "qbx_vehiclekeys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(src, vehicle, plate)
|
||||
|
||||
@@ -1,12 +1,29 @@
|
||||
if GetResourceState('qs-vehiclekeys') ~= 'started' then return end
|
||||
if GetResourceState('qs-vehiclekeys') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "qs-vehiclekeys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(vehicle, plate)
|
||||
if not vehicle then return end
|
||||
local model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))
|
||||
local verifiedPlate = GetVehicleNumberPlateText(vehicle)
|
||||
exports['qs-vehiclekeys']:GiveKeys(verifiedPlate, model, true)
|
||||
return exports['qs-vehiclekeys']:GiveKeys(verifiedPlate, model, true)
|
||||
end
|
||||
|
||||
VehicleKey.RemoveKeys = function(vehicle, plate)
|
||||
return true
|
||||
end
|
||||
if not vehicle then return end
|
||||
local model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))
|
||||
local verifiedPlate = GetVehicleNumberPlateText(vehicle)
|
||||
return exports['qs-vehiclekeys']:RemoveKeys(verifiedPlate, model)
|
||||
end
|
||||
|
||||
RegisterNetEvent("community_bridge:vehicleKey:removeKeys", function(netId, plate)
|
||||
if not NetworkDoesNetworkIdExist(netId) then return end
|
||||
local vehicle = NetworkGetEntityFromNetworkId(netId)
|
||||
VehicleKey.RemoveKeys(vehicle, plate)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("community_bridge:vehicleKey:giveKeys", function(netId, plate)
|
||||
if not NetworkDoesNetworkIdExist(netId) then return end
|
||||
local vehicle = NetworkGetEntityFromNetworkId(netId)
|
||||
VehicleKey.GiveKeys(vehicle, plate)
|
||||
end)
|
||||
@@ -1,10 +1,15 @@
|
||||
if GetResourceState('qs-vehiclekeys') ~= 'started' then return end
|
||||
if GetResourceState('qs-vehiclekeys') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "qs-vehiclekeys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(src, vehicle, plate)
|
||||
--wip
|
||||
if not vehicle and not plate then return end
|
||||
local netId = NetworkGetNetworkIdFromEntity(vehicle)
|
||||
TriggerClientEvent("community_bridge:vehicleKey:giveKeys", src, netId, plate)
|
||||
end
|
||||
|
||||
VehicleKey.RemoveKeys = function(src, vehicle, plate)
|
||||
-- wip
|
||||
if not vehicle and not plate then return end
|
||||
local netId = NetworkGetNetworkIdFromEntity(vehicle)
|
||||
TriggerClientEvent("community_bridge:vehicleKey:removeKeys", src, netId, plate)
|
||||
end
|
||||
@@ -1,4 +1,5 @@
|
||||
if GetResourceState('t1ger_keys') ~= 'started' then return end
|
||||
if GetResourceState('t1ger_keys') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "t1ger_keys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(vehicle, plate)
|
||||
@@ -9,4 +10,8 @@ end
|
||||
|
||||
VehicleKey.RemoveKeys = function(vehicle, plate)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNetEvent("community_bridge:vehicleKey:giveKeys", function(plate)
|
||||
VehicleKey.GiveKeys(nil, plate)
|
||||
end)
|
||||
@@ -1,10 +1,11 @@
|
||||
if GetResourceState('t1ger_keys') ~= 'started' then return end
|
||||
if GetResourceState('t1ger_keys') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "t1ger_keys" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(src, vehicle, plate)
|
||||
--wip
|
||||
TriggerClientEvent("community_bridge:vehicleKey:giveKeys", src, plate)
|
||||
end
|
||||
|
||||
VehicleKey.RemoveKeys = function(src, vehicle, plate)
|
||||
-- wip
|
||||
|
||||
end
|
||||
@@ -1,10 +1,12 @@
|
||||
if GetResourceState('wasabi_carlock') ~= 'started' then return end
|
||||
if GetResourceState('wasabi_carlock') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "wasabi_carlock" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(vehicle, plate)
|
||||
if not plate and vehicle then plate = GetVehicleNumberPlateText(vehicle) end
|
||||
exports.wasabi_carlock:GiveKey(plate)
|
||||
end
|
||||
|
||||
VehicleKey.RemoveKeys = function(vehicle, plate)
|
||||
if not plate and vehicle then plate = GetVehicleNumberPlateText(vehicle) end
|
||||
exports.wasabi_carlock:RemoveKey(plate)
|
||||
end
|
||||
@@ -1,10 +1,12 @@
|
||||
if GetResourceState('wasabi_carlock') ~= 'started' then return end
|
||||
if GetResourceState('wasabi_carlock') ~= 'started' or (BridgeSharedConfig.VehicleKey ~= "wasabi_carlock" and BridgeSharedConfig.VehicleKey ~= "auto") then return end
|
||||
VehicleKey = VehicleKey or {}
|
||||
|
||||
VehicleKey.GiveKeys = function(src, vehicle, plate)
|
||||
--wip
|
||||
if not plate and vehicle then plate = GetVehicleNumberPlateText(vehicle) end
|
||||
exports.wasabi_carlock:GiveKey(src, plate)
|
||||
end
|
||||
|
||||
VehicleKey.RemoveKeys = function(src, vehicle, plate)
|
||||
-- wip
|
||||
if not plate and vehicle then plate = GetVehicleNumberPlateText(vehicle) end
|
||||
exports.wasabi_carlock:RemoveKey(src, plate)
|
||||
end
|
||||
@@ -1,5 +1,7 @@
|
||||
BridgeSharedConfig = {}
|
||||
BridgeSharedConfig.Lang = "auto" -- Change this to your preferred language (must match the locale file name ex. en or fr etc)
|
||||
BridgeSharedConfig.DebugLevel = 0 -- Change this to your Debug level, 0 for none, 1 for some, 2 for all data
|
||||
BridgeSharedConfig.VehicleKey = "auto" -- Change this to your prefrence or leave it as auto
|
||||
BridgeSharedConfig.Phone = "auto" -- Change this to your prefrence or leave it as auto
|
||||
|
||||
return BridgeSharedConfig
|
||||
Reference in new issue
Block a user