AV Scripts
StoreDiscord
  • Documentation
  • Guides
    • Dealerships
      • Installation
      • Admin Panel
        • All Vehicles
        • Dealerships
        • Auctions
      • Dealership Panel
        • Overview
        • Auctions
        • Employees
        • Orders
        • Payments
        • Showroom
        • Warehouse
        • Pre Owned
        • Settings
      • Buy/Sell Vehicles
      • Catalogue
      • Exports
      • FAQ
    • House Robbery
      • Installation
      • Add Shells
      • Dispatch
      • Exports
      • Weather
      • Minigames
      • Notifications
      • New Houses
      • Object Types
      • Sell Items
    • Illegal Runs
      • Installation
      • Customization
      • Ox Inventory
      • QB Inventory
    • Multicharacter
      • Installation
      • Character Slots
      • Clothes
      • Scenes
        • Previews
      • Exports
      • Weather
    • Paleto Heist
      • Buy here
    • Refund System
      • Installation
        • Inventories
    • Tuning Script
      • Installation
      • Events and Controls
      • Exports
      • Price Multiplier
    • Vehicleshop
      • Installation
      • Admin Panel
      • Addon Vehicles
      • Functions
        • Fuel
        • Keys
        • VIP
        • Weather
      • Garages
      • HUD
      • Society
    • Weather Script
      • Installation
      • Breath Condensation
      • Fog
      • Real Time Sync
      • Exports
    • VIP Script
      • Installation
      • Exports
      • Categories
      • Admin
      • Tebex
      • Free Tokens
  • LAPTOP PACK V3
    • Laptop v3
      • Installation
        • Inventory
        • Cosmo
        • Permissions
        • QBCore
        • Custom Framework/Inventory
        • Phone
        • Translate
      • Browser
      • Terminal
      • Documents
      • APPs Config
      • Exports
    • Boosting
      • Create Profile
      • APP
      • Contracts
      • Dispatch
      • Lockpick Export
      • VIN Export
    • Business
      • Installation
        • Inventories
          • Origen Inventory
            • ESX
            • QBCore
          • OX Inventory
          • QB/PS/LJ Inventory
          • Quasar Inventory
            • ESX
            • QBCore
          • Codem Inventory
          • Tgiann Inventory
        • ESX
      • Admin Panel
        • Create Zones
        • Edit Zones
      • Config
        • Animations
        • Blips
        • Buttons
        • Crafting
        • Effects
        • Events
          • Items
          • Zones
        • Logs
          • Custom Logs
        • Permissions
      • Exports
      • Banking Scripts
      • Multijobs
    • Cameras
      • Installation
        • Vehicle Cameras
      • Place Camera
      • Job Cameras
    • Drugs
      • Installation
      • Admin Panel
      • APP
      • Tables
      • Labs
        • PC
        • Raids
      • Alert Cops
      • Shells
      • Exports
    • Gangs
      • Installation
      • Admin Panel
        • Gangs
        • Whitelist
      • Properties
      • Register Gang
      • APP
        • Members
        • Settings
        • Missions
        • Blackmarket
        • Properties
      • Graffitis
      • Missions
      • Gang NPC
      • Shells
      • Exports
      • Labs
    • Groups
      • Events
      • Exports
    • Music
      • Installation
      • Music Labels
      • APP
        • Search Music
        • Playlists
        • Headphones
      • CDs
    • Racing
      • Installation
        • Permissions
        • Discord Logs
        • Addon Vehicles
      • Admin Panel
      • Categories
      • Events
      • Exports
      • Personal Settings
      • The Underground
    • Custom APPs
    • Discord Support
Powered by GitBook
On this page
  1. Guides
  2. VIP Script

Exports

getVIP()

Retrieve the VIP status from the player.

returns:

  • status boolean

local isVIP = exports['av_vip']:getVIP()
print(isVIP) -- true/false

getTokens()

Get the tokens owned by the player.

returns:

  • amount number

local tokens = exports['av_vip']:getTokens()
print(tokens) -- number (0 - ????)

getVip(playerId)

Retrieve the VIP status from the player.

parameters:

  • playerId number: The player server ID.

returns:

  • status boolean

local isVIP = exports['av_vip']:getVIP(playerId)
print(isVIP) -- true/false

addVIP(playerId, months)

Extends or grants a VIP membership to a player for the specified months.

parameters:

  • playerId number: The player server ID.

  • months number: Duration or extension of the VIP membership

exports['av_vip']:addVIP(playerId, 6)

getTokens(playerId)

Get the tokens owned by the player using his server ID.

parameters:

  • playerId number: Player server ID.

returns:

  • amount number

local tokens = exports['av_vip']:getTokens(playerId)
print(tokens) -- number (0 - ????)

addTokens(playerId, amount)

Add tokens to the player.

parameters:

  • playerId number: The player server ID.

  • amount number: The amount to add.

returns:

  • tokens number: Returns the current amount of tokens.

local newAmount = exports['av_vip']:addTokens(playerId, 500)
print(newAmount)

removeTokens(playerId, amount)

Remove tokens from the player.

Make sure to always run a getTokens() before, this export does NOT verify the current amount of tokens owned by the player.

parameters:

  • playerId number: The player server ID.

  • amount number: Amount of tokens to remove.

local toRemove = 50
local myTokens = exports['av_vip']:getTokens(playerId)
if myTokens and tonumber(myTokens) >= toRemove then
    exports['av_vip']:removeTokens(playerId, toRemove)
else
    print("Player doesn't have enough tokens")
end

Last updated 1 month ago