sellProperty

Description

Triggered when a player attempts to sell a property to the default buyer.

Payload Structure

{
    source = playerId,           -- The player's server ID
    player = playerData,         -- Player data object from framework
    propertyId = propertyId,     -- Property identifier
    sellPrice = sellPrice,       -- Calculated sale price
    ownerType = ownerType,       -- Current owner type (e.g., 'user', 'society')
    ownerIdentifier = ownerId    -- Current owner identifier
}

Parameters

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

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

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

  • sellPrice (number): Price that will be paid for the property

  • ownerType (string): Current owner type (e.g., user, society)

  • ownerIdentifier (string): Identifier of the current owner

Usage Example

Return Values

  • true or nil: Allow the property sale to continue

  • false: Cancel the property sale and prevent the transaction

Last updated