# Configuration

```lua
Config = {}

--| Discord Webhook in 'configuration/webhook.lua'
Config.Command = 'personalmenu' --| Command
Config.Key = 'F5' --| Note: Its a keymapping
Config.Cooldown = 3 --| Note: Only for client > server or server > client | To disable set to 0 | In seconds
Config.CheckForUpdates = true --| Check for updates?
Config.IconColor  = 'rgba(173, 216, 230, 1)' --| rgba format
Config.UseScreenshot = true --| If enabled it will display a picture when you create a navi | NEEDS screenshot-basic

Config.Menu = {
    type = 'context', --| context or menu
    postition = 'top-left' --| top-left, top-right, bottom-left or bottom-right
}

Config.Option = {
    player = true,
    clothe = true,
    idcard = true, --| Config.IdcardMenu
    vehicle = true,
    settings = true,
    bills = true,
    company = true, --| Config.Company
    navigation = true, --| Config.Navigation
    editor = true,
    information = true, --| Config.Information
}

--| Company settings
Config.Company = {
    default = {
        job = 'unemployed', --| Job when you get fired
        grade = 0 --| Job grade when you get fired
    },

    allowedGrades = { --| grade names for company feature
        boss = true,
        co_boss = true,
    }
}

--| Navigation settings
Config.Navigation = {
    timeout = 120, --| In seconds
    checkDistance = 25, --| In GTA Units
    destinations = { --| Place here your locations
        { name = 'Police Station', coords = vector3(407.6613, -986.1854, 29.2603-0.9), icon = 'fa-solid fa-building-shield', image = '' },
        { name = 'Medical Center', coords = vector3(291.7147, -586.7615, 43.1760-0.9), icon = 'fa-solid fa-house-medical', image = '' },
        { name = 'Mechanic', coords = vector3(-377.3869, -131.3874, 38.6804-0.9), icon = 'fa-solid fa-toolbox', image = '' },
        { name = 'Meetingpoint', coords = vector3(217.9133, -850.6498, 30.1731-0.9), icon = 'fa-solid fa-location-dot', image = '' },
    },
    route = function(coords, text) --| Change it if you know what you are doing
        local blip = AddBlipForCoord(coords.x, coords.y, coords.z)

        SetBlipSprite(blip, 38)
        SetBlipColour(blip, 0)
        SetBlipScale(blip, 1.0)
        SetBlipAlpha(blip, 255)
        SetBlipAsShortRange(blip, false)
        BeginTextCommandSetBlipName('STRING')
        AddTextComponentSubstringPlayerName(text)
        EndTextCommandSetBlipName(blip)

        return blip
    end
}

--| Place here your links/informations
Config.Information = {
    { label = 'Discord', value = 'discord.gg/example' },
    { label = 'Website', value = 'www.example.com' },
}

--| Place here your idcard actions
Config.IdcardMenu = function(action, target)
    if action == 'idcard' then
        if target then
            TriggerServerEvent('jsfour-idcard:open', cache.serverId, target)
        else
            TriggerServerEvent('jsfour-idcard:open', cache.serverId, cache.serverId)
        end
    elseif action == 'driver' then
        if target then
            TriggerServerEvent('jsfour-idcard:open', cache.serverId, target, 'driver')
        else
            TriggerServerEvent('jsfour-idcard:open', cache.serverId, cache.serverId, 'driver')
        end
    elseif action == 'weapon' then
        if target then
            TriggerServerEvent('jsfour-idcard:open', cache.serverId, target, 'weapon')
        else
            TriggerServerEvent('jsfour-idcard:open', cache.serverId, cache.serverId, 'weapon')
        end
    end
end

--| Place here your account definition of ESX
--| Change it if you know what you are doing
Config.Accounts = {
    bank = 'bank',
    money = 'money',
    black_money = 'black_money'
}

--| Player here your labels for each license
--| Key is the type, the value is the label
Config.Licenses = {
    dmv = 'Theoretical driving test',
    drive = 'Driver license',
}

--| Place here your punish actions
Config.PunishPlayer = function(player, reason)
    if not IsDuplicityVersion() then return end
    if Webhook.Links.punish:len() > 0 then
        local message = ([[
            The player got punished

            Reason: **%s**
        ]]):format(reason)

        CORE.Server.DiscordLog(player, 'Punish', message, Webhook.Links.punish)
    end

    DropPlayer(player, reason)
end

--| Place your checks here before the personal menu opens
Config.CanOpenMenu = function()
    return CORE.Bridge.isPlayerLoaded()
end

--| Place here your checks before the vehicle menu opens
Config.CanOpenExtras = function()
    return GetVehicleBodyHealth(GetVehiclePedIsIn(cache.ped, false)) >= 950
end

--| Add here your add/remove key export
Config.VehicleKeys = function(action, player, vehicle)
    local plate = GetVehicleNumberPlateText(vehicle)

    if IsDuplicityVersion() then
        if action == 'add' then

        elseif action == 'remove' then

        end
    else
        if action == 'add' then

        elseif action == 'remove' then

        end
    end
end
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zrxnx.at/zrxnx-scripts/scripts/zrx_personalmenu/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
