Remove all vehicle key client modules
Deleted all client-side vehicle key integration modules from both 'vehicleKey' and 'vehiclekey' directories. This change likely reflects a refactor, migration, or deprecation of the vehicle key system integrations.
This commit is contained in:
1 parent
1d9431f88e
commit
266697b1fe
28 files changed
-1050
No files matched your search
@@ -1,38 +0,0 @@
|
||||
---@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
|
||||
@@ -1,41 +0,0 @@
|
||||
---@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
|
||||
@@ -1,41 +0,0 @@
|
||||
---@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
|
||||
@@ -1,24 +0,0 @@
|
||||
---@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
|
||||
@@ -1,34 +0,0 @@
|
||||
---@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
|
||||
@@ -1,41 +0,0 @@
|
||||
---@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
|
||||
@@ -1,30 +0,0 @@
|
||||
---@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
|
||||
@@ -1,33 +0,0 @@
|
||||
---@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
|
||||
@@ -1,42 +0,0 @@
|
||||
---@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
|
||||
@@ -1,41 +0,0 @@
|
||||
---@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
|
||||
@@ -1,41 +0,0 @@
|
||||
---@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
|
||||
@@ -1,43 +0,0 @@
|
||||
---@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
|
||||
@@ -1,35 +0,0 @@
|
||||
---@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
|
||||
@@ -1,41 +0,0 @@
|
||||
---@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
|
||||
@@ -1,24 +0,0 @@
|
||||
---@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
|
||||
@@ -1,34 +0,0 @@
|
||||
---@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
|
||||
@@ -1,38 +0,0 @@
|
||||
---@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
|
||||
@@ -1,41 +0,0 @@
|
||||
---@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
|
||||
@@ -1,30 +0,0 @@
|
||||
---@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
|
||||
@@ -1,33 +0,0 @@
|
||||
---@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
|
||||
@@ -1,41 +0,0 @@
|
||||
---@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
|
||||
@@ -1,42 +0,0 @@
|
||||
---@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
|
||||
@@ -1,41 +0,0 @@
|
||||
---@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
|
||||
@@ -1,41 +0,0 @@
|
||||
---@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
|
||||
@@ -1,43 +0,0 @@
|
||||
---@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
|
||||
@@ -1,41 +0,0 @@
|
||||
---@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
|
||||
@@ -1,35 +0,0 @@
|
||||
---@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
|
||||
@@ -1,41 +0,0 @@
|
||||
---@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
|
||||
Reference in new issue
Block a user