From 7736660115f18155435aee5b548f1dd580e98bf6 Mon Sep 17 00:00:00 2001 From: CarlBishop Date: Sat, 30 Sep 2023 10:18:15 +0200 Subject: [PATCH 1/7] Update fxmanifest.lua remove core module --- fxmanifest.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 1363948..72b8052 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -16,7 +16,6 @@ client_script 'client/main.lua' server_script 'server/main.lua' modules { - 'qbx_core:core', 'qbx_core:playerdata', 'qbx_core:utils' -} \ No newline at end of file +} From d5d836e086aecc7ce01b91f590cf3968d812a5ba Mon Sep 17 00:00:00 2001 From: CarlBishop Date: Sat, 30 Sep 2023 10:19:06 +0200 Subject: [PATCH 2/7] Update main.lua rename qb- to qbx_ --- client/main.lua | 52 ++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/client/main.lua b/client/main.lua index c5aad5c..138fdf5 100644 --- a/client/main.lua +++ b/client/main.lua @@ -37,7 +37,7 @@ CreateThread(function() if not isTakingKeys then isTakingKeys = true - TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(entering), 1) + TriggerServerEvent('qbx_vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(entering), 1) if lib.progressCircle({ duration = 2500, label = Lang:t("progress.takekeys"), @@ -48,17 +48,17 @@ CreateThread(function() car = true, }, }) then - TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate) + TriggerServerEvent('qbx_vehiclekeys:server:AcquireVehicleKeys', plate) isTakingKeys = false else isTakingKeys = false end end elseif Config.LockNPCDrivingCars then - TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(entering), 2) + TriggerServerEvent('qbx_vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(entering), 2) else - TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(entering), 1) - TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate) + TriggerServerEvent('qbx_vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(entering), 1) + TriggerServerEvent('qbx_vehiclekeys:server:AcquireVehicleKeys', plate) --Make passengers flee local pedsInVehicle = GetPedsInVehicle(entering) @@ -71,9 +71,9 @@ CreateThread(function() -- Parked car logic elseif driver == 0 and entering ~= lastPickedVehicle and not HasKeys(plate) and not isTakingKeys then if Config.LockNPCParkedCars then - TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(entering), 2) + TriggerServerEvent('qbx_vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(entering), 2) else - TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(entering), 1) + TriggerServerEvent('qbx_vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(entering), 1) end end end @@ -144,7 +144,7 @@ end) RegisterKeyMapping('engine', Lang:t("info.engine"), 'keyboard', 'G') RegisterCommand('engine', function() - TriggerEvent("qb-vehiclekeys:client:ToggleEngine") + TriggerEvent("qbx_vehiclekeys:client:ToggleEngine") end) AddEventHandler('onResourceStart', function(resourceName) @@ -163,7 +163,7 @@ RegisterNetEvent('QBCore:Client:OnPlayerUnload', function() KeysList = {} end) -RegisterNetEvent('qb-vehiclekeys:client:AddKeys', function(plate) +RegisterNetEvent('qbx_vehiclekeys:client:AddKeys', function(plate) KeysList[plate] = true if cache.vehicle then @@ -175,11 +175,11 @@ RegisterNetEvent('qb-vehiclekeys:client:AddKeys', function(plate) end end) -RegisterNetEvent('qb-vehiclekeys:client:RemoveKeys', function(plate) +RegisterNetEvent('qbx_vehiclekeys:client:RemoveKeys', function(plate) KeysList[plate] = nil end) -RegisterNetEvent('qb-vehiclekeys:client:ToggleEngine', function() +RegisterNetEvent('qbx_vehiclekeys:client:ToggleEngine', function() local engineOn = GetIsVehicleEngineRunning(GetVehiclePedIsIn(cache.ped)) local vehicle = GetVehiclePedIsIn(cache.ped, true) if HasKeys(QBX.Functions.GetPlate(vehicle)) then @@ -191,7 +191,7 @@ RegisterNetEvent('qb-vehiclekeys:client:ToggleEngine', function() end end) -RegisterNetEvent('qb-vehiclekeys:client:GiveKeys', function(id) +RegisterNetEvent('qbx_vehiclekeys:client:GiveKeys', function(id) local targetVehicle = GetVehicle() if targetVehicle then @@ -203,7 +203,7 @@ RegisterNetEvent('qb-vehiclekeys:client:GiveKeys', function(id) if IsPedSittingInVehicle(cache.ped, targetVehicle) then -- Give keys to everyone in vehicle local otherOccupants = GetOtherPlayersInVehicle(targetVehicle) for p = 1, #otherOccupants do - TriggerServerEvent('qb-vehiclekeys:server:GiveVehicleKeys', GetPlayerServerId(NetworkGetPlayerIndexFromPed(otherOccupants[p])), targetPlate) + TriggerServerEvent('qbx_vehiclekeys:server:GiveVehicleKeys', GetPlayerServerId(NetworkGetPlayerIndexFromPed(otherOccupants[p])), targetPlate) end else -- Give keys to closest player GiveKeys(GetPlayerServerId(GetClosestPlayer()), targetPlate) @@ -221,7 +221,7 @@ end) -- Backwards Compatibility ONLY -- Remove at some point -- RegisterNetEvent('vehiclekeys:client:SetOwner', function(plate) - TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate) + TriggerServerEvent('qbx_vehiclekeys:server:AcquireVehicleKeys', plate) end) -- Backwards Compatibility ONLY -- Remove at some point -- @@ -232,7 +232,7 @@ end) function GiveKeys(id, plate) local distance = #(GetEntityCoords(cache.ped) - GetEntityCoords(GetPlayerPed(GetPlayerFromServerId(id)))) if distance < 1.5 and distance > 0.0 then - TriggerServerEvent('qb-vehiclekeys:server:GiveVehicleKeys', id, plate) + TriggerServerEvent('qbx_vehiclekeys:server:GiveVehicleKeys', id, plate) else QBX.Functions.Notify(Lang:t("notify.not_near"), 'error') end @@ -287,7 +287,7 @@ function AreKeysJobShared(veh) for _, vehicle in pairs(v.vehicles) do if string.upper(vehicle) == string.upper(vehName) then if not HasKeys(vehPlate) then - TriggerServerEvent("qb-vehiclekeys:server:AcquireVehicleKeys", vehPlate) + TriggerServerEvent("qbx_vehiclekeys:server:AcquireVehicleKeys", vehPlate) end return true end @@ -309,10 +309,10 @@ function ToggleVehicleLocks(veh) TriggerServerEvent("InteractSound_SV:PlayWithinDistance", 5, "lock", 0.3) NetworkRequestControlOfEntity(veh) if vehLockStatus == 1 then - TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(veh), 2) + TriggerServerEvent('qbx_vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(veh), 2) QBX.Functions.Notify(Lang:t("notify.vehicle_locked"), 'inform') else - TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(veh), 1) + TriggerServerEvent('qbx_vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(veh), 1) QBX.Functions.Notify(Lang:t("notify.vehicle_unlocked"), 'inform') end @@ -327,7 +327,7 @@ function ToggleVehicleLocks(veh) QBX.Functions.Notify(Lang:t("notify.no_keys"), 'error') end else - TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(veh), 1) + TriggerServerEvent('qbx_vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(veh), 1) end end end @@ -397,10 +397,10 @@ function LockpickFinishCallback(success) lastPickedVehicle = vehicle if GetPedInVehicleSeat(vehicle, -1) == cache.ped then - TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', QBX.Functions.GetPlate(vehicle)) + TriggerServerEvent('qbx_vehiclekeys:server:AcquireVehicleKeys', QBX.Functions.GetPlate(vehicle)) else QBX.Functions.Notify(Lang:t("notify.vehicle_lockedpick"), 'success') - TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(vehicle), 1) + TriggerServerEvent('qbx_vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(vehicle), 1) end else @@ -410,11 +410,11 @@ function LockpickFinishCallback(success) if usingAdvanced then if chance <= Config.RemoveLockpickAdvanced then - TriggerServerEvent("qb-vehiclekeys:server:breakLockpick", "advancedlockpick") + TriggerServerEvent("qbx_vehiclekeys:server:breakLockpick", "advancedlockpick") end else if chance <= Config.RemoveLockpickNormal then - TriggerServerEvent("qb-vehiclekeys:server:breakLockpick", "lockpick") + TriggerServerEvent("qbx_vehiclekeys:server:breakLockpick", "lockpick") end end end @@ -443,7 +443,7 @@ function Hotwire(vehicle, plate) }) then StopAnimTask(cache.ped, "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0) if (math.random() <= Config.HotwireChance) then - TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate) + TriggerServerEvent('qbx_vehiclekeys:server:AcquireVehicleKeys', plate) else TriggerServerEvent('hud:server:GainStress', math.random(1, 4)) QBX.Functions.Notify(Lang:t("notify.failed_lockedpick"), 'error') @@ -518,7 +518,7 @@ function CarjackVehicle(target) end) end TriggerServerEvent('hud:server:GainStress', math.random(1, 4)) - TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate) + TriggerServerEvent('qbx_vehiclekeys:server:AcquireVehicleKeys', plate) else QBX.Functions.Notify(Lang:t("notify.carjack_failed"), 'error') MakePedFlee(target) @@ -557,4 +557,4 @@ end function MakePedFlee(ped) SetPedFleeAttributes(ped, 0, 0) TaskReactAndFleePed(ped, cache.ped) -end \ No newline at end of file +end From dcfae8f38ddcfec6fdc1cca0d22adf039ae26f75 Mon Sep 17 00:00:00 2001 From: CarlBishop Date: Sat, 30 Sep 2023 10:21:01 +0200 Subject: [PATCH 3/7] Update main.lua replace functions --- server/main.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/server/main.lua b/server/main.lua index 709d86a..785ffbb 100644 --- a/server/main.lua +++ b/server/main.lua @@ -13,7 +13,7 @@ local vehicleList = {} -- Event to give keys. receiver can either be a single id, or a table of ids. -- Must already have keys to the vehicle, trigger the event from the server, or pass forcegive paramter as true. -RegisterNetEvent('qb-vehiclekeys:server:GiveVehicleKeys', function(receiver, plate) +RegisterNetEvent('qbx_vehiclekeys:server:GiveVehicleKeys', function(receiver, plate) local giver = source if HasKeys(giver, plate) then @@ -30,13 +30,13 @@ RegisterNetEvent('qb-vehiclekeys:server:GiveVehicleKeys', function(receiver, pla end end) -RegisterNetEvent('qb-vehiclekeys:server:AcquireVehicleKeys', function(plate) +RegisterNetEvent('qbx_vehiclekeys:server:AcquireVehicleKeys', function(plate) local src = source GiveKeys(src, plate) end) -RegisterNetEvent('qb-vehiclekeys:server:breakLockpick', function(itemName) - local player = QBX.Functions.GetPlayer(source) +RegisterNetEvent('qbx_vehiclekeys:server:breakLockpick', function(itemName) + local player = exports.qbx_core:GetPlayer(source) if not player then return end if not (itemName == "lockpick" or itemName == "advancedlockpick") then return end if player.Functions.RemoveItem(itemName, 1) then @@ -44,12 +44,12 @@ RegisterNetEvent('qb-vehiclekeys:server:breakLockpick', function(itemName) end end) -RegisterNetEvent('qb-vehiclekeys:server:setVehLockState', function(vehNetId, state) +RegisterNetEvent('qbx_vehiclekeys:server:setVehLockState', function(vehNetId, state) SetVehicleDoorsLocked(NetworkGetEntityFromNetworkId(vehNetId), state) end) lib.callback.register('qbx-vehiclekeys:server:getVehicleKeys', function(source) - local citizenid = QBX.Functions.GetPlayer(source).PlayerData.citizenid + local citizenid = exports.qbx_core:GetPlayer(source).PlayerData.citizenid local keysList = {} for plate, citizenids in pairs (vehicleList) do if citizenids[citizenid] then @@ -63,27 +63,27 @@ end) ---- Functions ---- ----------------------- function GiveKeys(id, plate) - local citizenid = QBX.Functions.GetPlayer(id).PlayerData.citizenid + local citizenid = exports.qbx_core:GetPlayer(id).PlayerData.citizenid if not vehicleList[plate] then vehicleList[plate] = {} end vehicleList[plate][citizenid] = true TriggerClientEvent('QBCore:Notify', id, Lang:t('notify.keys_taken')) - TriggerClientEvent('qb-vehiclekeys:client:AddKeys', id, plate) + TriggerClientEvent('qbx_vehiclekeys:client:AddKeys', id, plate) end function RemoveKeys(id, plate) - local citizenid = QBX.Functions.GetPlayer(id).PlayerData.citizenid + local citizenid = exports.qbx_core:GetPlayer(id).PlayerData.citizenid if vehicleList[plate] and vehicleList[plate][citizenid] then vehicleList[plate][citizenid] = nil end - TriggerClientEvent('qb-vehiclekeys:client:RemoveKeys', id, plate) + TriggerClientEvent('qbx_vehiclekeys:client:RemoveKeys', id, plate) end function HasKeys(id, plate) - local citizenid = QBX.Functions.GetPlayer(id).PlayerData.citizenid + local citizenid = exports.qbx_core:GetPlayer(id).PlayerData.citizenid if vehicleList[plate] and vehicleList[plate][citizenid] then return true end @@ -103,7 +103,7 @@ lib.addCommand('givekeys', { restricted = false, }, function (source, args) local src = source - TriggerClientEvent('qb-vehiclekeys:client:GiveKeys', src, args.id) + TriggerClientEvent('qbx_vehiclekeys:client:GiveKeys', src, args.id) end) lib.addCommand('addkeys', { From 70585360248e8ff128fa069a64ab9447163158be Mon Sep 17 00:00:00 2001 From: CarlBishop Date: Sat, 30 Sep 2023 11:28:11 +0200 Subject: [PATCH 4/7] Update main.lua others renames exports.qbx_core: --- client/main.lua | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/client/main.lua b/client/main.lua index 138fdf5..fcbe886 100644 --- a/client/main.lua +++ b/client/main.lua @@ -23,7 +23,7 @@ CreateThread(function() local carIsImmune = false if entering ~= 0 and not isBlacklistedVehicle(entering) then sleep = 2000 - local plate = QBX.Functions.GetPlate(entering) + local plate = GetPlate(entering) local driver = GetPedInVehicleSeat(entering, -1) for _, veh in ipairs(Config.ImmuneVehicles) do @@ -81,7 +81,7 @@ CreateThread(function() -- Hotwiring while in vehicle, also keeps engine off for vehicles you don't own keys to if cache.vehicle and not isHotwiring then sleep = 1000 - local plate = QBX.Functions.GetPlate(cache.vehicle) + local plate = GetPlate(cache.vehicle) if GetPedInVehicleSeat(cache.vehicle, -1) == cache.ped and not HasKeys(plate) and not isBlacklistedVehicle(cache.vehicle) and not AreKeysJobShared(cache.vehicle) then sleep = 0 @@ -167,7 +167,7 @@ RegisterNetEvent('qbx_vehiclekeys:client:AddKeys', function(plate) KeysList[plate] = true if cache.vehicle then - local vehicleplate = QBX.Functions.GetPlate(cache.vehicle) + local vehicleplate = GetPlate(cache.vehicle) if plate == vehicleplate then SetVehicleEngineOn(cache.vehicle, false, false, false) @@ -182,7 +182,7 @@ end) RegisterNetEvent('qbx_vehiclekeys:client:ToggleEngine', function() local engineOn = GetIsVehicleEngineRunning(GetVehiclePedIsIn(cache.ped)) local vehicle = GetVehiclePedIsIn(cache.ped, true) - if HasKeys(QBX.Functions.GetPlate(vehicle)) then + if HasKeys(GetPlate(vehicle)) then if engineOn then SetVehicleEngineOn(vehicle, false, false, true) else @@ -195,7 +195,7 @@ RegisterNetEvent('qbx_vehiclekeys:client:GiveKeys', function(id) local targetVehicle = GetVehicle() if targetVehicle then - local targetPlate = QBX.Functions.GetPlate(targetVehicle) + local targetPlate = GetPlate(targetVehicle) if HasKeys(targetPlate) then if id and type(id) == "number" then -- Give keys to specific ID GiveKeys(id, targetPlate) @@ -210,7 +210,7 @@ RegisterNetEvent('qbx_vehiclekeys:client:GiveKeys', function(id) end end else - QBX.Functions.Notify(Lang:t("notify.no_keys"), 'error') + exports.qbx_core:Notify(Lang:t("notify.no_keys"), 'error') end end end) @@ -234,7 +234,7 @@ function GiveKeys(id, plate) if distance < 1.5 and distance > 0.0 then TriggerServerEvent('qbx_vehiclekeys:server:GiveVehicleKeys', id, plate) else - QBX.Functions.Notify(Lang:t("notify.not_near"), 'error') + exports.qbx_core:Notify(Lang:t("notify.not_near"), 'error') end end @@ -300,7 +300,7 @@ end function ToggleVehicleLocks(veh) if veh then if not isBlacklistedVehicle(veh) then - if HasKeys(QBX.Functions.GetPlate(veh)) or AreKeysJobShared(veh) then + if HasKeys(GetPlate(veh)) or AreKeysJobShared(veh) then local vehLockStatus = GetVehicleDoorLockStatus(veh) lib.requestAnimDict('anim@mp_player_intmenu@key_fob@') @@ -310,10 +310,10 @@ function ToggleVehicleLocks(veh) NetworkRequestControlOfEntity(veh) if vehLockStatus == 1 then TriggerServerEvent('qbx_vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(veh), 2) - QBX.Functions.Notify(Lang:t("notify.vehicle_locked"), 'inform') + exports.qbx_core:Notify(Lang:t("notify.vehicle_locked"), 'inform') else TriggerServerEvent('qbx_vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(veh), 1) - QBX.Functions.Notify(Lang:t("notify.vehicle_unlocked"), 'inform') + exports.qbx_core:Notify(Lang:t("notify.vehicle_unlocked"), 'inform') end SetVehicleLights(veh, 2) @@ -324,7 +324,7 @@ function ToggleVehicleLocks(veh) Wait(300) ClearPedTasks(cache.ped) else - QBX.Functions.Notify(Lang:t("notify.no_keys"), 'error') + exports.qbx_core:Notify(Lang:t("notify.no_keys"), 'error') end else TriggerServerEvent('qbx_vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(veh), 1) @@ -368,10 +368,10 @@ end function LockpickDoor(isAdvanced) local pos = GetEntityCoords(cache.ped) - local vehicle = QBX.Functions.GetClosestVehicle() + local vehicle = exports.qbx_core:GetClosestVehicle() if vehicle == nil or vehicle == 0 then return end - if HasKeys(QBX.Functions.GetPlate(vehicle)) then return end + if HasKeys(GetPlate(vehicle)) then return end if #(pos - GetEntityCoords(vehicle)) > 2.5 then return end if GetVehicleDoorLockStatus(vehicle) <= 0 then return end @@ -389,7 +389,7 @@ function LockpickDoor(isAdvanced) end function LockpickFinishCallback(success) - local vehicle = QBX.Functions.GetClosestVehicle() + local vehicle = exports.qbx_core:GetClosestVehicle() local chance = math.random() if success then @@ -397,9 +397,9 @@ function LockpickFinishCallback(success) lastPickedVehicle = vehicle if GetPedInVehicleSeat(vehicle, -1) == cache.ped then - TriggerServerEvent('qbx_vehiclekeys:server:AcquireVehicleKeys', QBX.Functions.GetPlate(vehicle)) + TriggerServerEvent('qbx_vehiclekeys:server:AcquireVehicleKeys', GetPlate(vehicle)) else - QBX.Functions.Notify(Lang:t("notify.vehicle_lockedpick"), 'success') + exports.qbx_core:Notify(Lang:t("notify.vehicle_lockedpick"), 'success') TriggerServerEvent('qbx_vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(vehicle), 1) end @@ -446,7 +446,7 @@ function Hotwire(vehicle, plate) TriggerServerEvent('qbx_vehiclekeys:server:AcquireVehicleKeys', plate) else TriggerServerEvent('hud:server:GainStress', math.random(1, 4)) - QBX.Functions.Notify(Lang:t("notify.failed_lockedpick"), 'error') + exports.qbx_core:Notify(Lang:t("notify.failed_lockedpick"), 'error') end Wait(Config.TimeBetweenHotwires) isHotwiring = false @@ -505,7 +505,7 @@ function CarjackVehicle(target) carjackChance = 0.5 end if math.random() <= carjackChance then - local plate = QBX.Functions.GetPlate(vehicle) + local plate = GetPlate(vehicle) for p=1,#occupants do local ped = occupants[p] CreateThread(function() @@ -520,7 +520,7 @@ function CarjackVehicle(target) TriggerServerEvent('hud:server:GainStress', math.random(1, 4)) TriggerServerEvent('qbx_vehiclekeys:server:AcquireVehicleKeys', plate) else - QBX.Functions.Notify(Lang:t("notify.carjack_failed"), 'error') + exports.qbx_core:Notify(Lang:t("notify.carjack_failed"), 'error') MakePedFlee(target) TriggerServerEvent('hud:server:GainStress', math.random(1, 4)) end From 7b4ba068a8b10b512c4e4ebd4362cd84d536480a Mon Sep 17 00:00:00 2001 From: CarlBishop Date: Sat, 30 Sep 2023 14:20:00 +0200 Subject: [PATCH 5/7] Update main.lua DrawText3D --- client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index fcbe886..3e3c354 100644 --- a/client/main.lua +++ b/client/main.lua @@ -87,7 +87,7 @@ CreateThread(function() sleep = 0 local vehiclePos = GetOffsetFromEntityInWorldCoords(cache.vehicle, 0.0, 1.0, 0.5) - QBX.Functions.DrawText3D(Lang:t('info.search_keys'), vehiclePos) + DrawText3D(Lang:t('info.search_keys'), vehiclePos) SetVehicleEngineOn(cache.vehicle, false, false, true) if IsControlJustPressed(0, 74) then From ff0d316f550514121eeb1b5bcbcd3f086b255c17 Mon Sep 17 00:00:00 2001 From: CarlBishop Date: Sat, 30 Sep 2023 14:27:01 +0200 Subject: [PATCH 6/7] Update main.lua --- client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index 3e3c354..678fc58 100644 --- a/client/main.lua +++ b/client/main.lua @@ -239,7 +239,7 @@ function GiveKeys(id, plate) end function GetKeys() - lib.callback('qbx-vehiclekeys:server:getVehicleKeys', function(keysList) + lib.callback('qbx_vehiclekeys:server:getVehicleKeys', function(keysList) KeysList = keysList end) end From f77e778d784322bd989507054952f4ab6d99e0ab Mon Sep 17 00:00:00 2001 From: CarlBishop Date: Sat, 30 Sep 2023 14:27:34 +0200 Subject: [PATCH 7/7] Update main.lua --- server/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 785ffbb..22bf03a 100644 --- a/server/main.lua +++ b/server/main.lua @@ -48,7 +48,7 @@ RegisterNetEvent('qbx_vehiclekeys:server:setVehLockState', function(vehNetId, st SetVehicleDoorsLocked(NetworkGetEntityFromNetworkId(vehNetId), state) end) -lib.callback.register('qbx-vehiclekeys:server:getVehicleKeys', function(source) +lib.callback.register('qbx_vehiclekeys:server:getVehicleKeys', function(source) local citizenid = exports.qbx_core:GetPlayer(source).PlayerData.citizenid local keysList = {} for plate, citizenids in pairs (vehicleList) do