Exports

If you need any other callback or event, just let me know!

getVisumState (client)

Returns the current visum state of the player:

"whitelisted" -> Player is whitelisted

"visum" -> Player has valid visum

"expired" -> Player visum has expired

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

Example how to limit shops using ox_inventory:

ox_inventory/client.lua in line 166
...
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
...

You can block all functions for people who are not listed and only have visa or it has expired.

Last updated

Was this helpful?