Author Topic: Tool Removal Help (Solved)  (Read 671 times)

I'm wondering how I can make the item that you throw away from your current tool slot instead of it being thrown out of your hands, disappear?
« Last Edit: October 19, 2012, 09:11:54 AM by tkepahama »

Package serverCmdDropTool(%client) so that instead of calling the parent it sets that inventory slot to empty.

Package serverCmdDropTool(%client) so that instead of calling the parent it sets that inventory slot to empty.
Oh, thanks.
*EDIT: Having issues trying to figure out how to remove the item in the tool slot...
« Last Edit: October 18, 2012, 09:01:33 PM by tkepahama »

Code: [Select]
function serverCmdDropTool(%client, %slot)
{
%client.player.tool[%slot] = 0;
%client.player.weaponCount--;
messageClient(%client, 'MsgItemPickup', '', %slot, 0);

if(%client.player.currTool == %slot)
{
%client.player.updateArm(0);
%client.player.unMountImage(0);
}
}
Try this.
« Last Edit: October 19, 2012, 07:59:26 AM by jes00 »

Code: [Select]
function serverCmdDropTool(%client, %slot)
{
%client.player.tool[%slot] = 0;
%client.player.weaponCount--;
messageClient(%client, 'MsgItemPickup', '', %slot, 0);

if(%client.player.currTool == %slot)
{
%client.player.updateArm(0);
%client.player.unMountImage(0);
}
}
Try this.
It works, thanks.