DH | Driving school

Framework Compatibility

DH Drivingschool works for TMC Only

Installation

  1. Download DHDrivingschool from your keymaster

  2. Drag the file into your resources folder and "ensure DHDrivingschool " in your server.cfg

Add your speed cameras around the map. using this format. make sure ID is unique for every camera.

Commands

  • /removelicenses all -— remove licenses from all players in your database

Sounds

inside INSTALl/sounds/ Drag and drop all the mp3 files into core_game/html/sounds

SQL

Insert this into your Databse. You can find the file in install/sql.sql

CREATE TABLE IF NOT EXISTS `DrivingSchool` (
    `CitizenID` VARCHAR(50) NOT NULL PRIMARY KEY,
    `A` TINYINT(1) DEFAULT 0, 
    `B` TINYINT(1) DEFAULT 0, 
    `C` TINYINT(1) DEFAULT 0,
    `Theory` TINYINT(1) DEFAULT 0
);

Item & Metadata

Add the item below to your core/shared.gta5.lua

    ["theorypaper"] = {
        ["label"] = "Theory Test",
        ["weight"] = 0,
        ["type"] = "item",
        ["image"] = "insuranceimage.webp",
        ["unique"] = true,
        ["stackable"] = true,
        ["useable"] = true,
        ["shouldClose"] = false,
        ["description"] = "Theory test paper"
    },

Add the code below to your inventory/config.lua

        ['theorypaper'] = function(itemInfo)
            return string.format('<p> <strong>Name: </strong><span>%s</span> <br/> <strong>Date: </strong><span>%s</span> <br/> <strong>Score: </strong><span>%s</span> <br/> <strong>Passed: </strong><span>%s</span></p>',
                itemInfo.name,
                itemInfo.date,
                itemInfo.score,
                itemInfo.passed)
        end,

MDT Configurations

You need to add the following to your licenseConfig inside mdt2/html/config.json

        "driver": {
            "label": "Driving License - Class B",
            "icon": "fa-car",
            "iconSet": "fas",
            "hasPoints": true,
            "maxPoints": 12,
            "canRevoke": true
        },
        "hgv": {
            "label": "Driving License - Class C",
            "icon": "fa-truck",
            "iconSet": "fas",
            "hasPoints": false,
            "maxPoints": 12,
            "canRevoke": true
        },
        "bike": {
            "label": "Driving License - Class A",
            "icon": "fa-motorcycle",
            "iconSet": "fas",
            "hasPoints": false,
            "maxPoints": 12,
            "canRevoke": true
        },

Government Configuration

you need to add the following to your government/config.lua under Config.LicenseTypes

Config.LicenseTypes = {
    'driver',
    "hgv",
    "bike",

Last updated