Blockland Forums > Modification Help
Getting last used tool
<< < (2/2)
Daenth:

--- Quote from: Chrono on July 13, 2011, 12:58:47 PM ---It needs to be in a package.

--- End quote ---
Oh yeah...


--- Code: ---package LastUsedTool
{
function serverCmdUnUseTool(%client)
{
%client.player.lastUsedTool = %client.player.currTool;
Parent::serverCmdUnUseTool(%client);
}
};
activatePackage(LastUsedTool);
--- End code ---
Just stick this in any script that needs to know the client's player's last tool.  The variable is assigned to the client's player as '.lastUsedTool'.
Jorgur:
Thanks :)
Jorgur:
EDIT: I said something here but it turns out I was wrong.
Navigation
Message Index
Previous page

Go to full version