# Functions

### config.lua

{% tabs %}
{% tab title="vRP" %}
Functions are made for a basic **Dunko vRP base**. If your functions are not matching please edit \
vRP. functions from *config/config.lua*

```lua
Config = {};
Config.Sql = 'oxmysql'
Config.givePumpkinsCommand = 'givepumpkins' -- /givepumpkins <user_id> <amount> for Server Owner (if it's needed)

Config.npc = {
    coords    = vec4(173.83361816406, -987.94573974609, 30.091930389404, 151.15),
    model     = 's_m_y_strvend_01', -- ped model for halloween npc , check https://docs.fivem.net/docs/game-references/ped-models/ or your own
    distance  = 1.0,               -- distance to access Halloween Event
    accessKey = 38,                -- key code to access Halloween Event, check https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
    blip      = {
        id = 484,
        color = 47,
        scale = 0.8,
        name = 'Halloween Event',
    },
    -- task = { -- set your animation if you want to use TaskPlayAnim
    --     anim = '',
    --     dict = ''
    -- },
    task      = nil,                    -- task dezactivated
    scenario  = "WORLD_HUMAN_CLIPBOARD", -- set npc scenario if you want to use TaskStartScenarioInPlace
}


Config.NotifyFunction = function(msg, type, source) -- global function
    if source then
        -- for server side
        vRPclient.notify(source, { msg, type })
    else
        -- for client side
        vRP.notify({ msg, type })
    end
end

Config.showTextUI = function(message)
    exports['axr_hudv1']:showTextUI('E', 'Halloween Event', message)
end

Config.hideTextUI = function(msg)
    exports['axr_hudv1']:hideTextUI();
end

Config.progressBar = function(text, time) -- from client side (time in miliseconds | seconds * 1000)
    exports["rprogress"]:Start(text, time);
end

Config.hasCommandAccess = function(user_id) 
    if not user_id then return false end;
    return vRP.isUserFondator { user_id };
end

```

{% endtab %}

{% tab title="QBCore" %}
Functions are made for a basic **QBCore Server base**. If your functions are not matching please edit QBCore.Functions from *config/functions.lua*

```lua
```

{% endtab %}
{% endtabs %}


---

# 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://axero-scripts.gitbook.io/axr-documentation/resources/axr_halloween/functions.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.
