buyProperty

Description

Triggered when a player attempts to purchase a property.

Payload Structure

{
    source = playerId,      -- The player's server ID
    player = playerData,    -- Player data object from framework
    propertyId = propertyId,-- Property identifier
    buyAs = buyAs          -- Purchase type (e.g., 'society', 'user')
}

Parameters

  • source (number): The server ID of the player attempting the purchase

  • player (table): Complete player data object provided by the framework (ESX/QBCore)

  • propertyId (string/number): Unique identifier for the property being purchased

  • buyAs (string): The purchase context - typically 'player' for personal purchase or 'gang' for organization purchase

Usage Example

Return Values

  • true or nil: Allow the property purchase to continue

  • false: Cancel the property purchase and prevent the transaction

Last updated