• Stop Weapons Clientside
    8 replies, posted
Hey all, I'm just trying to make it so when you press a button your mouse shows up but your keyboard is disabled (and your mouse works) without using a panel. How can I do this?
Wish I could help, I don't think lua offers any functions for disabling the keyboard except for :MakePopup() which is for panels, which you stated you didn't want to use. I may be wrong though.
And how do you think MakePopup freezes the player in the first place? That's for the mouse : [url=http://wiki.garrysmod.com/?search=gui.EnableScreenClicker][I]gui.EnableScreenClicker[/I] [img]http://wiki.garrysmod.com/favicon.ico[/img][/url] And that's for disabling movement (there might be other, better ways) : [url=http://wiki.garrysmod.com/?search=Player.Freeze][I]Player.Freeze[/I] [img]http://wiki.garrysmod.com/favicon.ico[/img][/url]
Oh I misread, I thought he wanted people to be able to use the keyboard, my bad.
A better way to disable movement is: [url=http://wiki.garrysmod.com/?search=Player.Lock][I]Player.Lock[/I] [img]http://wiki.garrysmod.com/favicon.ico[/img][/url]
[QUOTE=Overv;18598023]A better way to disable movement is: [url=http://wiki.garrysmod.com/?search=Player.Lock][I]Player.Lock[/I] [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/QUOTE] that's serverside.
Are y'all sure Player.Freeze is clientside?
When using Freeze clientside it only disables mouse looking and not moving, but if the player clicks it unfreezes. [editline]05:31PM[/editline] That's what happens for me, may be different for others.
Well I'm not really sure there is a way for a player to tell itself it can't move anymore. But that depends on what you're trying to do of course.
Sorry, you need to Log In to post a reply to this thread.