Penal Codes

You can modify this in qs-dispatch/config/jobsdata.lua.

This feature will only work if you use Config.MDT.newMdt = false

With this function we will have 2 preconfigured code lists, where you can add more lists with respect to jobs, you can assign several jobs to a single list. These jobs will visualize in the MDT in the penal code section, the list of penal codes, with the price to pay and the jail time for that penal code, so in this case the invoice is not added automatically, it is only visual, soon this invoice system will be integrated.

Parameters to create more penal codes.

  • title (string): Title of the fine.

  • desc (string): Brief description with which the fine will be sent

  • fine (number): The price of the fine

  • jailtime (number): Jail time to be served by the player


Demonstration code

Once the previous parameters have been studied, we show a demonstrative code here.

JobsData = {

    [0] = {
        title = 'Penal Code of San Andreas',
        desc =
        'The Penal Code of San Andreas is the primary set of laws governing the state of San Andreas. The Penal Code is a collection of laws passed by the San Andreas State Legislature and signed into law by the Governor of San Andreas. The Penal Code is organized by subject matter under an expandable three-factor chapter heading system. The Penal Code is maintained by the San Andreas Department of Justice.',
        jobs = {
            'police',
            'sheriff',
            'fbi'
        },
        --[[
            if the fine total its 0 the player will not receive a fine
        ]] --
        PenalCode = {
            {
                title = 'Theft',
                desc = 'Taking property without consent, with intent to keep.',
                fine = 300,
                jailTime = 0.2, -- minutes
            },
            {
                title = 'Assault',
                desc = 'Intentionally causing harm to another person.',
                fine = 400,
                jailTime = 10, -- minutes
            },
            {
                title = 'Vandalism',
                desc = 'Damaging property without permission.',
                fine = 250,
                jailTime = 7, -- minutes
            },
            {
                title = 'Fraud',
                desc = 'Deceptive practices to gain value through false representation.',
                fine = 500,
                jailTime = 12, -- minutes
            },
            {
                title = 'Trespassing',
                desc = 'Entering a property without authorization.',
                fine = 150,
                jailTime = 5, -- minutes
            },
            {
                title = 'Disturbing Peace',
                desc = 'Engaging in behavior that disrupts public peace.',
                fine = 200,
                jailTime = 8, -- minutes
            },
            {
                title = 'Public Intoxication',
                desc = 'Being visibly drunk or intoxicated in a public place.',
                fine = 180,
                jailTime = 6, -- minutes
            },
            {
                title = 'Reckless Driving',
                desc = 'Operating a vehicle in a manner that endangers others.',
                fine = 350,
                jailTime = 10, -- minutes
            },
            {
                title = 'Shoplifting',
                desc = 'Stealing merchandise from a store.',
                fine = 120,
                jailTime = 5, -- minutes
            },
            {
                title = 'Disorderly Conduct',
                desc = 'Behaving in a disruptive or disorderly manner in public.',
                fine = 160,
                jailTime = 6, -- minutes
            },
        }
    },
    [1] = {
        title = 'EMS Department of San Andreas',
        desc = 'The list of services that the EMS Department of San Andreas provides to the citizens of San Andreas.',
        jobs = {
            'ambulance',
            'police'
        },
        --[[
            if the fine total its 0 the player will not receive a fine
        ]] --
        PenalCode = {
            {
                title = 'Injured',
                desc = 'Injured in an accident or other incident.',
                fine = 300,
                jailTime = 0, -- minutes
            },
            {
                title = 'Sick',
                desc = 'Sick or ill.',
                fine = 400,
                jailTime = 0, -- minutes
            },
            {
                title = 'Unconscious',
                desc = 'Unconscious or unresponsive.',
                fine = 250,
                jailTime = 0, -- minutes
            },
            {
                title = 'Dead',
                desc = 'Dead or deceased.',
                fine = 500,
                jailTime = 0, -- minutes
            },
            {
                title = 'Other',
                desc = 'Other.',
                fine = 150,
                jailTime = 0, -- minutes
            },
        }
    }
}

Last updated