Jump to content

Outra Ajuda com script :D


Recommended Posts

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.

  • Thanks 1
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...