From a7c3ff626510574ed8a1965f9561af4f3ef97912 Mon Sep 17 00:00:00 2001 From: Manason Date: Tue, 14 Nov 2023 19:08:30 -0800 Subject: [PATCH] feat: specify give vehicle key function via Config --- config.lua | 4 ++++ server/commands.lua | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config.lua b/config.lua index 9d0d23d20..089d974a9 100644 --- a/config.lua +++ b/config.lua @@ -169,3 +169,7 @@ Config.StarterItems = { -- Character starting items end }, } + +Config.GiveVehicleKeys = function(src, plate) + exports.qbx_vehiclekeys:GiveKeys(src, plate) +end diff --git a/server/commands.lua b/server/commands.lua index 3f5a639c0..7ed4f6db1 100644 --- a/server/commands.lua +++ b/server/commands.lua @@ -139,7 +139,7 @@ lib.addCommand('car', { if not args then return end local netId = SpawnVehicle(source, args[Lang:t("command.car.params.model.name")], nil, true) local plate = GetPlate(NetworkGetEntityFromNetworkId(netId)) - exports.qbx_vehiclekeys:GiveKeys(source, plate) + Config.GiveVehicleKeys(source, plate) end) lib.addCommand('dv', {