> For the complete documentation index, see [llms.txt](https://docs.zrxnx.at/zrxnx-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zrxnx.at/zrxnx-scripts/scripts/zrx_armour/configuration.md).

# Configuration

```lua
local seconds, minutes = 1000, 60000
Config = {}

Config.CheckForUpdates = true --| Check for updates?
Config.RemoveArmourOnBreak = true --| Should the vest be removed after no more armour
Config.ForceComponent = true --| Reset player component while armour active
Config.LoadAndSaveArmour = true --| Save armour in database?
Config.Cooldown = 60 --| In seconds
Config.OnPlayerDeathEvent = 'zrx_utility:bridge:onPlayerDeath' --| Event listener
Config.OnPlayerLoadEvent = 'zrx_utility:bridge:playerLoaded' --| First parameter needs the player id

--[[

    If you want to use ox as inventory, read ITEMS.md

--]]
Config.Inventory = false --| ox or false

Config.TakeBack = { --| Command to take your current equipped armour back to the inv
    enabled = false, --| Only supports Config.Inventory to ox

    command = 'takearmour',
    usetime = 3 * seconds,
    anim = {
        dict = 'clothingtie', --| Dict
        lib = 'try_tie_negative_a', --| Lib
        flag = 1 --| 1 Full body - 16 Upper body
    },

    disable = {
        car = true,
        move = true,
        combat = true
    },
}

Config.Armour = {
    {
        item = 'bulletproof_small', --| Item name
        usetime = 3 * seconds, --| Usetime
        value = 25, --| 0 - 100 value
        allowedInVehicles = false, --| Enabled?
        allowedJobs = { --| Allowed jobs
            unemployed = true
        },

        vest = {
            female = {
                drawable = 10, --| Vest drawable
                texture = 0 --| Vest texture
            },

            male = {
                drawable = 10, --| Vest drawable
                texture = 0 --| Vest texture
            }
        },

        anim = {
            dict = 'anim@heists@narcotics@funding@gang_idle', --| Dict
            lib = 'gang_chatting_idle01', --| Lib
            flag = 1 --| 1 Full body - 16 Upper body
        },

        disable = {
            car = true,
            move = true,
            combat = true
        },
    },

    {
        item = 'bulletproof_medium', --| Item name
        usetime = 3 * seconds, --| Usetime
        value = 50, --| 0 - 100 value
        allowedInVehicles = false, --| Enabled?
        allowedJobs = { --| Allowed jobs
            unemployed = true
        },

        vest = {
            female = {
                drawable = 10, --| Vest drawable
                texture = 1 --| Vest texture
            },

            male = {
                drawable = 10, --| Vest drawable
                texture = 1 --| Vest texture
            }
        },

        anim = {
            dict = 'anim@heists@narcotics@funding@gang_idle', --| Dict
            lib = 'gang_chatting_idle01', --| Lib
            flag = 1 --| 1 Full body - 16 Upper body
        },

        disable = {
            car = true,
            move = true,
            combat = true
        },
    },

    {
        item = 'bulletproof_big', --| Item name
        usetime = 3 * seconds, --| Usetime
        value = 100, --| 0 - 100 value
        allowedInVehicles = false, --| Enabled?
        allowedJobs = { --| Allowed jobs
            unemployed = true
        },

        vest = {
            female = {
                drawable = 10, --| Vest drawable
                texture = 2 --| Vest texture
            },

            male = {
                drawable = 10, --| Vest drawable
                texture = 2 --| Vest texture
            }
        },

        anim = {
            dict = 'anim@heists@narcotics@funding@gang_idle', --| Dict
            lib = 'gang_chatting_idle01', --| Lib
            flag = 1 --| 1 Full body - 16 Upper body
        },

        disable = {
            car = true,
            move = true,
            combat = true
        },
    }
}

--| 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 here your esx Import
Config.EsxImport = function()
	if IsDuplicityVersion() then
		return exports.es_extended:getSharedObject()
	else
		return exports.es_extended:getSharedObject()
	end
end
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.zrxnx.at/zrxnx-scripts/scripts/zrx_armour/configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
