TheRock254 Posted July 28, 2015 Author Posted July 28, 2015 It's only check, if key is still pressing
GTX Posted July 28, 2015 Posted July 28, 2015 It's not possible to check if Caps Lock is enabled. If you really want to do it, you have to add an event onClientKey, check if caps was pressed and then set a variable or something, but then you could mix between enabled on client and disabled in MTA. However it is not possible to check if it is enabled or disabled.
TheRock254 Posted July 28, 2015 Author Posted July 28, 2015 If player's capslock is open or close before not connect on the server? :( :(
Buffalo Posted July 28, 2015 Posted July 28, 2015 Actually you can do this trick, depending on the purpose you need, it might work (if you only need to detect alphabedic characters): addEventHandler('onClientCharacter',getRootElement(),function(key) if string.byte(key) > 40 and string.byte(key) < 91 then -- pressed an alphabedical symbol with CAPS LOCK ON! --do something when character with caps lock on entered elseif if string.byte(key) > 96 and string.byte(key) < 123 then -- pressed a symbol with CAPS LOCK OFF! --do something when character with caps lock off entered end end)
TheRock254 Posted July 28, 2015 Author Posted July 28, 2015 It is work perfect. Thank you Buffalo. Note: Your server is so good!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now