Shop
constShop:object
Defined in: server/api.d.ts:1317
Overrides availability, visibility, and prices of Mafia II shop items.
Type Declaration
Section titled “Type Declaration”clear()
Section titled “clear()”clear():
void
Removes all server-side shop-item overrides.
Returns
Section titled “Returns”void
clearItem()
Section titled “clearItem()”clearItem(
shopName,index):void
Removes the override for one shop item.
Parameters
Section titled “Parameters”shopName
Section titled “shopName”string
Shop identifier exactly as it was passed to Shop.setItem.
number
Zero-based item slot whose override should be removed.
Returns
Section titled “Returns”void
getItems()
Section titled “getItems()”getItems(
shopName?):ShopItem[]
Returns a snapshot of configured shop-item overrides.
Parameters
Section titled “Parameters”shopName?
Section titled “shopName?”string
Optional shop identifier used to filter the result; matched against the identifier the override was stored with.
Returns
Section titled “Returns”ShopItem[]
All matching overrides, or all shops when shopName is omitted.
setItem()
Section titled “setItem()”setItem(
shopName,index,enabled,visible?,price?,ammoPrice?):void
Creates or updates a replicated shop-item override.
Parameters
Section titled “Parameters”shopName
Section titled “shopName”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.
enabled
Section titled “enabled”boolean
Whether the item can be purchased.
visible?
Section titled “visible?”boolean
Optional visibility override.
price?
Section titled “price?”number
Optional purchase-price override.
ammoPrice?
Section titled “ammoPrice?”number
Optional ammunition-price override.
Returns
Section titled “Returns”void
