38 {
40
41 CargoBase cargo = item.GetInventory().GetCargo();
42
43 InventoryLocation il_dst = new InventoryLocation;
44 InventoryLocation il_src = new InventoryLocation;
45
46 float dmg = item.GetHealth01("","");
47
48 if( dmg > 0.25 )
49 {
51 paper.SetHealth01("","", dmg - 0.25 );
52 }
53
55 {
57
58 GameInventory.SetGroundPosByOwner(action_data.m_Player,cargo_item,il_dst);
59 cargo_item.GetInventory().GetCurrentInventoryLocation(il_src);
60
61 if(
GetGame().IsDedicatedServer())
62 action_data.m_Player.ServerTakeToDst( il_src, il_dst );
63 else
64 action_data.m_Player.LocalTakeToDst( il_src, il_dst );
65 }
66
67 item.DeleteSafe();
68 }
const int ECE_PLACE_ON_SURFACE
class GP5GasMask extends MaskBase ItemBase
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
proto native int GetItemCount()
proto native EntityAI GetItem(int index)
proto native CGame GetGame()