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

A script by vames23

No reviews yet.
[ESX][QB] DRIVE SCHOOL V2 | Included Custom Map, Each category different theory exam main image

Full Description


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