sellProperty
Fires when an owner sells a property back to the government. Runs on the server.
It fires from the property menu and from the SellProperty export. It runs after the ownership checks and before the money is paid. Listing a property for sale to other players does not fire this hook.
Payload
lua
- source:
numberServer id of the player selling - player:
tableFramework player object of the player selling - propertyId:
numberThe property id - sellPrice:
numberAmount the owner will get. This is the purchase price timesConfig.SellPercentage/ 100. The amount paid is rounded down. - ownerType:
string'user'or'society' - ownerIdentifier:
stringCharacter identifier, or the job name for a society property
Example
lua
Return value
false: Cancel the sale. The player sees "You are not authorized to sell this property".- Anything else: The sale continues.