onShopPurchased

Purpose

Triggered when a player purchases ownership of a shop. Use this hook to register businesses in MDT, log transactions, or update external systems.

When It Triggers

  • Player completes shop purchase

  • Ownership is transferred to the player

  • Payment is processed

Parameters

Parameter
Type
Description

data.source

number

Player server ID who purchased

data.shopId

string

Unique shop identifier

data.shopType

string

Type of shop

data.shopName

string

Display name of the shop

data.ownerIdentifier

string

New owner's player identifier

data.ownerName

string

New owner's character name

data.purchasePrice

number

Amount paid for the shop

data.paymentMethod

string

'cash', 'bank', or 'society'

data.societyName

string

Society name if paid with society funds

data.shopLocation

vector3

Shop coordinates

data.timestamp

number

Server timestamp

Example

Last updated