How to use

On this page, we will explain how you should use the resource.

Default commands

/vipmenu: Open vip menu (Configurable in Config.lua).

/code: Redeem a code (Configurable in Config.lua).

Deployment to other resources

To stretch the VIP data of a user we can do it using the following exports:

local vip = exports['gcm_vips']:getVip()

print(vip)
-- This returns false if the user does not have an active VIP and if they do, it returns the name of the VIP EJ: vip_diamond.

If you need help on how to use this data in your resources, do not hesitate to request support.

Export to give vip status

This export returns true if the VIP was delivered and false if the user has an active VIP.

-- If you need the vip to be lifetime, put the days in 0
exports['gcm_vips']:giveVipUser(src, vip_type, days)

Example use

if exports['gcm_vips']:giveVipUser(src, vip_type, days) then
    -- The vip has delivered or edited successfully
else
    -- The user have a diferent vip an not have been delivered
end

Export to get days remaining

Return the days remaining of a vip, if is lifetime return 'lifetime' or false if not vip

local days = exports['gcm_vips']:getDaysRemaining(src)

Last updated