gpScripts Docs
StoreDiscordYoutube
  • 📔gpScripts
  • Clothingshop
    • Installation
    • Developers
      • Client
  • 💰InsuranceSystem
    • Installation
    • Developers
      • Client
      • Server
  • 📲Businesscards
    • Installation
    • Developers
      • Events
  • 🛡️visumsystem
    • Installation
    • Developers
      • Commands
      • Exports
      • Events
    • Code Snippets
      • QB-Garages
  • ☎️Emergencyphone
    • Installation
    • Common mistakes
      • Common mistakes
    • Developer
      • Events
  • 💵Tax-System
    • Installation
      • Step 1 - SQL-File
      • Step 2 - [QB-Core] Changes
      • Step 3 - [ESX] Changes
      • Step 4 - Restart your server
      • Step 5 - Set first deduction date
    • Exclude inactive vehicles
    • Common mistakes
      • Common mistakes
    • Developer
      • Events
Powered by GitBook
On this page

Was this helpful?

  1. visumsystem
  2. Developers

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.

PreviousCommandsNextEvents

Last updated 2 years ago

Was this helpful?

🛡️