onShopSold
Purpose
Triggered when a player sells their shop back to the system. Use this hook to update business registries and track when businesses are dissolved.
When It Triggers
Owner sells shop back to the system
Refund is processed
Shop becomes unowned
Parameters
Parameter
Type
Description
data.source
number
Player server ID
data.shopId
string
Unique shop identifier
data.shopName
string
Display name of the shop
data.ownerIdentifier
string
Former owner's identifier
data.ownerName
string
Former owner's name
data.refundAmount
number
Amount refunded (typically 75% of purchase price)
data.refundMethod
string
Where refund was sent ('bank')
data.originalPurchasePrice
number
Original purchase price
data.timestamp
number
Server timestamp
Example
Last updated