Author Topic: Force Put All Tools Away [Solved]  (Read 1811 times)

Just use the code that Xalos posted. It does what you want and works for bots, too.

He wants the HUD to go away too.

He wants the HUD to go away too.
I don't think there is a client command for that?

I don't think there is a client command for that?
If there wasn't a client command for it then the gui would never go away.

Brb finding the command

Code: [Select]
PlayGui::hideToolBox(arg, stuff, var, i);

Not sure what the arguments are.
« Last Edit: April 13, 2013, 03:18:56 PM by Evar678 »

If there wasn't a client command for it then the gui would never go away.

Brb finding the command

Code: [Select]
PlayGui::hideToolBox(arg, stuff, var, i);

Not sure what the arguments are.
Code: [Select]
PlayGui::hideToolBox(%this, %extent, %loopLimit, %loopProgress);
%extent is how far the toolbox will move, negative is down, positive is up. (Default extent is +/-320)
%loopLimit is how fast the toolbox will move, can't be 0. (Default is 10 when unhiding, 20 when hiding)

We can't use a client-sided function...

I'm pretty sure there is a clientcmd for hiding the tool hud, but I don't know what it is

I'm pretty sure there is a clientcmd for hiding the tool hud, but I don't know what it is
Not afaik, I traced both the client and the server. I only saw anything that was relevant on the client's side, besides unhidetools.

We can't use a client-sided function...
This is true, and so far looks like it would require a client-sided addon to hide the HUD.

Code: [Select]
clientCmdPlayGui_CreateToolHud(%slotCount);%slotCount would be the amount of circles appear on the toolbox hud.
Not exactly sure, but I think this command will delete any currently existing toolHud and recreate it with the new %slotCount you give it.

So, technically, it 'hides' the hud.

Code: [Select]
clientCmdPlayGui_CreateToolHud(%slotCount);%slotCount would be the amount of circles appear on the toolbox hud.
Not exactly sure, but I think this command will delete any currently existing toolHud and recreate it with the new %slotCount you give it.

So, technically, it 'hides' the hud.
Good idea. It does close the hud.

You could do something like this.
Code: [Select]
if(isObject(%client.player.currTool)) //This is to check if they have a tool in their hand, if they do then we are assuming that their tool hud is open.
{
commandToClient(%client, 'PlayGui_CreateToolHud', %client.player.getDatablock().maxTools);
}
« Last Edit: April 13, 2013, 05:28:20 PM by jes00 »

Good idea. It does close the hud.

You could do something like this.
Code: [Select]
if(isObject(%client.player.currTool)) //This is to check if they have a tool in their hand, if they do then we are assuming that their tool hud is open.
{
commandToClient(%client, 'PlayGui_CreateToolHud', %client.player.getDatablock().maxTools);
}
Success!