buyProperty
Description
Triggered when a player attempts to purchase a property.
Payload Structure
lua
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
lua
Return Values
- true or nil: Allow the property purchase to continue
- false: Cancel the property purchase and prevent the transaction