> For the complete documentation index, see [llms.txt](https://docs.redutzu.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.redutzu.com/resources/redutzu-documents/guides.md).

# Guides

{% hint style="success" %}
The script is divided into 3 config files to have the highest data security!
{% endhint %}

## 1. Client Config (client/config.lua)

```lua
Config.Notify = function(message, type)
    exports['esx_notify']:Notify(type, 5000, message)
end
```

## 2. Shared Config (config.lua)

<pre class="language-lua"><code class="lang-lua"><strong>Config.Messages = {
</strong>    ['NOT_ALLOWED'] = 'You are not allowed to do that!',
    ['CANT_NOW'] = 'You can\'t do that now!'
}

Config.Jobs = {
    ['police'] = {
        colors = {
            background = '#1243e3',
            header = '#648df3'
        },
        command = {
            enabled = true,
            name = '+police_document',
            description = 'Display your document to nearby players'
        },
        item = {
            enabled = true,
            name = 'police-card'
        },
        prop = {
            name = 'prop_fib_badge'
        },
        animation = {
            dict = 'paper_1_rcm_alt1-9',
            anim = 'player_one_dual-9',
            bone_index = 28422
        },
        information = {
            { label = 'Job', value = 'job.label' },
            { label = 'Grade', value = 'job.grade_label' },
            { label = 'Date of birth', value = 'variables.dateofbirth' }
        },
        removeBackground = false,
        range = 5.0,
        time = 4.0
    },
    ['ambulance'] = {
        colors = {
            background = '#fc4457',
            header = '#fa6e7c'
        },
        command = {
            enabled = true,
            name = '+ambulance_document',
            description = 'Display your document to nearby players'
        },
        item = {
            enabled = true,
            name = 'ambulance-card'
        },
        prop = {
            name = 'prop_fib_badge'
        },
        animation = {
            dict = 'paper_1_rcm_alt1-9',
            anim = 'player_one_dual-9',
            bone_index = 28422
        },
        information = {
            { label = 'Job', value = 'job.label' },
            { label = 'Grade', value = 'job.grade_label' },
            { label = 'Date of birth', value = 'variables.dateofbirth' }
        },
        removeBackground = false,
        range = 5.0,
        time = 4.0
    }
}
</code></pre>

## 3. Server Config (server/config.lua)

```lua
-- Custom Functions
Config.Notify = function(source, message, type)
    TriggerClientEvent('esx:showNotification', source, message, type)
end

-- Commands
Config.UseESXCommands = true -- If you want to use ESX commands, set this to true
Config.RegisterCommand = function(name, description, callback)
    if Config.UseESXCommands then
        ESX.RegisterCommand(name, 'user', function(player, args, error)
            callback(player)
        end, false, { help = description })    
    else
        RegisterCommand(name, function(source, args, raw)
            local player = ESX.GetPlayerFromId(source)
            callback(player)
        end, false)
    end
end

-- Items
Config.RegisterItem = function(name, callback)
    ESX.RegisterUsableItem(name, function(source)
        local player = ESX.GetPlayerFromId(source)
        callback(player)
    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.redutzu.com/resources/redutzu-documents/guides.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.
