I've got my items, and my stats for each item, but how do I create the actual player inventory? -
I can't store arrays within arrays because it confuses the computer/compiler, so how would I go about adding this:
Код:
enum ItemData
{
Name[20],
AmmoType[20],
WeaponID,
Condition,
Quantity,
Ammo,
Rarity,
InventoryID
}
new Items[18][ItemData] =
{
{"M1911", ".45 Cal", 22, 0, 1, 0, 1},
{"M1911 SD", ".45 Cal", 23, 0, 1, 0, 2},
{"Desert Eagle", ".50 Cal", 24, 0, 1, 0, 3},
{"Remington 870", "12 Gauge", 25, 0, 1, 0, 4},
{"Double Barrel", "12 Gauge", 26, 0, 1, 0, 5},
{"SPAS-12", "20 Gauge", 26, 0, 1, 0, 6},
{"Mac 10", "9mm", 27, 0, 1, 0, 7},
{"MP5", "9mm", 28, 0, 1, 0, 8},
{"AKM", "7.62mm", 31, 0, 1, 0, 9},
{"M4A1", "5.56mm", 31, 0, 1, 0, 10},
{"Tec-9", "9mm", 32, 0, 1, 0, 11},
{"Winchester 94", ".32 cal", 33, 0, 1, 0, 12},
{"Remington 700", ".308", 34, 0, 1, 0, 13},
{"RPG-7", "40mm Warhead", 35, 0, 1, 0, 14},
{"M2 Flamethrower", "Napalm", 37, 0, 1, 0, 15},
{"M134 Minigun", "7.62mm", 38, 0, 1, 0, 16},
{"C4", "%0", 39, 0, 1, 0, 17},
{"C4 Detonator", "%0", 29, 0, 1, 0, 18}
};
into a functional player inventory saving system? Thank you so much in advance!