Files
community_bridge/modules/vehicleKey/qs-vehiclekeys/client/client.lua
T

19 lines
870 B
Lua
Raw Normal View History

local resourceName = "qs-vehiclekeys"
local configValue = BridgeClientConfig.VehicleKey
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end
2025-02-24 18:23:19 -05:00
2025-02-06 05:33:26 -05:00
VehicleKey = VehicleKey or {}
VehicleKey.GiveKeys = function(vehicle, plate)
2025-03-03 19:09:18 -05:00
if not vehicle then return false end
local model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))
local verifiedPlate = GetVehicleNumberPlateText(vehicle)
2025-02-24 18:23:19 -05:00
return exports['qs-vehiclekeys']:GiveKeys(verifiedPlate, model, true)
end
VehicleKey.RemoveKeys = function(vehicle, plate)
2025-03-03 19:09:18 -05:00
if not vehicle then return false end
2025-02-24 18:23:19 -05:00
local model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))
local verifiedPlate = GetVehicleNumberPlateText(vehicle)
return exports['qs-vehiclekeys']:RemoveKeys(verifiedPlate, model)
2025-03-03 19:09:18 -05:00
end