vehiclekeys to auto or manual

This commit is contained in:
MrNewb committed 2025-03-03 19:09:18 -05:00
1 parent b0f1704806
commit 6bcd894fdb
12 files changed
+27 -39

No files matched your search

@@ -1,10 +1,12 @@
if GetResourceState('F_RealCarKeysSystem') ~= 'started' or (BridgeClientConfig.VehicleKey ~= "F_RealCarKeysSystem" and BridgeClientConfig.VehicleKey ~= "auto") then return end
VehicleKey = VehicleKey or {}
VehicleKey.GiveKeys = function(vehicle, plate)
if not plate then return false end
TriggerServerEvent('F_RealCarKeysSystem:generateVehicleKeys', plate)
end
VehicleKey.RemoveKeys = function(vehicle, plate)
return
return true
end
@@ -3,12 +3,11 @@ if GetResourceState('MrNewbVehicleKeys') ~= 'started' or (BridgeClientConfig.Veh
VehicleKey = VehicleKey or {}
VehicleKey.GiveKeys = function(vehicle, plate)
if not DoesEntityExist(vehicle) and not plate then return false end
return exports.MrNewbVehicleKeys:GiveKeys(vehicle)
if not plate then return false end
return exports.MrNewbVehicleKeys:GiveKeysByPlate(plate)
end
VehicleKey.RemoveKeys = function(vehicle, plate)
if not vehicle and not plate then return false end
if not DoesEntityExist(vehicle) then return exports.MrNewbVehicleKeys:RemoveKeysByPlate(plate) end
return exports.MrNewbVehicleKeys:RemoveKeys(vehicle)
if not plate then return false end
return exports.MrNewbVehicleKeys:RemoveKeysByPlate(plate)
end
@@ -3,11 +3,11 @@ if GetResourceState('Renewed-Vehiclekeys') ~= 'started' or (BridgeClientConfig.V
VehicleKey = VehicleKey or {}
VehicleKey.GiveKeys = function(vehicle, plate)
if not plate and not DoesEntityExist(vehicle) then return false end
if not plate then return false end
return exports['Renewed-Vehiclekeys']:addKey(plate)
end
VehicleKey.RemoveKeys = function(vehicle, plate)
if not plate and not DoesEntityExist(vehicle) then return false end
if not plate then return false end
return exports['Renewed-Vehiclekeys']:removeKey(plate)
end
@@ -1,9 +1,9 @@
VehicleKey = VehicleKey or {}
VehicleKey.GiveKeys = function(vehicle, plate)
-- wip
return true, print("There Is No Vehicle Key System Installed")
end
VehicleKey.RemoveKeys = function(vehicle, plate)
-- wip
return true, print("There Is No Vehicle Key System Installed")
end
@@ -1,10 +1,12 @@
if GetResourceState('cd_garage') ~= 'started' or (BridgeClientConfig.VehicleKey ~= "cd_garage" and BridgeClientConfig.VehicleKey ~= "auto") then return end
VehicleKey = VehicleKey or {}
VehicleKey.GiveKeys = function(vehicle, plate)
if not plate then return false end
TriggerEvent('cd_garage:AddKeys', plate)
end
VehicleKey.RemoveKeys = function(vehicle, plate)
return true
end
@@ -3,11 +3,11 @@ if GetResourceState('mk_vehiclekeys') ~= 'started' or (BridgeClientConfig.Vehicl
VehicleKey = VehicleKey or {}
VehicleKey.GiveKeys = function(vehicle, plate)
if not DoesEntityExist(vehicle) then return false end
if not vehicle and not DoesEntityExist(vehicle) then return false end
return exports["mk_vehiclekeys"]:AddKey(vehicle)
end
VehicleKey.RemoveKeys = function(vehicle, plate)
if not DoesEntityExist(vehicle) then return false end
if not vehicle and not DoesEntityExist(vehicle) then return false end
return exports["mk_vehiclekeys"]:RemoveKey(vehicle)
end
@@ -2,11 +2,11 @@ if GetResourceState('mono_carkeys') ~= 'started' or (BridgeClientConfig.VehicleK
VehicleKey = VehicleKey or {}
VehicleKey.GiveKeys = function(vehicle, plate)
if type(plate) ~= 'string' then return end
if not plate then return false end
TriggerServerEvent('mono_carkeys:CreateKey', plate)
end
VehicleKey.RemoveKeys = function(vehicle, plate)
if type(plate) ~= 'string' then return end
if not plate then return false end
TriggerServerEvent('mono_carkeys:DeleteKey', 1, plate)
end
@@ -3,6 +3,7 @@ if GetResourceState('okokGarage') ~= 'started' or (BridgeClientConfig.VehicleKey
VehicleKey = VehicleKey or {}
VehicleKey.GiveKeys = function(vehicle, plate)
if not plate then return false end
TriggerServerEvent('okokGarage:GiveKeys', plate)
end
@@ -2,11 +2,11 @@ if GetResourceState('qb-vehiclekeys') ~= 'started' and not GetResourceState("qbx
VehicleKey = VehicleKey or {}
VehicleKey.GiveKeys = function(vehicle, plate)
if not plate and vehicle then plate = GetVehicleNumberPlateText(vehicle) end
if not plate then return false end
TriggerServerEvent("qb-vehiclekeys:server:AcquireVehicleKeys", plate)
end
VehicleKey.RemoveKeys = function(vehicle, plate)
if not plate and vehicle then plate = GetVehicleNumberPlateText(vehicle) end
if not plate then return false end
TriggerEvent("qb-vehiclekeys:client:RemoveKeys", plate)
end
@@ -1,9 +1,9 @@
if GetResourceState('qbx_vehiclekeys') ~= 'started' or (BridgeClientConfig.VehicleKey ~= "qbx_vehiclekeys" and BridgeClientConfig.VehicleKey ~= "auto") then return end
if GetResourceState('qbx_vehiclekeys') ~= 'started' or (BridgeClientConfig.VehicleKey ~= "qbx" and BridgeClientConfig.VehicleKey ~= "auto") then return end
VehicleKey = VehicleKey or {}
VehicleKey.GiveKeys = function(vehicle, plate)
if not plate and vehicle then plate = GetVehicleNumberPlateText(vehicle) end
if not plate then return false end
TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate)
end
@@ -3,27 +3,15 @@ if GetResourceState('qs-vehiclekeys') ~= 'started' or (BridgeClientConfig.Vehicl
VehicleKey = VehicleKey or {}
VehicleKey.GiveKeys = function(vehicle, plate)
if not vehicle then return end
if not vehicle then return false end
local model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))
local verifiedPlate = GetVehicleNumberPlateText(vehicle)
return exports['qs-vehiclekeys']:GiveKeys(verifiedPlate, model, true)
end
VehicleKey.RemoveKeys = function(vehicle, plate)
if not vehicle then return end
if not vehicle then return false 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)
end
@@ -10,8 +10,4 @@ end
VehicleKey.RemoveKeys = function(vehicle, plate)
end
RegisterNetEvent("community_bridge:vehicleKey:giveKeys", function(plate)
VehicleKey.GiveKeys(nil, plate)
end)
end