Skip to content

description: >- Exports reference for cd_vipshop including functions for point management, purchases, and VIP shop integration. keywords: cd_vipshop exports, VIP shop exports, point management, purchases, FiveM exports, Codesign developer API

Exports

Notice


These exports are entirely optional and can be used as needed within your own scripts or integrations.

Server

Get Balance

Returns a player's VIP balance.

Parameters
lua
--- @param number source The player source.
--- @return number balance The player's VIP balance.

--- @example
local balance = exports['cd_vipshop']:GetVipBalance(source)
print('VIP Balance:', balance)
lua
local balance = exports['cd_vipshop']:GetVipBalance(source)

Add Balance

Adds VIP tokens to a player.

Parameters
lua
--- @param number source The player source.
--- @param number amount The amount of VIP tokens to add.

--- @example
exports['cd_vipshop']:AddVipBalance(source, 5)
lua
exports['cd_vipshop']:AddVipBalance(source, amount)

Remove Balance

Removes VIP tokens from a player.

Parameters
lua
--- @param number source The player source.
--- @param number amount The amount of VIP tokens to remove.

--- @example
exports['cd_vipshop']:RemoveVipBalance(source, 5)
lua
exports['cd_vipshop']:RemoveVipBalance(source, amount)

Can Purchase Check

Checks whether a player can afford a purchase.

Parameters
lua
--- @param number source The player source.
--- @param number cost The cost of the purchase.
--- @return boolean canPurchase Whether the player can afford the purchase.

--- @example
local canPurchase = exports['cd_vipshop']:CanPurchaseCheck(source, 50)
print('Can purchase:', canPurchase)
lua
local canPurchase = exports['cd_vipshop']:CanPurchaseCheck(source, cost)

Hello!