Bullyn Posted March 12, 2021 Posted March 12, 2021 (edited) Como eu posso fazer para bloquear o F1, F2, F3, etc... do player quando ele estiver em um marker???? Alguem me ajudaaa Obs: Seria no Client. Edited March 12, 2021 by Baguera
Other Languages Moderators Lord Henry Posted March 13, 2021 Other Languages Moderators Posted March 13, 2021 Utilize onClientKey e verifique se a tecla for uma dessas que você quer bloquear. Se for, cancele o evento com cancelEvent(). 1
Bullyn Posted March 13, 2021 Author Posted March 13, 2021 9 hours ago, Lord Henry said: Utilize onClientKey e verifique se a tecla for uma dessas que você quer bloquear. Se for, cancele o evento com cancelEvent(). Eu posso usar o, if button == "F1" or "F2" then cancelEvent() Desse jeito assim, vai ??
Bullyn Posted March 13, 2021 Author Posted March 13, 2021 13 hours ago, Lord Henry said: Utilize onClientKey e verifique se a tecla for uma dessas que você quer bloquear. Se for, cancele o evento com cancelEvent(). if button == "F1" and state "down" then cancelEvent() Ou é desse jeito ?????
Boechat Posted March 15, 2021 Posted March 15, 2021 On 13/03/2021 at 09:43, Baguera said: Eu posso usar o, if button == "F1" or "F2" then cancelEvent() Desse jeito assim, vai ?? Seria algo assim: function clientKey (button, press) if button == 'F1' or button == 'F2' then cancelEvent () end end addEventHandler("onClientKey", root, clientKey) Esse código faz com que cancele a ação de apertar no botão. Se você colocar o and state == "down" só vai cancelar o evento quando apertar o botão, mas quando soltar (state == "up") ainda vai ativar. 1
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