From 60b0b2e39dd574467b96adb857bc28d66e547a30 Mon Sep 17 00:00:00 2001 From: Matthew <22198949+mafewtm@users.noreply.github.com> Date: Sun, 10 Nov 2024 11:30:37 -0500 Subject: [PATCH] fix(server): vehicle mods and version checking --- server/commands.lua | 2 +- server/main.lua | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/server/commands.lua b/server/commands.lua index 756b980..c3541aa 100644 --- a/server/commands.lua +++ b/server/commands.lua @@ -10,7 +10,7 @@ lib.addCommand('callsign', { }, function(source, args) local player = exports.qbx_core:GetPlayer(source) - if not player or player.PlayerData.job.type ~= 'leo' or player.PlayerData.job.type ~= 'ems' then return end + if not player or player.PlayerData.job.type ~= 'leo' and player.PlayerData.job.type ~= 'ems' then return end player.Functions.SetMetaData('callsign', args.callsign) end) diff --git a/server/main.lua b/server/main.lua index 5da1568..aceb55c 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1,3 +1,7 @@ +assert(lib.checkDependency('qbx_vehicles', '1.4.1', true)) +assert(lib.checkDependency('qbx_garages', '1.1.3', true)) +lib.versionCheck('Qbox-project/qbx_police') + local config = require 'config.server' local sharedConfig = require 'config.shared' @@ -38,6 +42,7 @@ end lib.callback.register('qbx_police:server:spawnVehicle', function(source, vehicle, spawn) local ped = GetPlayerPed(source) + vehicle.mods = vehicle.mods or {} vehicle.mods.plate = vehicle.mods.plate or ('LSPD%s'):format(math.random(1000, 9999)) local netId, veh = qbx.spawnVehicle({