# Exports

{% hint style="info" %}
If you need any other callback or event, just let me know!
{% endhint %}

## ***getVisumState (client)***

{% hint style="info" %}
Returns the current visum state of the player:

"whitelisted" -> Player is whitelisted

"visum" -> Player has valid visum

"expired" -> Player visum has expired&#x20;
{% endhint %}

```lua
local visumState = exports['gp_visum']:getVisumState()
```

Example how to limit shops using ox\_inventory:

{% code title="ox\_inventory/client.lua in line 166" lineNumbers="true" %}

```lua
...
if inv == 'shop' and invOpen == false then
    -- get user state
    local visumState = exports['gp_visum']:getVisumState()
    -- return if user is not whitelisted
    if visumState ~= "whitelisted" then return end

    if cache.vehicle then
        return lib.notify({ id = 'cannot_perform', type = 'error', description = locale('cannot_perform') })
    end

    left, right = lib.callback.await('ox_inventory:openShop', 200, data)
elseif inv == 'crafting' then
...
```

{% endcode %}

{% hint style="info" %}
You can block all functions for people who are not listed and only have visa or it has expired.
{% endhint %}


---

# 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.gpscripts.dev/visumsystem/developers/exports.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.
