Garage - Car key
Edit garage and car key commands
Add Car Key
--- Function to give a key to a car
--- Located in: gksphone/client/settings.lua
--- Modify this function according to your key system
--- @param callback_vehicle number The vehicle entity
function GiveKeyCar(callback_vehicle)
if GetResourceState('qs-vehiclekeys') == 'started' then
local model = GetDisplayNameFromVehicleModel(GetEntityModel(callback_vehicle))
local plate = GetVehicleNumberPlateText(callback_vehicle)
exports['qs-vehiclekeys']:GiveKeys(plate, model, true)
elseif GetResourceState('qb-vehiclekeys') == 'started' then
local plate = GetVehicleNumberPlateText(callback_vehicle)
TriggerEvent("vehiclekeys:client:SetOwner", plate)
end
-- New systems can be added here βββ
-- local plate = GetVehicleNumberPlateText(callback_vehicle)
-- Add the export or trigger of the key command you are using here
endGarage
Garage SQL
Car status info
Bring control
After Bring
Last updated