I will start out with method #2, and later move on to #1 to get rid of these annoying sounds when items are loaded.
First I'm adding to the death and spawn scripts. The saving script works, but I can't get the items to load after spawning.
package LockInventory
{
function gameConnection::onDeath(%client, %killerPlayer, %killer, %damageType, %unknownA)
{
%player = %client.player;
%client.player.saveItems(%player);
Parent::onDeath(%client, %player, %killer, %damageType, %unknownA);
}
function GameConnection::createPlayer(%this, %spawnPoint)
{
Parent::createPlayer(%this, %spawnPoint);
%client.player.loadItems(%player);
}
};
activatePackage(LockInventory);