Alright, I'm having an issue with that bit of code.
I'm testing it out and no matter what it doesn't add the weapon to my inventory. I set it to a command like...
function serverCmdgunswitchtest(%client,%player)
{
%item = gunItem.getID();
%slot = 1;
%oldTool = %player.tool[%slot];
%player.tool[%slot] = %item;
messageClient(%player.client,'MsgItemPickup','',%slot,%item);
if(%oldTool <= 0)
player.weaponCount++;
}
I type in /gunswitchtest and my inventory doesn't change.