From 1d9431f88e6e5fdd51aac9bfe15c99d70024ba55 Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Sun, 26 Oct 2025 15:19:35 -0400 Subject: [PATCH] folder name changes --- modules/vehiclekey/_default/client/client.lua | 24 +++++++++++ .../vehiclekey/cd_garage/client/client.lua | 34 +++++++++++++++ .../f_realcarkeyssystem/client/client.lua | 38 ++++++++++++++++ modules/vehiclekey/jacksam/client.lua | 41 ++++++++++++++++++ modules/vehiclekey/mVehicle/client/client.lua | 30 +++++++++++++ .../mk_vehiclekeys/client/client.lua | 33 ++++++++++++++ .../mrnewbvehiclekeys/client/client.lua | 41 ++++++++++++++++++ .../vehiclekey/okokGarage/client/client.lua | 42 ++++++++++++++++++ .../qb-vehiclekeys/client/client.lua | 41 ++++++++++++++++++ .../qbx_vehiclekeys/client/client.lua | 41 ++++++++++++++++++ .../qs-vehiclekeys/client/client.lua | 43 +++++++++++++++++++ .../renewed-vehiclekeys/client/client.lua | 41 ++++++++++++++++++ .../vehiclekey/t1ger_keys/client/client.lua | 35 +++++++++++++++ .../wasabi_carlock/client/client.lua | 41 ++++++++++++++++++ 14 files changed, 525 insertions(+) create mode 100644 modules/vehiclekey/_default/client/client.lua create mode 100644 modules/vehiclekey/cd_garage/client/client.lua create mode 100644 modules/vehiclekey/f_realcarkeyssystem/client/client.lua create mode 100644 modules/vehiclekey/jacksam/client.lua create mode 100644 modules/vehiclekey/mVehicle/client/client.lua create mode 100644 modules/vehiclekey/mk_vehiclekeys/client/client.lua create mode 100644 modules/vehiclekey/mrnewbvehiclekeys/client/client.lua create mode 100644 modules/vehiclekey/okokGarage/client/client.lua create mode 100644 modules/vehiclekey/qb-vehiclekeys/client/client.lua create mode 100644 modules/vehiclekey/qbx_vehiclekeys/client/client.lua create mode 100644 modules/vehiclekey/qs-vehiclekeys/client/client.lua create mode 100644 modules/vehiclekey/renewed-vehiclekeys/client/client.lua create mode 100644 modules/vehiclekey/t1ger_keys/client/client.lua create mode 100644 modules/vehiclekey/wasabi_carlock/client/client.lua diff --git a/modules/vehiclekey/_default/client/client.lua b/modules/vehiclekey/_default/client/client.lua new file mode 100644 index 0000000..7ab8d33 --- /dev/null +++ b/modules/vehiclekey/_default/client/client.lua @@ -0,0 +1,24 @@ +---@diagnostic disable: duplicate-set-field +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + print("There is no compatible vehicle key resource.") +end + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + print("There is no compatible vehicle key resource.") +end + +VehicleKey.GetResourceName = function() + return "default" +end + +return VehicleKey \ No newline at end of file diff --git a/modules/vehiclekey/cd_garage/client/client.lua b/modules/vehiclekey/cd_garage/client/client.lua new file mode 100644 index 0000000..56f5313 --- /dev/null +++ b/modules/vehiclekey/cd_garage/client/client.lua @@ -0,0 +1,34 @@ +---@diagnostic disable: duplicate-set-field +local resourceName = "cd_garage" +if GetResourceState(resourceName) == 'missing' then return end + +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + TriggerEvent('cd_garage:AddKeys', plate) +end + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + print("cd_garage doesnt support removing keys.") +end + +VehicleKey.GetResourceName = function() + return resourceName +end + +return VehicleKey \ No newline at end of file diff --git a/modules/vehiclekey/f_realcarkeyssystem/client/client.lua b/modules/vehiclekey/f_realcarkeyssystem/client/client.lua new file mode 100644 index 0000000..2861a9d --- /dev/null +++ b/modules/vehiclekey/f_realcarkeyssystem/client/client.lua @@ -0,0 +1,38 @@ +---@diagnostic disable: duplicate-set-field +local resourceName = "F_RealCarKeysSystem" +if GetResourceState(resourceName) == 'missing' then return end + +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + if not plate then plate = GetVehicleNumberPlateText(vehicle) end + + TriggerServerEvent('F_RealCarKeysSystem:generateVehicleKeys', plate) +end + +-- TODO: Test, documentation of the script is missing + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then plate = GetVehicleNumberPlateText(vehicle) end + + TriggerServerEvent('F_RealCarKeysSystem:removeVehicleKeysByPlate', plate) +end + +VehicleKey.GetResourceName = function() + return resourceName +end + +return VehicleKey \ No newline at end of file diff --git a/modules/vehiclekey/jacksam/client.lua b/modules/vehiclekey/jacksam/client.lua new file mode 100644 index 0000000..f1f1b32 --- /dev/null +++ b/modules/vehiclekey/jacksam/client.lua @@ -0,0 +1,41 @@ +---@diagnostic disable: duplicate-set-field +local resourceName = "jaksams_VehiclesKeys" +if GetResourceState(resourceName) == 'missing' then return end + +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + TriggerServerEvent("vehicles_keys:selfGiveVehicleKeys", plate) +end + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + TriggerServerEvent("vehicles_keys:selfRemoveKeys", plate) +end + +VehicleKey.GetResourceName = function() + return resourceName +end + +return VehicleKey \ No newline at end of file diff --git a/modules/vehiclekey/mVehicle/client/client.lua b/modules/vehiclekey/mVehicle/client/client.lua new file mode 100644 index 0000000..e89acc9 --- /dev/null +++ b/modules/vehiclekey/mVehicle/client/client.lua @@ -0,0 +1,30 @@ +---@diagnostic disable: duplicate-set-field +local resourceName = "mVehicle" +if GetResourceState(resourceName) == 'missing' then return end + +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + exports.mVehicle:AddTemporalVehicleClient(vehicle) +end + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + print("mVehicle doesnt support removing keys.") +end + +VehicleKey.GetResourceName = function() + return resourceName +end + +return VehicleKey \ No newline at end of file diff --git a/modules/vehiclekey/mk_vehiclekeys/client/client.lua b/modules/vehiclekey/mk_vehiclekeys/client/client.lua new file mode 100644 index 0000000..e70ebca --- /dev/null +++ b/modules/vehiclekey/mk_vehiclekeys/client/client.lua @@ -0,0 +1,33 @@ +---@diagnostic disable: duplicate-set-field +local resourceName = "mk_vehiclekeys" +if GetResourceState(resourceName) == 'missing' then return end + +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + exports["mk_vehiclekeys"]:AddKey(vehicle) +end + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + exports["mk_vehiclekeys"]:RemoveKey(vehicle) +end + +VehicleKey.GetResourceName = function() + return resourceName +end + +return VehicleKey \ No newline at end of file diff --git a/modules/vehiclekey/mrnewbvehiclekeys/client/client.lua b/modules/vehiclekey/mrnewbvehiclekeys/client/client.lua new file mode 100644 index 0000000..6f6b8fa --- /dev/null +++ b/modules/vehiclekey/mrnewbvehiclekeys/client/client.lua @@ -0,0 +1,41 @@ +---@diagnostic disable: duplicate-set-field +local resourceName = "MrNewbVehicleKeys" +if GetResourceState(resourceName) == 'missing' then return end + +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + return exports.MrNewbVehicleKeys:GiveKeysByPlate(plate) +end + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + return exports.MrNewbVehicleKeys:RemoveKeysByPlate(plate) +end + +VehicleKey.GetResourceName = function() + return resourceName +end + +return VehicleKey \ No newline at end of file diff --git a/modules/vehiclekey/okokGarage/client/client.lua b/modules/vehiclekey/okokGarage/client/client.lua new file mode 100644 index 0000000..84e09d8 --- /dev/null +++ b/modules/vehiclekey/okokGarage/client/client.lua @@ -0,0 +1,42 @@ +---@diagnostic disable: duplicate-set-field +local resourceName = "okokGarage" +if GetResourceState(resourceName) == 'missing' then return end + +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + TriggerServerEvent('okokGarage:GiveKeys', plate) +end + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + local source = GetPlayerServerId(PlayerId()) + TriggerServerEvent("okokGarage:RemoveKeys", plate, source) +end + +VehicleKey.GetResourceName = function() + return resourceName +end + +return VehicleKey \ No newline at end of file diff --git a/modules/vehiclekey/qb-vehiclekeys/client/client.lua b/modules/vehiclekey/qb-vehiclekeys/client/client.lua new file mode 100644 index 0000000..52f2fbd --- /dev/null +++ b/modules/vehiclekey/qb-vehiclekeys/client/client.lua @@ -0,0 +1,41 @@ +---@diagnostic disable: duplicate-set-field +local resourceName = "qb-vehiclekeys" +if GetResourceState(resourceName) == 'missing' then return end + +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + TriggerServerEvent("qb-vehiclekeys:server:AcquireVehicleKeys", plate) +end + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + TriggerEvent("qb-vehiclekeys:client:RemoveKeys", plate) +end + +VehicleKey.GetResourceName = function() + return resourceName +end + +return VehicleKey \ No newline at end of file diff --git a/modules/vehiclekey/qbx_vehiclekeys/client/client.lua b/modules/vehiclekey/qbx_vehiclekeys/client/client.lua new file mode 100644 index 0000000..2735ab8 --- /dev/null +++ b/modules/vehiclekey/qbx_vehiclekeys/client/client.lua @@ -0,0 +1,41 @@ +---@diagnostic disable: duplicate-set-field +local resourceName = "qbx_vehiclekeys" +if GetResourceState(resourceName) == 'missing' then return end + +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + TriggerServerEvent("qb-vehiclekeys:server:AcquireVehicleKeys", plate) +end + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + TriggerEvent("qb-vehiclekeys:client:RemoveKeys", plate) +end + +VehicleKey.GetResourceName = function() + return resourceName +end + +return VehicleKey \ No newline at end of file diff --git a/modules/vehiclekey/qs-vehiclekeys/client/client.lua b/modules/vehiclekey/qs-vehiclekeys/client/client.lua new file mode 100644 index 0000000..36708d8 --- /dev/null +++ b/modules/vehiclekey/qs-vehiclekeys/client/client.lua @@ -0,0 +1,43 @@ +---@diagnostic disable: duplicate-set-field +local resourceName = "qs-vehiclekeys" +if GetResourceState(resourceName) == 'missing' then return end + +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + local model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle)) + return exports['qs-vehiclekeys']:GiveKeys(plate, model, true) +end + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + local model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle)) + return exports['qs-vehiclekeys']:RemoveKeys(plate, model) +end + +VehicleKey.GetResourceName = function() + return resourceName +end + +return VehicleKey \ No newline at end of file diff --git a/modules/vehiclekey/renewed-vehiclekeys/client/client.lua b/modules/vehiclekey/renewed-vehiclekeys/client/client.lua new file mode 100644 index 0000000..77d75ec --- /dev/null +++ b/modules/vehiclekey/renewed-vehiclekeys/client/client.lua @@ -0,0 +1,41 @@ +---@diagnostic disable: duplicate-set-field +local resourceName = "Renewed-Vehiclekeys" +if GetResourceState(resourceName) == 'missing' then return end + +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + return exports['Renewed-Vehiclekeys']:addKey(plate) +end + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + return exports['Renewed-Vehiclekeys']:removeKey(plate) +end + +VehicleKey.GetResourceName = function() + return resourceName +end + +return VehicleKey \ No newline at end of file diff --git a/modules/vehiclekey/t1ger_keys/client/client.lua b/modules/vehiclekey/t1ger_keys/client/client.lua new file mode 100644 index 0000000..7ad97c5 --- /dev/null +++ b/modules/vehiclekey/t1ger_keys/client/client.lua @@ -0,0 +1,35 @@ +---@diagnostic disable: duplicate-set-field +local resourceName = "t1ger_keys" +if GetResourceState(resourceName) == 'missing' then return end + +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + local model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle)) + return exports['t1ger_keys']:GiveTemporaryKeys(plate, model, '') +end + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + print("t1ger_keys doesnt support removing keys.") +end + +VehicleKey.GetResourceName = function() + return resourceName +end + +return VehicleKey \ No newline at end of file diff --git a/modules/vehiclekey/wasabi_carlock/client/client.lua b/modules/vehiclekey/wasabi_carlock/client/client.lua new file mode 100644 index 0000000..6b3a49c --- /dev/null +++ b/modules/vehiclekey/wasabi_carlock/client/client.lua @@ -0,0 +1,41 @@ +---@diagnostic disable: duplicate-set-field +local resourceName = "wasabi_carlock" +if GetResourceState(resourceName) == 'missing' then return end + +VehicleKey = VehicleKey or {} + +---Gives the player (self) the keys of the specified vehicle. +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.GiveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + exports.wasabi_carlock:GiveKey(plate) +end + +---Removes the keys of the specified vehicle from the player (self). +---@param vehicle number The vehicle entity handle. +---@param plate? string The plate of the vehicle. +---@return nil +VehicleKey.RemoveKeys = function(vehicle, plate) + assert(vehicle, "vehicle is nil") + assert(DoesEntityExist(vehicle), "vehicle does not exist") + + if not plate then + plate = GetVehicleNumberPlateText(vehicle) + end + + exports.wasabi_carlock:RemoveKey(plate) +end + +VehicleKey.GetResourceName = function() + return resourceName +end + +return VehicleKey \ No newline at end of file