[ESX][QB] DRIVE SCHOOL V2 | Included Custom Map, Each category different theory exam


BUY IT HERE: www.vames-store.com

Preview: HERE


image

:star: Features:

  • Compatible with ESX & QB-Core
    – For ESX it use esx_license
    – For QB-Core it use metadata from core
  • Responsive UI
  • Specially created maneuvering area map for vms_driveschoolv2
  • Custom clean boxville for script without any livery
  • Speed limit during practical exam (supported kmh & mph also it can be disabled)
  • The examiner’s ped sits next to you in the passenger seat during the practical exam (can be turned off)
  • After making the maximum number of mistakes, the examiner ends the test and asks you to return to driving school with a negative result
  • Three types of theoretical exam, containing different questions for each category A (motorcycle), B (car), C (truck)
  • Three types of practical exam, different vehicles
  • In the config you can set whether to take money from the bank account if the player has no money in cash
  • You can set for each category the number of questions to be drawn, how many questions it will have to answer and the number of correct answers to pass the theory exam
  • During the practical exam, the player has to complete tasks from the examiner written in ui on the right, when done, he marks the point as done
  • Maneuver commands spoken by the examiner (can be turned off)
  • Highly detailed configs (config.lua, config.client.lua, config.server.lua)
    – Fully editable marker styles and blips
    – Adjustment of notification system
    – Possibility to use with esx_menu_default, esx_context, qb-menu also possibility to plug to the npctalk or other system
    – Possibility to use with TextUI
    – Customizable pricing and license names so if you currently have any driving school and a server edition currently running, you can change the names to the current ones so that the players’ licenses remain
    – Possibility of adjusting the exam route
    – Possibility to change the exam route and the action to be performed
    – Ability to change questions for each category along with photos
    – In config.server.lua you can customize the license system to your needs, if you want a license for an item in an inventory, you can add it there
  • Full translation with config.lua & translation.js.
  • Full support.

:gear: CONFIG

Config = {}

-- █▀ █▀▄ ▄▀▄ █▄ ▄█ ██▀ █   █ ▄▀▄ █▀▄ █▄▀
-- █▀ █▀▄ █▀█ █ ▀ █ █▄▄ ▀▄▀▄▀ ▀▄▀ █▀▄ █ █
Config.Core = "ESX" -- "ESX" / "QB-Core"
Config.CoreExport = function()
    return exports['es_extended']:getSharedObject()
    -- return exports['qb-core']:GetCoreObject()
end

Config.PlayerLoaded = 'esx:playerLoaded'
-- @Config.PlayerLoaded for ESX: 'esx:playerLoaded'
-- @Config.PlayerLoaded for QB-Core: 'QBCore:Client:OnPlayerLoaded'

Config.Notification = function(message, type)
    if type == "success" then
        exports["vms_notify"]:Notification("DRIVE SCHOOL", message, 5000, "#32a852", "fa fa-check-circle-o")
        -- TriggerEvent('esx:showNotification', message)
        -- TriggerEvent('QBCore:Notify', message, 'success', 5000)
    elseif type == "error" then
        exports["vms_notify"]:Notification("DRIVE SCHOOL", message, 5000, "#eb4034", "fa fa-exclamation-circle")
        -- TriggerEvent('esx:showNotification', message)
        -- TriggerEvent('QBCore:Notify', message, 'error', 5000)
    end
end

Config.Interact = {
    Enabled = false,
    Open = function(message)
        exports["interact"]:Open("E", message) -- Here you can use your TextUI or use my free one - https://github.com/vames-dev/interact
        -- exports['qb-core']:DrawText(message, 'right')
    end,
    Close = function()
        exports["interact"]:Close() -- Here you can use your TextUI or use my free one - https://github.com/vames-dev/interact
        -- exports['qb-core']:HideText()
    end,
}


-- ▀█▀ █▀▄ ▄▀▄ █▄ █ ▄▀▀ █   ▄▀▄ ▀█▀ ██▀
--  █  █▀▄ █▀█ █ ▀█ ▄██ █▄▄ █▀█  █  █▄▄
Config.Translate = {
    ['open_menu'] = "Press ~INPUT_CONTEXT~ to open the menu",
    ['menu.title'] = {icon = '', label = "Select Exam Type"},
    ['menu.theory_a'] = {icon = 'far fa-file-alt', label = "Theory A (%s$)"},
    ['menu.practical_a'] = {icon = 'fas fa-motorcycle', label = "Practical A (%s$)"},
    ['menu.theory_b'] = {icon = 'far fa-file-alt', label = "Theory B (%s$)"},
    ['menu.practical_b'] = {icon = 'fas fa-car-side', label = "Practical B (%s$)"},
    ['menu.theory_c'] = {icon = 'far fa-file-alt', label = "Theory C (%s$)"},
    ['menu.practical_c'] = {icon = 'fas fa-truck', label = "Practical C (%s$)"},

    ['exceeded_speed_limit'] = "You exceeded the speed limit (%s/%s), Speed Limit is %s kmh",
    ['vehicle_was_damaged'] = "The vehicle was damaged (%s/%s)",
    ['exceeded_error_limit'] = "You've exceeded the error limit, you need to go back to driving school.",
    ['started_practical'] = "You have started the practical exam, follow the examiners instructions.",
    ['complete_theory'] = "Press ~INPUT_CONTEXT~ to complete the theory exam.",

    ['success_practical'] = "Congratulations, you have obtained your driver license.",
    ['failed_practical'] = "Unfortunately, you failed to obtain a driver license.",

    ['not_enough_cash'] = "You don't have enough cash for this exam",
    ['not_enough_cash_and_bank'] = "You do not have enough cash and money in your bank account for this exam",
}


-- █▄ ▄█ ▄▀▄ █ █▄ █   ▄▀▀ ██▀ ▀█▀ ▀█▀ █ █▄ █ ▄▀  ▄▀▀
-- █ ▀ █ █▀█ █ █ ▀█   ▄██ █▄▄  █   █  █ █ ▀█ ▀▄█ ▄██
Config.AccessOnMarker = true -- Do you want to use access to the exam selection menu as E in marker?

Config.UseSoundsUI = true -- Do you want to use interaction sounds in the UI?
Config.EnableBlur = true -- Do you want to blur the background in the game when you have the UI running?

Config.PossibleChargeByBank = true -- if you set it true, when the player does not have enough cash, it will try to take it from his bank account

Config.MaxSpeed = 50 -- if you don't want a speed limit set nil
Config.SpeedMultiplier = 3.6 -- kmh = 3.6 / mph = 2.236936

Config.MaxDriveErrors = 5 -- How much maximum a player can get bugs for vehicle damage, on 5 will require going back to driving school and failing the test


Config.Examiner = {
    Enabled = true, -- Do you want to use a ped as an examiner who sits with the player in the vehicle?
    SpokenCommands = true,
    PedModel = 'ig_fbisuit_01'
}

Config.Licenses = {
    Theory = {
        ['A'] = {name = 'theory_a', price = 150},
        ['B'] = {name = 'theory_b', price = 300},
        ['C'] = {name = 'theory_c', price = 450}
    },
    Practical = {
        ['A'] = {name = 'drive_a', price = 2500},
        ['B'] = {name = 'drive_b', price = 4500},
        ['C'] = {name = 'drive_c', price = 6500}
    }
}

Config.Questions = {
    ['A'] = {
        QuestionsCount = 18, -- Number of all questions for the draw pool
        QuestionToAnswer = 18, -- Questions the player will have to answer
        NeedAnswersToPass = 16, -- Number of questions a player must answer correctly to pass the theory exam
    },
    ['B'] = {
        QuestionsCount = 17,
        QuestionToAnswer = 17,
        NeedAnswersToPass = 15,
    },
    ['C'] = {
        QuestionsCount = 5,
        QuestionToAnswer = 5,
        NeedAnswersToPass = 4,
    },
}

Config.Tasks = {
    {label = "Start the engine", id = 1},
    {label = "Turn on the lights", id = 2},
    {label = "Get on the elevation", id = 3},
    {label = "Park at the rear slant", id = 4},
    {label = "Park parallel in front", id = 5},
    -- {label = "ID 6 HAVE NO SPECIAL MANEUVERS", id = 6},
    {label = "Park parallel backwards", id = 7},
    {label = "Leave the maneuvering area", id = 8},
    {label = "Get on a public road", id = 9},
    {label = "Stop before the lanes", id = 10},
    {label = "Free ride <span>0.00</span>km / 2.00km", id = 11},
    {label = "Go back to driving school", id = 12},
}

Config.Zones = {
    ["menu"] = {
        menuType = "esx_menu_default", -- "esx_menu_default" / "esx_context" / "qb-menu"
        menuPosition = 'left', -- only for esx_menu_default and esx_context
        coords = vector3(-893.67, -2402.06, 14.125),
        marker = {
            id = 36, -- https://docs.fivem.net/docs/game-references/markers/
            color = {115, 255, 115, 120}, -- R(ed), G(reen), B(lue), A(lpha)
            scale = vec(0.65, 0.65, 0.65),
            bobUpAndDown = false, -- jumping marker
            rotate = true -- rotating marker
        },
        blip = { -- https://docs.fivem.net/docs/game-references/blips/
            sprite = 778,
            display = 4,
            scale = 1.0,
            color = 43,
            name = "Driving School"
        }
    },
    ["return_vehicle"] = {
        coords = vector3(-890.08, -2377.37, 12.94),
        marker = {
            id = 1, -- https://docs.fivem.net/docs/game-references/markers/
            color = {255, 0, 0, 120}, -- R(ed), G(reen), B(lue), A(lpha)
            scale = vec(1.5, 1.5, 0.75),
            bobUpAndDown = false, -- jumping marker
            rotate = true -- rotating marker
        },
        blip = { -- https://docs.fivem.net/docs/game-references/blips/
            sprite = 467,
            display = 4,
            scale = 1.0,
            color = 2,
            routeColor = 2,
            name = "Return to Drive School"
        }
    }
}

Config.Practical = {
    ['Vehicles'] = { -- https://docs.fivem.net/docs/game-references/vehicle-models/
        A = 'pcj',
        B = 'premier',
        C = 'boxville_vms',
    },
    ['Marker'] = { -- https://docs.fivem.net/docs/game-references/markers/
        id = 20, 
        size = vec(0.35, 0.35, 0.35),
        rotate = {0.0, 180.0, 0.0},
        rgba = {255, 255, 0, 140},
        rotataing = true
    },
    ['Blip'] = { -- https://docs.fivem.net/docs/game-references/blips/
        sprite = 270,
        display = 4,
        scale = 0.8,
        color = 28,
        routeColor = 28,
        name = "Point"
    },
    ['SpawnPoint'] = vector4(-723.38, -2210.23, 4.9, 49.79),
}

Config.PracticalTest = { -- if you don't know what each action does, don't touch it to avoid spoiling the exam route
    [...]
}

> > > > > > You can check my others scripts < < < < < <
:coin: vms_coinshop
:tshirt: vms_clothestore
:disguised_face: vms_charcreator
:busts_in_silhouette: vms_multichars + vms_identity
:dagger: vms_gangmissions
:racing_car: vms_vehicleshop
:dancer: vms_anims
:black_nib: vms_tattooshop
:blonde_man: vms_barber
:world_map: vms_pausemenu
:parachute: vms_skydiving
:checkered_flag: vms_races
:oncoming_automobile: vms_drivingschool
:speedboat: vms_boatschool
:flight_departure: vms_flyingschool
:moneybag: vms_bank
:thought_balloon: vms_notify
:shopping_cart: vms_shops
:keyboard: vms_redeem
:blue_car: vms_garage
:speech_balloon: vms_npctalk
:gun: vms_weaponshop
:credit_card: vms_documents
:handshake: vms_jobcenter
:free: interact
:free: esx_menus

Code is accessible No
Subscription-based No
Lines (approximately) Lua 1086
Requirements ESX / QB-Core
Support Yes
7 Likes

Nice script

1 Like

Thank you :smiley:

Good idea, I will remember it and create it someday :man_technologist:

1 Like

no open source pacakage?

there is no open source version, only the escrow version with very extensive configuration

:computer: UPDATE 1.0.1

[+] Added audio commands spoken by examiner in German language
[+] Added Config.Examiner.SpokenLanguage, now selectable EN and DE
[+] Added to Config.Tasks the exact texts that the examiner says
image

2 Likes

am i able to change the locatioin of the driving school and test coords?

yes you can change points locations but the map is not editable

:computer: UPDATE 1.0.2

[/] Fixed esx_license xPlayer error


:computer: UPDATE 1.0.3

[/] Fixed problem with doubled blip of return to driving school after exceeding error limit when returning to driving school
[/] Fixed a bug with QuestionsCount & QuestionToAnswer, now you can have fewer answers required and a larger question pool
[+] Added enabled option to Config.Licenses, it allows to disable given exams
[+] Added Bulgarian voice audio and translation to Config.Tasks


:computer: UPDATE 1.0.4

[+] Added check if maneuvering area is empty for new exam (Config.CheckIsManeuveringAreaIsOccupied)


:computer: UPDATE 1.0.5

[+] Added instructor speech in Spanish and added texts in Spanish to Config.Tasks
[+] Added Config.EnableMaxSpeedLoop - if you set this to true, the player after exceeding the speed limit will not be able to drive above the speed limit all the time because it will refresh his speed and give errors in the practical exam.
[+] Added Config.MaxSpeedLoopTimeout - this works when Config.EnableMaxSpeedLoop = true and this is the value of how often the players speed should refresh to give him another error if he continues to exceed the speed limit. I recommend giving it at least 1000/2000 ms so that the player has time to react to brake.
[+] Compatibility with OX_LIB - Context
[+] Added for ESX esx_license.sql file

I have the V1 driving school, do I have to pay again for the V2?

If you want vms_driveschoolv2 it requires you to buy the script because it was not an update but a new script completely different

1 Like

hello dear producer, I would like the scrip once the practical test is over to add the item of license A to my inventory if I have done test A and so on for license C and license B, could you give me a hand? @vames23

Hi, yes, contact me via my dc to support

:computer: UPDATE 1.0.6

[+] Added instruction speech in French and Portuguese
[+] Added compatibility with target system such as ox_target


:computer: UPDATE 1.0.7

[+] Added function Config.BeforeOpeningMenu to config.client.lua which you check or do anything you want before opening menu
[+] Added teleport to vehicle spawn location which results in long distance spawn compatibility for Onesync
[+] Added Config.AddLicenseItem, you can add the license item after completing the practical exam

:computer: UPDATE 1.0.8

[/] The problem with the possibility of continuing the practical test with a different vehicle than the one received at the driving school has been fixed.

:computer: UPDATE 1.0.9

[+] Polish voiceover added for practical exam
[+] Added to Config.OnVehicleSpawn compatibility with qs-vehiclekeys and wasabi_carlock
[+] Added Config.OnVehicleDelete function to config.client.lua which allows keys to be taken away
[/] Corrected in config.server.lua from Config.UseLicenseAddItem to Config.AddLicenseItem
[/] Fixed double command “return to driving school” on failed practical test

Hello author,I bought your driving school plugin,When I tried to change the title picture inside,The corresponding title picture in the game is not displayed,I put the picture in the questions_images folder,And in the questions.js, I also modified the corresponding picture name,The picture is in PNG format。