Skip to content
M2O Scripting APIScripting reference
Global objectServer APIGenerated

Shop

const Shop: object

Defined in: server/api.d.ts:1317

Overrides availability, visibility, and prices of Mafia II shop items.

clear(): void

Removes all server-side shop-item overrides.

void

clearItem(shopName, index): void

Removes the override for one shop item.

string

Shop identifier exactly as it was passed to Shop.setItem.

number

Zero-based item slot whose override should be removed.

void

getItems(shopName?): ShopItem[]

Returns a snapshot of configured shop-item overrides.

string

Optional shop identifier used to filter the result; matched against the identifier the override was stored with.

ShopItem[]

All matching overrides, or all shops when shopName is omitted.

setItem(shopName, index, enabled, visible?, price?, ammoPrice?): void

Creates or updates a replicated shop-item override.

string

Friendly shopmenu2 configuration name, such as “Deli bar”; the shop script path reported as playerShopOpen’s shopPath is also accepted.

number

Zero-based item slot to override.

boolean

Whether the item can be purchased.

boolean

Optional visibility override.

number

Optional purchase-price override.

number

Optional ammunition-price override.

void