Hi,
i would like to add items to the pawn's inventory.
I m making an interface. With one of this button you will able for example to add night vision goggles to the inventory of the player selected.
i ve got no problem to select the pawn.
so i use the fonction
Pawn.addinventory(additems(0));
additems is a function which takes an index and returns an inventory
the function additemstring returns the string of the class
makeitem is a function found in the package AGP_Itemlist
but when i use Pawn.addinventory(additems(0));
we should see the picture of the nightvisiongoggles on the right of the screen
and nothing appeared and i can't use it
tell me if you know something about adding items.
thanks
i would like to add items to the pawn's inventory.
I m making an interface. With one of this button you will able for example to add night vision goggles to the inventory of the player selected.
i ve got no problem to select the pawn.
so i use the fonction
Pawn.addinventory(additems(0));
additems is a function which takes an index and returns an inventory
Code:
inventory additems(int index)
{
local inventory item
item makeitem(additemstring(index))
return item
}
Code:
string additemstring(int index)
{
local string itemname
switch(index)
{
case 0: itemname = "AGP_Inventory.NightOpticsDevice";break;
}
return itemname
}
but when i use Pawn.addinventory(additems(0));
we should see the picture of the nightvisiongoggles on the right of the screen
and nothing appeared and i can't use it
tell me if you know something about adding items.
thanks
Last edited by a moderator: