# Configuration

```lua
Config = {}

--| Discord Webhook in 'configuration/webhook.lua'
Config.Command = 'panicbutton'
Config.Key = 'K' --| Key to start a panic | NOTE: Its a Keymapping
Config.Cooldown = 20 --| Cooldown between panics | In seconds
Config.Sounds = true --| Activate sound
Config.CheckForUpdates = true --| Check for updates?

Config.Templates = {
    {
        name = 'POLICE PANIC',
        time = 60, --| in seconds
        mainJob = 'police',
        jobs = {
            police = true
        },
        blip = function(coords) --| Change it if you know what you are doing
            local blip = AddBlipForCoord(coords.x, coords.y, coords.z)

            SetBlipSprite(blip, 161)
            SetBlipColour(blip, 1)
            SetBlipScale(blip, 2.0)
            SetBlipAlpha(blip, 255)
            SetBlipAsShortRange(blip, false)
            BeginTextCommandSetBlipName('STRING')
            AddTextComponentSubstringPlayerName('Panicbutton: Police')
            EndTextCommandSetBlipName(blip)
            PulseBlip(blip)
            SetBlipRoute(blip, true)
            SetBlipRouteColour(blip, 1)

            return blip
        end,
    },
    {
        name = 'SHERIFF PANIC',
        time = 60, --| in seconds
        mainJob = 'sheriff',
        jobs = {
            sheriff = true
        },
        blip = function(coords) --| Change it if you know what you are doing
            local blip = AddBlipForCoord(coords.x, coords.y, coords.z)

            SetBlipSprite(blip, 161)
            SetBlipColour(blip, 1)
            SetBlipScale(blip, 2.0)
            SetBlipAlpha(blip, 255)
            SetBlipAsShortRange(blip, false)
            BeginTextCommandSetBlipName('STRING')
            AddTextComponentSubstringPlayerName('Panicbutton: Sheriff')
            EndTextCommandSetBlipName(blip)
            PulseBlip(blip)
            SetBlipRoute(blip, true)
            SetBlipRouteColour(blip, 1)

            return blip
        end,
    },
}

--| Place here your sound actions
Config.PlaySound = function()
    for i = 1, 5, 1 do
        PlaySoundFrontend(-1, "TIMER_STOP", "HUD_MINI_GAME_SOUNDSET", 1)
        Wait(1000)
    end
end

--| 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
```


---

# 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/archived/zrx_panicbutton/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.
