Config

QBCore = exports['qb-core']:GetCoreObject()
G_CurrentResourceName = GetCurrentResourceName()

Config = {
    UseTarget = GetConvar('UseTarget', 'false') == 'true', -- not implemented yet
    PlaySound = true, -- interact sound
    SoundVolume = 0.5,
    TargetScript= 'qb-target', -- 'qb-target' or 'ox_target'
    InventoryExportName = 'qb-inventory',
    ShowAnimations = {
        Photo = {
            Dict = 'cellphone@female',
            Anim = 'cellphone_text_read_base'
        },
        --Photo2 = {
        --    Dict = 'cellphone@female',
        --    Anim = 'cellphone_text_read_base'
        --},
        License = {
            Dict = 'cellphone@female',
            Anim = 'cellphone_text_read_base'
        },
        License2 = {
            Dict = 'paper_1_rcm_alt1-8',
            Anim = 'player_one_dual-8'
        },
        Pickup = {
            Dict = 'pickup_object',
            Anim = 'putdown_low'
        },
        --License2 = {
        --    Dict = 'cellphone@female',
        --    Anim = 'cellphone_text_read_base'
        --}
    },
    PhotoObject = `selfieobj`,
    CardObjects = {
        IdCard = `rrpid`,
        DLicense = `rrpid`
    },
    PhotoBoothGreenScreenAnims = {
        Anim = {
            Dict = 'misschinese1leadinoutchi_1_mcs_4',
            Anim = 'chi_1_mcs_4_tao_idle_1_freezer'
        },
        FaceAnim = {
            Clipset = 'facials@gen_male@variations@normal',
            Dict = 'facials@gen_male@base',
            Anim = 'mood_normal_1'
        }
    },
    DeleteSelfieAfterLicenseCreated = true,
    ChangeShow = "E",
    Close = "BACKSPACE", -- optional ( if nil, close button will not be shown, use the item again to close the NUI )
    Scan = "F" -- optional; jobs ||it will be used to scan the license Config.Commands.command1
}

Config.RemoveOldLicenseFromInventory = true

Config.Commands = {
    command1 = {
        commandName = "checkLicense",
        jobs = {
            ["police"] = true,
            ["ambulance"] = true
        },
        permission = 'user'
    }
}

Config.CardFixData = {
    IdCard = {
        state = 'California',
        country = 'USA',
        lname = 'Identity Card',
    },
    DLicense = {
        state = 'California',
        country = 'USA',
        lname = 'Driver License',
    }
}

Config.ItemNames = {
    IdCard = 'id_card_r',
    DLicense = 'driver_license_r',
    selfie = 'selfie'
}

Config.Photobooths = {
    {
        Obj = `photobooth2`,
        Coords = vector4(-266.35, -968.95, 30.26, 25.0),
        PedPosition = {
            coords = vector4(-267.07, -968.54, 30.26, 204.89),
            time = 1000
        },
        PhotoCoords = vector4(-265.6, -969.54, 31.14, 300),
        Blip = { --optional
            Sprite = 459,
            Color = 0,
            Scale = 0.8,
            ShortRange = true
        },
        Accounts = { 
            cash = true,
            bank = true
        },
        Price = 100,
        PhotoType = "object", -- or item || default
        PickUpTime = 60, -- seconds (if PhotoType is object) 
        DrawOutline = true,
        TargetOptions = {
            options = {
                icon = 'fa-solid fa-camera',
                name = 'photobooth1'
            },
            distance = 2.5
        },
    }
}

Config.Licenses = {
    {
        coords = vector4(-259.55, -965.2, 30.22, 119.4),
        model = `a_m_m_hasjew_01`,
        npcName = "Administrator",
        --PedAnim = { -- optional
        --    Dict = 'amb@world_human_clipboard@male@base',
        --    Anim = 'base',
        --    AnimObject = `prop_notepad_01`, -- optional
        --    AnimObjectBone = 18905, -- require if AnimObject is set
        --    AnimObjectOffset = vector3(0.1, 0.1, 0.0) -- require if AnimObject is set
        --},
        PedScenario = 'WORLD_HUMAN_CLIPBOARD',
        ScenarioItem = `p_cs_clipboard`, -- to delete after scenaria end...

        Accounts = { 
            cash = true,
            bank = true
        },
        licenses = {
            ['IdCard'] = 100,
            ['DLicense'] = 120
        },
        Blip = {
            Sprite = 459,
            Color = 0,
            Scale = 0.8,
            ShortRange = true
        },
        TargetOptions = {
            options = {
                icon = 'fa-solid fa-city',
                name = 'licenses1'

            },
            distance = 2.5
        },
    },
}

local buttonKeys = {
    A = 34,
    B = 29,
    C = 26,
    D = 30,
    E = 46,
    F = 49,
    G = 47,
    H = 74,
    K = 311,
    L = 7,
    M = 244,
    N = 249,
    P = 199,
    Q = 44,
    R = 45,
    S = 33,
    T = 245,
    U = 303,
    V = 0,
    W = 32,
    X = 73,
    Y = 246,
    Z = 20,
    UpArr = 27,
    DownArr = 173,
    LeftArr = 174,
    RightArr = 175,
    LAlt = 19,
    F11 = 344,
    NUM1 = 157,
    NUM2 = 158,
    NUM3 = 160,
    NUM4 = 164,
    NUM5 = 165,
    NUM6 = 159,
    NUM7 = 161,
    NUM8 = 162,
    NUM9 = 163,
    LShift = 21,
    ESC = 322,
    F1 = 288,
    F2 = 289,
    F3 = 170,
    F5 = 166,
    F6 = 167,
    F7 = 168,
    F8 = 169,
    F9 = 56,
    F10 = 57,
    ["~"] = 243,
    ["1"] = 157,
    ["2"] = 158,
    ["3"] = 160,
    ["4"] = 164,
    ["5"] = 165,
    ["6"] = 159,
    ["7"] = 161,
    ["8"] = 162,
    ["9"] = 163,
    ["-"] = 84,
    ["="] = 83,
    BACKSPACE = 177,
    TAB = 37,
    ["["] = 39,
    ["]"] = 40,
    ENTER = 18,
    CAPS = 137,
    LEFTSHIFT = 21,
    [","] = 82,
    ["."] = 81,
    LEFTCTRL = 36,
    LEFTALT = 19,
    SPACE = 22,
    RIGHTCTRL = 70,
    HOME = 213,
    PAGEUP = 10,
    PAGEDOWN = 11,
    DELETE = 178,
    LEFT = 174,
    RIGHT = 175,
    TOP = 27,
    DOWN = 173,
    NENTER = 201,
    N4 = 108,
    N5 = 60,
    N6 = 107,
    ["N+"] = 96,
    ["N-"] = 97,
    N7 = 117,
    N8 = 61,
    N9 = 118
}

Config.ChangeShowKey = buttonKeys[Config.ChangeShow]
Config.CloseKey = Config.Close and buttonKeys[Config.Close] or nil
Config.ScanKey = Config.Scan and buttonKeys[Config.Scan] or nil
buttonKeys = nil

Last updated