How To Create a FiveM Driving School (DMV)
Okay, let's dive into crafting the ultimate guide for setting up a compelling FiveM Driving School on your server.

Introduction to Okay, let's dive into crafting the ultimate guide for

Okay, let's dive into crafting the ultimate guide for setting up a compelling FiveM Driving School on your server.
Here at FiveMX, we understand that immersion and structured gameplay are key to a thriving roleplay environment.
A well-implemented Driving School or Department of Motor Vehicles (DMV) isn't just a hurdle for players; it's a fantastic opportunity for interaction, roleplay, and establishing fundamental server rules regarding road conduct.
This tutorial will guide you through creating your own FiveM Driving School, exploring various approaches from fully player-managed systems to automated testing.
We'll break down the concepts, implementation steps, and even provide some sample questions to get you started.
Why Implement a FiveM Driving School (DMV)?
Before we get into the how, let's quickly touch on the why.
Adding a DMV system to your FiveM server offers numerous benefits:
- Enhanced Roleplay: It creates specific roles (examiners, instructors, applicants) and scenarios, fostering organic interactions.
- Gameplay Structure: It introduces a clear progression path for new players, requiring them to learn the rules before gaining full driving privileges.
- Rule Reinforcement: It provides a natural context to teach and test players on your server's specific traffic laws and expectations.
- Economic Sink (Optional): License fees can serve as a minor money sink, contributing to your server's economy.
- Foundation for Advanced Licenses: It lays the groundwork for implementing different license classes (motorcycles, trucks, boats, aircraft) later on.
- Increased Immersion: Simply having a formal process to obtain a license adds a layer of realism that many players appreciate.
Now, let's explore the different ways you can bring a
Now, let's explore the different ways you can bring a FiveM Driving School to life.
Approach 1: The Player-Managed FiveM DMV
This is often considered the gold standard for heavy roleplay servers. It relies entirely on players to staff and operate the DMV, conducting both theory and practical tests.
Concept & Philosophy
The core idea is to treat the DMV as a player-run government faction. Designated DMV employees (a job assigned via ESX or QBCore) have permission to issue licenses, conduct exams, and revoke licenses from repeat offenders. Everything happens through roleplay interaction rather than automated menus.
This approach generates incredible organic content: a nervous new player taking their driving test, an examiner who takes their job seriously, staff drama, community engagement. It works best on servers with 30+ concurrent players who have the numbers to keep the DMV staffed during peak hours.
What You Need
- A DMV job configured in your framework (see code examples below)
- A DMV MLO — a custom interior for the building where tests are conducted
- A license system — either built into your framework or a standalone resource like
esx_licenseorqb-license - A whitelist/job management script so server staff can hire DMV employees
Setting Up the DMV Job (ESX)
In ESX, jobs are defined in the jobs table in your database. Add the DMV job via SQL:
INSERT INTO `jobs` (`name`, `label`) VALUES ('dmv', 'Department of Motor Vehicles');
INSERT INTO `job_grades` (`job_name`, `grade`, `name`, `label`, `salary`, `skin_male`, `skin_female`)
VALUES
('dmv', 0, 'trainee', 'Trainee Examiner', 800, '{}', '{}'),
('dmv', 1, 'examiner', 'Examiner', 1200, '{}', '{}'),
('dmv', 2, 'supervisor', 'Supervisor', 1600, '{}', '{}'),
('dmv', 3, 'chief', 'Chief Examiner', 2000, '{}', '{}');
Setting Up the DMV Job (QBCore)
In QBCore, jobs are defined in qb-core/shared/jobs.lua. Add the following entry to the jobs table:
['dmv'] = {
label = 'Department of Motor Vehicles',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = { name = 'trainee', label = 'Trainee Examiner', payment = 800 },
['1'] = { name = 'examiner', label = 'Examiner', payment = 1200 },
['2'] = { name = 'supervisor', label = 'Supervisor', payment = 1600 },
['3'] = { name = 'chief', label = 'Chief Examiner', payment = 2000 },
},
},
Issuing Licenses via ox_lib (ESX/QBCore)
Using ox_lib for the license issuance dialog keeps the UI consistent with modern servers. Here is a server-side handler that grants a driving license when called from the DMV examiner:
-- server/main.lua (ox_lib compatible)
RegisterNetEvent('dmv:grantLicense', function(targetPlayerId, licenseType)
local src = source
local player = exports.oxmysql:executeSync(
'SELECT job FROM users WHERE identifier = @identifier',
{ ['@identifier'] = GetPlayerIdentifier(src, 0) }
)
-- Only DMV employees can grant licenses
if player and player[1] and player[1].job == 'dmv' then
exports['oxmysql']:execute(
'INSERT INTO user_licenses (type, owner) VALUES (@type, @owner)',
{ ['@type'] = licenseType, ['@owner'] = GetPlayerIdentifier(targetPlayerId, 0) }
)
TriggerClientEvent('ox_lib:notify', targetPlayerId, {
type = 'success',
description = 'You have been issued a ' .. licenseType .. ' license.'
})
end
end)
Theory Test Question Bank
Every player-managed DMV needs a standardized theory test. Here are 10 sample questions you can use directly in your examiner's clipboard or paste into a whiteboard prop:
- What does a solid white line on the road mean?
- When must you stop for a pedestrian in Los Santos?
- What is the speed limit in a residential zone on your server?
- What should you do if your vehicle catches fire?
- Is it legal to overtake on a blind corner?
- What does a flashing red traffic light require you to do?
- How many car lengths of following distance should you maintain at highway speeds?
- What must you do when an emergency vehicle approaches with lights and sirens active?
- Can you park within 5 meters of a fire hydrant?
- What is the penalty for a first driving-under-influence offence on your server?
Customize questions 3, 10, and any server-specific rules to match your server's traffic laws. Consistent enforcement starts with consistent knowledge testing.
Approach 2: Automated NPC-Based Testing
For servers that cannot reliably staff a player-run DMV, an automated system lets players complete their license at any time without requiring a live examiner.
How It Works
An NPC at the DMV location opens an ox_lib dialog when interacted with. The player answers a set of theory questions (pulled from a configurable question bank), then completes a practical driving test route. Passing both stages grants the license automatically.
NPC Interaction with ox_lib
-- client/main.lua
local dmvPed = nil
CreateThread(function()
-- Spawn DMV clerk NPC
local model = 'a_f_y_business_02'
RequestModel(model)
while not HasModelLoaded(model) do Wait(0) end
dmvPed = CreatePed(4, model, -826.6, -182.5, 37.6, 160.0, false, true)
SetEntityInvincible(dmvPed, true)
FreezeEntityPosition(dmvPed, true)
SetModelAsNoLongerNeeded(model)
end)
-- Trigger theory test dialog on interaction (using ox_target)
exports.ox_target:addLocalEntity(dmvPed, {
{
label = 'Start Theory Test',
name = 'dmv_theory',
onSelect = function()
TriggerEvent('dmv:openTheoryTest')
end
}
})
Configurable Question Bank (config.lua)
Config.TheoryQuestions = {
{
question = "What does a solid white line mean?",
answers = { "Stop completely", "Do not cross", "Slow down", "Lane merge" },
correct = 2
},
{
question = "Speed limit in a residential zone?",
answers = { "30 mph", "50 mph", "70 mph", "No limit" },
correct = 1
},
-- Add as many as needed
}
Config.PassScore = 80 -- Percentage required to pass
Config.LicenseFee = 500 -- In-game currency cost
Practical Test Route
After passing the theory section, spawn a test vehicle at the DMV and use checkpoints to define the practical route. Here is a minimal checkpoint loop:
-- client/practical.lua
local checkpoints = {
vector3(-826.6, -182.5, 37.6),
vector3(-790.0, -150.0, 37.6),
vector3(-760.0, -200.0, 37.6),
-- Return to DMV
vector3(-826.6, -185.0, 37.6),
}
local currentCheckpoint = 1
CreateThread(function()
while currentCheckpoint <= #checkpoints do
local cp = checkpoints[currentCheckpoint]
-- Draw blip and checkpoint marker
DrawMarker(2, cp.x, cp.y, cp.z - 1.0, 0, 0, 0, 0, 0, 0, 3.0, 3.0, 3.0,
255, 165, 0, 200, false, true, 2, false, nil, nil, false)
local dist = #(GetEntityCoords(PlayerPedId()) - cp)
if dist < 3.0 then
currentCheckpoint = currentCheckpoint + 1
end
Wait(0)
end
-- All checkpoints cleared — grant license
TriggerServerEvent('dmv:grantLicense', GetPlayerServerId(PlayerId()), 'driver')
end)
Licensing Tiers: Beyond the Basic Driver License
A flat "you pass, you drive" system works for new servers, but once your community grows, consider a tiered license structure that creates long-term progression and generates ongoing DMV activity.
Recommended License Tiers
| License | Vehicles Unlocked | Requirements |
|---|---|---|
| Learner Permit | No independent driving; requires a licensed instructor in the passenger seat | Automatic on character creation |
| Standard Driver | Cars, SUVs, vans | Pass theory + practical test |
| Commercial Driver | Trucks, delivery vehicles | Standard license + additional practical test |
| Motorcycle | All motorcycles | Separate theory + practical (different route) |
| Boat | All water vehicles | Theory only (no in-game practical required) |
| Pilot | Helicopters and aircraft | Strict requirements: Commercial license + in-person examiner exam |
Enforcing Licenses with Vehicle Shops
In ESX, most vehicle shop scripts support a Config.RequiredLicense field per vehicle class. Set this up in your vehicle shop's config.lua:
Config.VehicleClasses = {
['compacts'] = { requiredLicense = 'driver' },
['motorcycles'] = { requiredLicense = 'motorcycle' },
['boats'] = { requiredLicense = 'boat' },
['helicopters'] = { requiredLicense = 'pilot' },
['planes'] = { requiredLicense = 'pilot' },
['trucks'] = { requiredLicense = 'cdl' },
}
QBCore servers should configure this in qb-vehicleshop similarly — the specific config key varies by the version of the shop script you are running, so check the resource documentation.
Choosing the Right Approach for Your Server
| Factor | Player-Managed | Automated NPC |
|---|---|---|
| Best for | Heavy RP servers (50+ players) | Casual/medium RP servers |
| Requires DMV staff | Yes | No |
| Generates RP content | High | Low |
| Available 24/7 | Only when staff are online | Always |
| Setup complexity | Medium | Medium-High |
| Player immersion | Highest | Good |
Many servers run a hybrid model: automated testing is available 24/7, but players who want a premium "real examiner" experience can book a player-managed session for additional in-game rewards (e.g., a higher-tier license class, a discount on vehicles at the dealership).
DMV Building: MLO Recommendations
The physical location matters. Using a dedicated DMV MLO (custom interior) signals to players that the system is serious and worth engaging with. Look for interiors that include:
- A waiting area with seating
- An exam desk for the theory test
- A back parking lot or test course for the practical segment
- Signage and props that reinforce the DMV theme
Browse the free FiveM mods collection for community-built DMV interiors, or check VertexMods FiveM scripts for premium options with dedicated support and full ox_lib integration.
Related Articles
- Free Open-Source FiveM Jobs Creator — Create Jobs In-Game (ESX & QBCore)
- How To Create a Custom FiveM Loading Screen
- How To Create a FiveM Server Trailer
Explore our premium FiveM mods and free mods collection for ready-to-use resources.
Frequently Asked Questions
Do I need a separate MLO for the driving school or can I use an existing GTA V building?
You can use any accessible GTA V building as your DMV location — the Los Santos DMV on the map is a popular choice since players already recognize it. A custom MLO is not required to run a functioning driving school. That said, a dedicated MLO with proper waiting areas and a test course significantly improves the roleplay quality and signals to players that the system is a first-class feature of your server.
How do I restrict vehicles to license holders only?
ESX and QBCore both support license checks in vehicle shop scripts. In most vehicle shop resources, there is a Config.RequiredLicense option per vehicle category. Set 'driver' as the required license for standard vehicles, and define additional classes (motorcycle, truck, boat) in your license config. Players without the matching license will see the vehicle grayed out in the shop menu.
Can I add multiple license types (motorcycle, boat, aircraft)?
Yes. Both ESX and QBCore support multiple license types. Define each in your config.lua — for example driver, motorcycle, boat, pilot — and create separate theory tests and practical routes for each. Many servers gate aircraft licenses behind additional requirements (hours logged, written exam with a human examiner) to make them rare and prestigious.
How many theory questions should I require to pass?
Most servers use between 10 and 20 questions with a passing threshold of 70–80%. Fewer than 10 questions is too easy to game by guessing; more than 20 creates friction that frustrates casual players. A bank of 30–40 randomized questions with 15 drawn per attempt strikes a good balance — it is hard to memorize your way through by retrying, but not so long that the process feels punishing.
Frequently Asked Questions
Why Implement a FiveM Driving School (DMV)?
Before we get into the _how_, let's quickly touch on the _why_. Adding a DMV system to your FiveM server offers numerous benefits: * Enhanced Roleplay: It creates specific roles (examiners, instructors, applicants) and scenarios, fostering organic interactions.
What is Create a FiveM Driving School (DMV)?
Okay, let's dive into crafting the ultimate guide for setting up a compelling FiveM Driving School on your server.


