DRIVING SCHOOL
Fivem Driving School Script
Vehicle License Check Example
This command is used to check the vehicle license.
RegisterCommand('checklicense', function(src)
TriggerEvent('checkLicense', src, 'driver', function(cb) end)
end)The active license types are:
carmotordrive_truckairboat
removelicense Command
This command is used to remove a license from a specific source.
RegisterCommand('removelicense', function(src)
TriggerEvent('es:removeLicense', src, 'driver', function(cb) end)
end)Description: The
removelicensecommand takes thesrcsource identifier and triggers thees:removeLicenseevent.Usage: Use the
/removelicensecommand to remove thedriverlicense from a specific source.
addlicense Command
addlicense CommandThis command is used to add a license to a specific source.
Description: The
addlicensecommand takes thesrcsource identifier and triggers thees:addLicenseevent.Usage: Use the
/addlicensecommand to add thedriverlicense to a specific source.
These lines of code represent the markers the car needs to go to and collect.
If you uncomment the lines, it indicates that the car needs to go to the markers listed in the table.
1. General Configuration
The general configuration section includes the framework settings, MySQL settings, and Discord token for integration.
2. Framework Integration Function
A function to integrate the script with different frameworks like ESX, NewESX, and QBCore.
3. Driving School Locations
Define the locations for your driving school, including coordinates, NPC details, markers, and blips.
4. License Position and Path
Define the positions and paths for each type of vehicle license, including vehicle model and time required for the test.
5. Blip Creation Function
A function to create blips on the map for each driving school location.
6. Discord Integration Functions
Functions for making HTTP requests to the Discord API to retrieve user avatars and other data.
Summary
This guide helps you configure a driving school in your FiveM server by providing detailed examples for general configuration, location setup, vehicle licenses, and Discord integration. Customize each section to fit your server's needs and integrate these configurations into your GitBook documentation for clear and comprehensive instructions for your users.
Last updated
