Browse docs
Qbox Integration
This guide documents the installation for our Drivingschool with full Qbox City Hall integration.
Filesystem permission
To allow Sky Base to save files for Driving School, add this line to server.cfgbefore ensure sky_base and ensure sky_drivingschool:
server.cfg
add_filesystem_permission sky_base write sky_drivingschool
Perform a full server restart after adding or changing this permission. See Filesystem permissions for the other Sky resources installed on your server.
File Modifications
Add Items
Add the following items to your inventory:
- drive_truck
- drive_bus
- drive_boat
- drive_bike
- drive_plane
qbx_cityhall/config/shared.lua
Update or insert the following license configurations under cityhalls -> licenses:
qbx_cityhall/config/shared.lua
licenses = {
['id'] = {
item = 'id_card',
label = 'ID',
cost = 50,
},
['driver'] = {
item = 'driver_license',
label = 'Driver License',
cost = 50,
},
['drive_truck'] = {
item = 'drive_truck',
label = 'Trucker License',
cost = 500,
},
['drive_bus'] = {
item = 'drive_bus',
label = 'Bus Driver License',
cost = 250,
},
['drive_boat'] = {
item = 'drive_boat',
label = 'Boat License',
cost = 350,
},
['drive_bike'] = {
item = 'drive_bike',
label = 'Class 6A Bike License',
cost = 50,
},
['drive_plane'] = {
item = 'drive_plane',
label = 'Pilot License',
cost = 3000,
},
['weapon'] = {
item = 'weaponlicense',
label = 'Weapon License',
cost = 50,
},
},
qbx_cityhall/server/main.lua
Replace this code.
qbx_cityhall/server/main.lua
lib.callback.register('qbx_cityhall:server:requestId', function(source, item, hall)
local player = exports.qbx_core:GetPlayer(source)
if not player then return end
local itemType = sharedConfig.cityhalls[hall].licenses[item]
if itemType.item ~= 'id_card' and itemType.item ~= 'driver_license' and itemType.item ~= 'weaponlicense' and string.sub(itemType.item, 1, 6) ~= "drive_" then
return exports.qbx_core:Notify(source, locale('error.invalid_type'), 'error')
end
if not player.Functions.RemoveMoney('cash', itemType.cost) then
return exports.qbx_core:Notify(source, locale('error.not_enough_money'), 'error')
end
exports.qbx_idcard:CreateMetaLicense(source, itemType.item)
exports.qbx_core:Notify(source, locale('success.item_recieved') .. itemType.label, 'success')
end)
qbx_idcard/config/shared.lua
Update or insert the following license configurations under licenses:
qbx_idcard/config/shared.lua
licenses = {
['id_card'] = {
header = 'Identity',
background = '#ebf7fd',
backgroundImage = 'https://r2.fivemanage.com/S24fvk6HQxnz5RKFmS5Im/card5.png',
prop = 'prop_franklin_dl'
},
['driver_license'] = {
header = 'Driver License',
background = '#febbbb',
backgroundImage = 'https://r2.fivemanage.com/S24fvk6HQxnz5RKFmS5Im/card5.png',
prop = 'prop_franklin_dl',
},
['drive_truck'] = {
header = 'Truck License',
background = '#febbbb',
backgroundImage = 'https://r2.fivemanage.com/S24fvk6HQxnz5RKFmS5Im/card5.png',
prop = 'prop_franklin_dl',
},
['drive_bus'] = {
header = 'Bus License',
background = '#febbbb',
backgroundImage = 'https://r2.fivemanage.com/S24fvk6HQxnz5RKFmS5Im/card5.png',
prop = 'prop_franklin_dl',
},
['drive_boat'] = {
header = 'Boat License',
background = '#febbbb',
backgroundImage = 'https://r2.fivemanage.com/S24fvk6HQxnz5RKFmS5Im/card5.png',
prop = 'prop_franklin_dl',
},
['drive_bike'] = {
header = 'Bike License',
background = '#febbbb',
backgroundImage = 'https://r2.fivemanage.com/S24fvk6HQxnz5RKFmS5Im/card5.png',
prop = 'prop_franklin_dl',
},
['drive_plane'] = {
header = 'Pilot License',
background = '#febbbb',
backgroundImage = 'https://r2.fivemanage.com/S24fvk6HQxnz5RKFmS5Im/card5.png',
prop = 'prop_franklin_dl',
},
['weaponlicense'] = {
header = 'Weapon License',
background = '#c7ffe5',
backgroundImage = 'https://r2.fivemanage.com/S24fvk6HQxnz5RKFmS5Im/card5.png',
prop = 'prop_franklin_dl',
},
['lawyerpass'] = {
header = 'Lawyer Pass',
background = '#f9c491',
backgroundImage = 'https://r2.fivemanage.com/S24fvk6HQxnz5RKFmS5Im/card5.png',
prop = 'prop_cs_r_business_card'
},
}