function player::setItem( %this, %index, %item )
{
%item = %item.getID();
%this.weaponCount += ( !isObject( %this.tool[ %index ] ) );
%this.tool[ %index ] = %item.;
messageClient( %this.client, 'MsgItemPickup', '', %index, %item );
}
function player::addItem( %this, %item )
{
%item = %item.getID();
%cnt = %player.getDataBlock().maxTools;
for ( %i = 0 ; %i < %cnt ; %i++ )
{
if ( !isObject( %this.tool[ %i ] ) )
{
%this.tool[ %i ] = %item;
%this.weaponCount++;
messageClient( %this.client, 'MsgItemPickup', '', %i, %item );
return true;
}
}
}