Exports

📤 Exports

Server-Side Exports

lb-clubby does not provide direct exports. Instead, it uses lib.callback for server-side communication.

Available Callbacks

Get Clubby Account

local account = lib.callback.await('GET_CLUBBY_ACCOUNT', source)

Returns:

{
    LoggedIn = boolean,
    Username = string,
    PhoneNumber = string,
    Avatar = string,
    Bio = string,
    Banner = string,
    HostedRoomsCount = number
}

Get Clubby Rooms

local rooms = lib.callback.await('GET_CLUBBY_ROOMS', source)

Returns: Array of room objects with room information.

Get Player Profile

Parameters:

  • source - Server ID of requesting player

  • targetSource - Server ID of target player

Returns: Account data for the target player.

Get Player Identifiers

Parameters:

  • source - Server ID of requesting player

  • targetSource - Server ID of target player

Returns: Table of player identifiers (excludes IP address).

Get Clubby Badges

Returns: Badge configuration for hosted rooms.

Framework Integration

The resource uses the following framework exports (automatically handled):

  • ESX: exports["es_extended"]:getSharedObject()

  • QB-Core: exports['qb-core']:GetPlayer(source)

  • QBox: exports.qbx_core:GetPlayer(source)

  • Standalone: exports["lb-phone"]:GetEquippedPhoneNumber(source)

Server Events

You can trigger server events from other resources:

Create Room

Data Structure:

Join Room

Data Structure:

Leave Room

Create Account

Data Structure:

Update Account Settings

Data Structure:

Client Events

You can listen to these events from other resources:

Room Created/Updated

Account Created

Account Refreshed

Room Joined

Room Left


📝 Notes

  • Rooms are temporary and stored in memory only

  • Room history is tracked in the database for badge calculations

  • The resource automatically cleans up empty rooms after 5 minutes

  • Voice chat requires pma-voice to be properly configured

  • Phone numbers are retrieved from your framework or lb-phone

Last updated