Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exec function DropItem(String ItemToDrop)
- {
- local SapituInventory inv;
- local StaticMesh sm;
- local SapituItem itm;
- local int i;
- itm = sapitu.getItem(ItemToDrop);
- if (itm == none)
- {
- TeamMessage(none, "No item type exists with id to craft: "$ItemToDrop, 'none');
- return;
- }
- inv = sapitu.createInventory(itm);
- if (inv == none)
- {
- TeamMessage(none, "Error crafting item: "$ItemToDrop, 'none');
- return;
- }
- if (PawnHasItem(ItemToDrop))
- {
- TeamMessage(none,"Player drop the item"$itm.DisplayName, 'none');
- char.RemoveInventory(inv); // HERE is where i remove or thats what i think the item from the array
- PickupItem = Spawn(class'Items', self,, Pawn.Location); // code for item spawning
- sm = StaticMesh(DynamicLoadObject(itm.ItemModel, class'StaticMesh'));
- PickupItem.SetStaticMesh(sm);
- }
- }
Add Comment
Please, Sign In to add comment