JOIN OUR DISCORD! https://discord.gg/9zdQYqP5gc

๐Ÿ“žEXPORTS

Export Functions

Client-side Exports

-- Returns true if player is VIP
exports['sasa-vip']:isPlayerVip()

-- Returns VIP label (e.g. "๐ŸŒŸ VIP")
exports['sasa-vip']:getPlayerVipLabel()

Server-side Exports

-- Checks if player is VIP
exports['sasa-vip']:isPlayerVip(source)

-- Gets player's VIP tier ID (e.g. "vip" or "premium")
exports['sasa-vip']:getPlayerVipTier(source)

-- Gets player's VIP label (e.g. "๐ŸŒŸ VIP")
exports['sasa-vip']:getPlayerVipLabel(source)

Usage Examples

Checking Specific VIP Role

-- Client-side
local vipTier = exports['sasa-vip']:getPlayerVipTier()
if vipTier == "vip" then
    -- Code for VIP members
elseif vipTier == "premium" then
    -- Code for Premium members
end

-- Server-side
local playerId = source
local vipTier = exports['sasa-vip']:getPlayerVipTier(playerId)
if vipTier == "vip" then
    -- Code for VIP members
end

Checking General VIP Status

-- Client-side
if exports['sasa-vip']:isPlayerVip() then
    -- Code for all VIP members
end

-- Server-side
local playerId = source
if exports['sasa-vip']:isPlayerVip(playerId) then
    -- Code for all VIP members
end

Framework-Specific Code

-- ESX Example
if Config.Framework == 'esx' then
    local xPlayer = ESX.GetPlayerFromId(playerId)
    if exports['sasa-vip']:isPlayerVip(playerId) then
        -- VIP code here
    end
end

-- QBCore Example
if Config.Framework == 'qbcore' then
    local Player = QBCore.Functions.GetPlayer(playerId)
    if exports['sasa-vip']:isPlayerVip(playerId) then
        -- VIP code here
    end
end

Last updated