Exports

These exports are only for the script's native currency.

Get Player Balance

Export: GetCoinBalance

Parameters:

  • id (number)

Returns: number or false

local src = 1
local result = exports["LuxuVipShop"]:GetCoinBalance(src)
print("Player 1 balance:", result)

Update Player Balance

Export: UpdateCoinBalance

Parameters:

  • id (number)
  • amount (number)
  • operation — "add", "remove", or "set"

Returns: true or false

local src = 1
local amount = 100
local operation = "add"

local result = exports["LuxuVipShop"]:UpdateCoinBalance(src, amount, operation)

if result then
   print('success')
else
   print('failed')
end

Open Menu Event

There is no built-in event, but you can add one manually:

  1. Open LuxuVipShop/client/cl_utils.lua
  2. Add the following event:
RegisterNetEvent("LuxuVipShop:openMenu", function()
      if not CheckPermission() then return OpenNUI('NoAccess') end
      OpenNUI('main')
end)

Trigger it from the client:

TriggerEvent("LuxuVipShop:openMenu")