Returns the maximum number of an item allowed in a single purchase. Determines the largest value usable for the second argument (quantity) of BuyMerchantItem() when purchasing the item. For most items, this is the same as the maximum stack size of the item.


See also Merchant functions.

Signature:

maxStack = GetMerchantItemMaxStack(index)

Arguments:

Returns:

  • maxStack - Largest number of items allowed in a single purchase (number)

Examples:

-- Buys the largest quantity possible in one purchase for the given index
BuyMerchantItem(index, GetMerchantItemMaxStack(index))