GCMod

Exports and Statebags

Public API contracts (exports/statebags) for gcm_vipsystem.




This section intentionally tracks only exports and statebags.

Exports

getVip() (client export)
  • Context: client export
  • Signature:
lua
local vipType = exports['gcm_vips']:getVip()
  • Returns:
    • VIP key string (for example vip_oro) when active
    • false when player has no active VIP

Usage example

lua
local vipType = exports['gcm_vips']:getVip()
if vipType then
    print(('Player VIP is %s'):format(vipType))
end
getVip(src) (server export)
  • Context: server export
  • Signature:
lua
local vipType = exports['gcm_vips']:getVip(source)
  • Returns:
    • VIP key string if active
    • false otherwise

Usage example

lua
local vipType = exports['gcm_vips']:getVip(source)
if vipType == 'vip_diamante' then
    -- apply premium server-side logic
end
giveVipUser(src, vip_type, days) (server export)
  • Context: server export
  • Signature:
lua
local ok = exports['gcm_vips']:giveVipUser(src, vipType, days)
  • Parameters:

    • src (number): target player source
    • vipType (string): key in Config.Vips
    • days (number): duration in days (0 means lifetime)
  • Returns:

    • true on inserted/extended VIP
    • false on failure or incompatible active VIP state

Usage example

lua
local ok = exports['gcm_vips']:giveVipUser(source, 'vip_oro', 30)
if not ok then
    print('VIP grant failed')
end
getDaysRemaining(src) (server export)
  • Context: server export
  • Signature:
lua
local remaining = exports['gcm_vips']:getDaysRemaining(src)
  • Returns:
    • number (days remaining)
    • 'lifetime'
    • false when no active VIP

Usage example

lua
local remaining = exports['gcm_vips']:getDaysRemaining(source)
if remaining == 'lifetime' then
    print('Permanent VIP')
elseif type(remaining) == 'number' then
    print(('VIP expires in %s days'):format(remaining))
end

Statebags

Statebag keys

No explicit statebag reads/writes were detected in current gcm_vips code.