• Hide tools that users arent allowed to use
    6 replies, posted
As in title, I just want to hide tools for the users who isn't allowed to use it. For example, I want to hide "Hoverballs" tool for users and show it for admins. How can I do that?
I don't know a way to hide the tab, but to stop the user using the tool you can use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/SANDBOX/CanTool]SANDBOX:CanTool[/url] You'll have to use that anyway since hiding it won't stop the user from selecting the tool using other means, e.g. the console
I'm actually trying to do that right now for my gamemode. It's possible but it's REALLY hacky - you would have to dig deep into sandbox's source code.
[QUOTE=NeatNit;51538184]I'm actually trying to do that right now for my gamemode. It's possible but it's REALLY hacky - you would have to dig deep into sandbox's source code.[/QUOTE] I wrote some code last night which did achieve what OP wanted, but felt it was too hacky to post. If you want, I can still post it?
I requested this to be added about a year ago: [url]https://github.com/Facepunch/garrysmod-requests/issues/612[/url]. Not implemented (yet). In the meantime, I wrote my own very very very hacky solution (not worth sharing).
I've made a pull request to include this feature [URL="https://github.com/garrynewman/garrysmod/pull/1298"]here[/URL].
Yes sure, please share
Sorry, you need to Log In to post a reply to this thread.