folder name changes

This commit is contained in:
MrNewb committed 2025-10-26 15:19:35 -04:00
1 parent b42219f0a3
commit 1d9431f88e
14 files changed
+525

No files matched your search

@@ -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
@@ -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
@@ -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
+41
View File
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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