Steamworks.SteamGameServerInventory.TradeItems C# (CSharp) Method

TradeItems() public static method

IN-GAME TRADING

TradeItems() implements limited in-game trading of items, if you prefer not to use

the overlay or an in-game web browser to perform Steam Trading through the website.

You should implement a UI where both players can see and agree to a trade, and then

each client should call TradeItems simultaneously (+/- 5 seconds) with matching

(but reversed) parameters. The result is the same as if both players performed a

Steam Trading transaction through the web. Each player will get an inventory result

confirming the removal or quantity changes of the items given away, and the new

item instance id numbers and quantities of the received items.

(Note: new item instance IDs are generated whenever an item changes ownership.)

public static TradeItems ( SteamInventoryResult_t &pResultHandle, CSteamID steamIDTradePartner, SteamItemInstanceID_t pArrayGive, uint pArrayGiveQuantity, uint nArrayGiveLength, SteamItemInstanceID_t pArrayGet, uint pArrayGetQuantity, uint nArrayGetLength ) : bool
pResultHandle SteamInventoryResult_t
steamIDTradePartner CSteamID
pArrayGive SteamItemInstanceID_t
pArrayGiveQuantity uint
nArrayGiveLength uint
pArrayGet SteamItemInstanceID_t
pArrayGetQuantity uint
nArrayGetLength uint
return bool
		public static bool TradeItems(out SteamInventoryResult_t pResultHandle, CSteamID steamIDTradePartner, SteamItemInstanceID_t[] pArrayGive, uint[] pArrayGiveQuantity, uint nArrayGiveLength, SteamItemInstanceID_t[] pArrayGet, uint[] pArrayGetQuantity, uint nArrayGetLength) {
			InteropHelp.TestIfAvailableGameServer();
			return NativeMethods.ISteamGameServerInventory_TradeItems(out pResultHandle, steamIDTradePartner, pArrayGive, pArrayGiveQuantity, nArrayGiveLength, pArrayGet, pArrayGetQuantity, nArrayGetLength);
		}