34 lines
862 B
Lua
34 lines
862 B
Lua
if Config.Vehiclekeys ~= 'wasabi_carlock' then
|
|
return
|
|
end
|
|
|
|
local givenKeys = {}
|
|
|
|
function AddVehiclekeys(vehicle, plate, item)
|
|
if not plate or plate == '' then
|
|
print('[WARNING] Invalid plate, unable to give key.')
|
|
return
|
|
end
|
|
|
|
if givenKeys[plate] then
|
|
print('[INFO] Key already given for: ' .. plate)
|
|
return
|
|
end
|
|
|
|
givenKeys[plate] = true
|
|
print('[DEBUG] Giving key via wasabi_carlock for plate: ' .. plate)
|
|
exports.wasabi_carlock:GiveKey(plate)
|
|
end
|
|
|
|
function RemoveVehiclekeys(vehicle, plate)
|
|
if not plate or plate == '' then
|
|
print('[WARNING] Invalid plate, unable to remove key.')
|
|
return
|
|
end
|
|
|
|
givenKeys[plate] = nil
|
|
|
|
print('[DEBUG] Removing key via wasabi_carlock for plate: ' .. plate)
|
|
exports.wasabi_carlock:RemoveKey(plate)
|
|
end
|