⚙️Configuration
Configuration guide of Driving School.
Config = {}
-- Language Setting
Config.Language = 'en' -- en, de, fr, es, pt, it, nl, pl, sv, ar, jp, zh, he, fi
Config.TargetSystem = 'auto' -- auto, ox-target or qb-target
Config.Menu = {
model = 'u_m_m_jewelsec_01', -- https://docs.fivem.net/docs/game-references/ped-models/
coords = vector4(-650.24, -2243.51, 5.93, 318.0),
scenario = 'WORLD_HUMAN_CLIPBOARD', -- https://wiki.rage.mp/wiki/Scenarios
blip = { -- https://docs.fivem.net/docs/game-references/blips/
enabled = true,
sprite = 225,
color = 3,
scale = 0.8
}
}
-- Exam Settings
Config.Exam = {
passingScore = 70,
practicalTimeLimit = 10,
refundOnCancel = true, -- true = refund money when exam is cancelled, false = no refund
sharedTheory = false
-- true = single shared theory exam (moto questions),
-- false = separate theory for each license type
}
-- NPC Camera Settings
Config.NPCCamera = {
enabled = true,
fov = 80.0,
distance = 0.58,
height = 0.04,
freeze = false,
shake = 0.03
}
Config.Functions = {
["helpNotify"] = function(message, icon)
lib.showTextUI(message, {
position = "right-center",
icon = icon,
style = {
borderRadius = 1,
whiteSpace = 'pre-line'
}
})
end,
["hideHelpNotify"] = function()
lib.hideTextUI()
end,
["notify"] = function(type, message)
lib.notify({
title = _('notify_title'),
description = message,
type = type,
duration = 5000,
})
end,
-- Called when theory exam is passed (client-side)
-- data: { licenseType = 'car', score = 85 }
["onTheoryPassed"] = function(data)
-- Example: print('Theory passed for ' .. data.licenseType .. ' with score ' .. data.score)
end,
-- Called when practical exam is passed (client-side)
-- data: { licenseType = 'car', licenseName = 'driver' }
["onPracticalPassed"] = function(data)
TriggerEvent('stg-walletv2:cardsRefreshing')
-- Example: print('Practical passed for ' .. data.licenseType .. ', license: ' .. data.licenseName)
end
}
Config.LicenseTypes = {
{
id = 'car',
label = Locales[Config.Language].Web.web_car_title,
description = Locales[Config.Language].Web.web_car_desc,
class = 'B',
price = 10000,
questionKey = 'car',
licenseName = 'driver_b',
image = 'b.png',
practical = {
startCoords = vector4(-609.73, -2231.21, 6.01, 48.18),
vehicleModel = 'blista',
speedLimit = 40.0,
maxPenaltyPoints = 5,
checkpoints = {
vector3(-622.8, -2218.61, 6.0),
-- and others...
}
}
},
{
id = 'motorcycle',
label = Locales[Config.Language].Web.web_motorcycle_title,
description = Locales[Config.Language].Web.web_motorcycle_desc,
class = 'A',
price = 5000,
questionKey = 'moto',
licenseName = 'driver_a',
image = 'a.png',
practical = {
startCoords = vector4(-609.73, -2231.21, 6.01, 48.18),
vehicleModel = 'faggio',
speedLimit = 70.0,
maxPenaltyPoints = 5,
checkpoints = {
vector3(-622.8, -2218.61, 6.0),
-- and others...
}
}
},
{
id = 'truck',
label = Locales[Config.Language].Web.web_truck_title,
description = Locales[Config.Language].Web.web_truck_desc,
class = 'C E',
price = 20000,
questionKey = 'truck',
licenseName = 'driver_c',
image = 'c.png',
practical = {
startCoords = vector4(-609.73, -2231.21, 6.01, 48.18),
vehicleModel = 'phantom',
speedLimit = 80.0,
maxPenaltyPoints = 5,
checkpoints = {
vector3(-622.8, -2218.61, 6.0),
-- and others...
}
}
},
{
id = 'helicopter',
label = Locales[Config.Language].Web.web_helicopter_title,
description = Locales[Config.Language].Web.web_helicopter_desc,
class = 'H',
price = 50000,
questionKey = 'helicopter',
licenseName = 'driver_h',
image = 'h.png',
practical = {
startCoords = vector4(-1147.78, -2864.18, 13.95, 330.0), -- LSIA Helipad
vehicleModel = 'maverick',
speedLimit = 200.0,
maxPenaltyPoints = 3,
maxDistanceFromCheckpoint = 500.0, -- Fail if player goes further than this from checkpoint
returnToSchool = true, -- Return to driving school after exam instead of start location
checkpoints = {
vector3(-1178.42, -2845.67, 80.0),
-- and others...
}
}
},
{
id = 'plane',
label = Locales[Config.Language].Web.web_plane_title,
description = Locales[Config.Language].Web.web_plane_desc,
class = 'P',
price = 75000,
questionKey = 'plane',
licenseName = 'driver_plane',
image = 'p.png',
practical = {
startCoords = vector4(-1089.5035, -3025.0815, 14.1019, 59.7090), -- LSIA Runway
vehicleModel = 'mammatus',
speedLimit = 300.0,
maxPenaltyPoints = 3,
maxDistanceFromCheckpoint = 800.0, -- Fail if player goes further than this from checkpoint
returnToSchool = true, -- Return to driving school after exam instead of start location
checkpoints = {
vector3(-1400.0, -2600.0, 50.0),
-- and others...
}
}
},
{
id = 'boat',
label = Locales[Config.Language].Web.web_boat_title,
description = Locales[Config.Language].Web.web_boat_desc,
class = 'S',
price = 15000,
questionKey = 'boat',
licenseName = 'driver_boat',
image = 's.png',
practical = {
startCoords = vector4(-845.0047, -1362.3107, 0.0821, 114.1188),
vehicleModel = 'marquis',
speedLimit = 150.0,
maxPenaltyPoints = 3,
maxDistanceFromCheckpoint = 400.0,
returnToSchool = true,
checkpoints = {
vector3(-851.2512, -1431.9742, 0.2582),
-- and others...
}
}
}
}Last updated