In Weapon_HEGrenade.cs, turn this
package HEGrenadePackage
{
function Armor::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f)
{
if(%col.dataBlock $= "HEGrenadeItem" && %col.canPickup)
{
for(%i=0;%i<%this.maxTools;%i++)
{
%item = %obj.tool[%i];
if(%item $= 0 || %item $= "")
{
%freeSlot = 1;
break;
}
}
if(%freeSlot)
{
%obj.pickup(%col);
return;
}
}
Parent::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f);
}
};
activatePackage(HEGrenadePackage);
into this
package HEGrenadePackage
{
function Armor::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f)
{
if(%col.dataBlock $= "HEGrenadeItem" && %col.canPickup)
{
for(%i=0;%i<%this.maxTools;%i++)
{
%item = %obj.tool[%i];
if(%item $= 0 || %item $= "")
{
%freeSlot = 1;
break;
}
}
if(%freeSlot && %obj.maxPick <= 3) //The only two edits are here...
{
%obj.pickup(%col);
%obj.maxPick++; //and here!
return;
}
}
Parent::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f);
}
};
activatePackage(HEGrenadePackage);
and it should work fine, just to use it for your weapon change the image name to the proper thing, etc etc
edit: forgot to mention, this will allow 3 of the item in the inventory, jsut change the 3 in the first edited line to whatever number you want. ALSO if the item gets used up in whatever way make sure to include something to minus the maxPick variable. You will also need to package serverCmdDropTool to minus the maxPick variable when the item is dropped
function serverCmdDropTool(%client, %i)
{
//stuff
parent::serverCmdDropTool(%client, %i);
}