Some code, from the Script_DropWeapon.cs, made by Zor. Copy and pasted straight from my server script. You'll need to replace most of the 6s with 5s (my players have 6 inventory slots). Also, if you don't want equipped weapon to drop, you'll need to mod the script some.
//a little script that makes the player drop their current weapon when they die
//made by zor
package dropweapon{
function GameConnection::onDeath(%client,%a,%b,%c,%d,%e,%f){
 if(%client.minigame)
  servercmddroptool(%client,%client.player.currtool);
for(%k=0;%k<=6;%k++){
if(%k == 6)
{
%client.hastoolnotes = 1;
 Parent::onDeath(%client,%a,%b,%c,%d,%e,%f);
}
if(%client.player.tool[%k])
{
%client.toolnotes[%k] = %client.player.tool[%k];
}
}
 Parent::onDeath(%client,%a,%b,%c,%d,%e,%f);
}
function GameConnection::spawnPlayer(%this)
{
 Parent::spawnPlayer(%this);
 if(%this.minigame){
if(%this.hastoolnotes == 1)
{
for(%k=0;%k<=6;%k++){
if(%k == 6)
{
%this.hastoolnotes = 0;
}
if(%this.toolnotes[%k])
{
%this.player.tool[%k] = %this.toolnotes[%k];
messageClient(%this, 'MsgItemPickup', '', %k, %this.toolnotes[%k]);
%this.toolnotes[%k] = 0;
}
}}
}
}
};
ActivatePackage(dropweapon);