I herped a derp. You were missing a messageClient with a specific type called 'MsgItemPickup'
Type in /test, recieve gun.
// Your formatting is dog richard so let me show you how to make your stuff readable.
// You might be able to solve your own problems if you make it a bit cleaner.
function serverCmdTest(%client)
{
echo("INITIATING TEST.");
%obj = %client.player;
if(!isObject(%obj))
return false;
%maxTools = %obj.getDatablock().maxTools;
echo(" +- 1. Starting Loop");
for(%i = 0; %i < %maxTools; %i++)
{
echo(" +- 2. Loop #" @ %i);
%tool = %obj.tool[%i];
if(!isObject(%tool)
{
echo(" +- +- Unoccupied! Giving a gun.");
%player.tool[%i] = GunItem.getID();
%player.weaponCount++;
messageClient(%client, '', "\c3Gun\c6 purchased!");
%client.score = %c.score -= 5;
// This is the part you were missing. It informs the UI we have a nwe item.
messageClient(%client, 'MsgItemPickup', '', %i, GunItem.getID());
return true;
}
else
{
echo(" +- +- Occupied!");
}
}
echo(" +- 3. FAIL! All slots (" @ %maxTools @ ") occupied!");
return false;
}