Author Topic: Switch selected Playerslot server-sided  (Read 536 times)

Would it be possible to change the player's selected tool slot from a server-sided script?
Like, a function that changes the player's slot to 2 which is the printer for example. (starting from 0)

I know "%obj.currTool" can get this variable, but it can't be set I don't think.

It can be set, but it's not going to do much.
If you don't mind the client not being able to see that the tool they're using switched on their HUD, you could really just call ServerCmdUseTool(%obj.client,#);

I'm not sure if there's a method that'll update their 'current tool selected' on their HUD though.

Oh but that will do just fine, I don't mind the hud not updating.
I would even prefer it if the player doesn't need to see his hud to use his weapons.

Need this so I can make the player do attacks by button combinations instead of the slow scrolling.

I'll give your solution a try!


*Edit*
Works perfectly!
The player doesn't even need to open his inventory either!
Thanks a bunch
« Last Edit: December 23, 2015, 04:36:29 PM by honytawk »