💎
_bl4ck Docs
DISCORD
  • 🛠️SCRIPTS
    • 💎lb_vips
      • Installation
      • Configuration
      • Languages
      • Tebex Integration
      • Exports
        • Client
        • Server
    • 👨‍⚕️lb_revivenpc
      • Installation
      • Configuration
Powered by GitBook
On this page
  • ATTENTION
  • EXPORT TYPES
  • EXAMPLES
  1. SCRIPTS
  2. lb_vips
  3. Exports

Client

Options for Exports and their usage on the Client Side

ATTENTION

DO NOT CHANGE THE RESOURCE NAME OR EXPORTS WILL NOT WORK.

EXPORT TYPES

[1] <-> exports['lb_vips']:isVIP() -- isVIP() returns TRUE or FALSE
[2] <-> exports['lb_vips']:vipLevel() -- vipLevel() returns a table with 2 values (level and label) --> level is the number of the level and label is the name of the level

EXAMPLES

  • This is an example of getting the VIP status, level and level label from a different resource using the exports:

RegisterCommand('testVIP',function()
    local vip = exports['lb_vips']:isVIP()
    local levelData = exports['lb_vips']:vipLevel()
    if vip then
        print('VIP active')
        print('You\'re VIP with level: '..levelData.level..'!') --> Result: You're VIP with level: 3!
        print('You\'re '..levelData.label) --> Result: You're VIP Diamond
    else
        print('Not VIP')
    end
end)
  • Example of a Zone for VIP members Level 3:

Citizen.CreateThread(function()
    local player = PlayerPedId()
    local zoneCoords = Config.zoneCoords
    while true do
        Citizen.Wait(5)
        local playerCoords = GetEntityCoords(player)
        if #(playerCoords - zoneCoords) < Config.distance then
            if IsControlJustPressed(0,38) and exports['lb_vips']:isVIP() then
                local levelData = exports['lb_vips']:vipLevel()
                if levelData.level == 3 then
                    print('Open Shop')
                else
                    print('You are VIP but not Level 3')
                end
            end
        end
    end
end)
PreviousExportsNextServer

Last updated 1 year ago

🛠️
💎