Item
Namespace: FivePD.API.Utils#
File: Source/Utils/Item.cs#
The Item class contains item related information.
You can use this class to create Item instances, which can be used to set ped items / vehicle items. (using SetPedData() or SetVehicleData())
Fields#
Name#
Type:stringThe name of the item.
IsIllegal#
Type:boolWhether the item is illegal.
Usage#
Item creation
Item violation = new Item();Item.Name = "Test Item";Item.IsIllegal = false;To get items from a ped
Ped ped;...PedData pedData = await ped.GetData();List<Item> pedItems = pedData.Items;
foreach(var item in pedItems) Debug.WriteLine(item.Name); // Prints the name of each item To get items from a vehicle
Vehicle vehicle;...VehicleData vehData = await vehicle.GetData();List<Item> vehItems = vehData.Items;
foreach(var item in vehItems) Debug.WriteLine(item.Name); // Prints the name of each item