> For the complete documentation index, see [llms.txt](https://prime-scripts-1.gitbook.io/pr-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prime-scripts-1.gitbook.io/pr-scripts-docs/docs/quickstart-2/client-side-open-files.md).

# ⚙️Client Side Open Files

```lua
-- OPEN CLIENT SIDE FUNCTIONS / EVENTS

RegisterNetEvent("pr-vfx:client:hidehud")
AddEventHandler("pr-vfx:client:hidehud", function()
-- ADD YOUR CUSTOM HIDE/SHOW EVENT HERE
end)


                --- FUNCTIONS ---

-- Function to display notifications based on the configured system
function Notify(message, source)
    -- Check the notification system set in the config
    if Config.Notify == 'OX' then
        -- OX_LIB notifications
        lib.notify({
            title = 'PR-VFX',
            description = message,
            position = 'center-right',
            icon = "skull",
            duration = "400",
            iconAnimation = "beatFade",
            style = {
                backgroundColor = '#000000',
                color = '#ff0000',
                ['.description'] = {
                  color = '#e9e9e9'
                }
            },
            iconColor = '#fff'
        })
    elseif Config.Notify == 'ESX' then
        -- ESX notification
        TriggerEvent('esx:showNotification', source, message)
    elseif Config.Notify == 'QB' then
        -- QB-Core notification
        TriggerEvent('QBCore:Notify', source, message, 'inform')
    end
end


function Dispatch(coords, type)
    if Config.Dispatch.Enabled then
        if Config.Dispatch.Dispatch == "cd_dispatch" then
            if type == "sell" then
                local data = exports['cd_dispatch']:GetPlayerInfo()
                TriggerServerEvent('cd_dispatch:AddNotification', {
                    job_table = "police",
                    coords = coords,
                    title = "10-66 - Suspicious person",
                    message = "Suspicious activity was spotted by a citizen",
                    flash = 0,
                    unique_id = tostring(math.random(0000000, 9999999)),
                    blip = {
                        sprite = sprite,
                        scale = 1.2,
                        colour = 3,
                        flashes = false,
                        text = text,
                        time = (5 * 60 * 1000),
                        sound = 1,
                    }
                })
            end
        elseif Config.Dispatch.Dispatch == "ps-dispatch" then
            if type == "sell" then
                exports['ps-dispatch']:SuspiciousActivity()
            end
        elseif Config.Dispatch.Dispatch == "origen_police" then
            if type == "sell" then
                TriggerServerEvent("SendAlert:police", {
                    coords = coords,
                    title = '10-66 - Suspicious person',
                    type = 'GENERAL',
                    message = 'Suspicious activity was spotted by a citizen',
                    job = 'police',
                })
            end
        elseif Config.Dispatch.Dispatch == "custom" then
            if type == "sell" then
            print("[DEBUG] Add your dispatch! in cl_custom.lua")
            end
        end
    else
        print("[DEBUG] Add your dispatch! in cl_custom.lua")
    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:

```
GET https://prime-scripts-1.gitbook.io/pr-scripts-docs/docs/quickstart-2/client-side-open-files.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.
