Guest User

Untitled

a guest
Jan 5th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. exec function DropItem(String ItemToDrop)
  2. {  
  3.     local SapituInventory inv;
  4.     local StaticMesh sm;
  5.  
  6.     local SapituItem itm;
  7.     local int i;
  8.     itm = sapitu.getItem(ItemToDrop);
  9.     if (itm == none)
  10.     {
  11.         TeamMessage(none, "No item type exists with id to craft: "$ItemToDrop, 'none');
  12.         return;
  13.     }
  14.     inv = sapitu.createInventory(itm);
  15.     if (inv == none)
  16.     {
  17.         TeamMessage(none, "Error  crafting item: "$ItemToDrop, 'none');
  18.         return;
  19.     }
  20.  
  21.    
  22.     if (PawnHasItem(ItemToDrop))
  23.     {
  24.       TeamMessage(none,"Player drop the item"$itm.DisplayName, 'none');
  25.      
  26.           char.RemoveInventory(inv); // HERE is where i remove or thats what i think the item from the array
  27.              PickupItem = Spawn(class'Items', self,, Pawn.Location); // code for item spawning
  28.         sm = StaticMesh(DynamicLoadObject(itm.ItemModel, class'StaticMesh'));
  29.          PickupItem.SetStaticMesh(sm);
  30.        
  31.  
  32.      
  33.     }
  34. }
Add Comment
Please, Sign In to add comment