Jump to content

Desativar Comandos do GTA


Recommended Posts

Olá, meu objetivo com este script é desativar algumas "binds" presentes no jogo quando o player entrar no server, e depois, reativa-las quando o player sair.. .
Entre tanto, não consegui faze-lo.. Desde já obrigado pela a ajuda!

function DesativarComandosJogo (key, keyState, command)
    unbindKey (localPlayer, "v", down, change_camera)    
    unbindKey (localPlayer, "e", down, next_weapon)
    unbindKey (localPlayer, "num_enter", down, next_weapon)
    unbindKey (localPlayer, "q", down, previous_weapon)
    unbindKey (localPlayer, "num_dec", down, previous_weapon)
    unbindKey (localPlayer, "e", down, vehicle_look_left )
    unbindKey (localPlayer, "q", down, vehicle_look_right )
    unbindKey (localPlayer, "mouse3", down, vehicle_look_behind )
end
addEventHandler("onClientPlayerJoin", getRootElement(), DesativarComandosJogo)
 
function ReativarComandosJogo (key, keyState, command)
    bindKey (localPlayer, "v", down, change_camera)    
    bindKey (localPlayer, "e", down, next_weapon)
    bindKey (localPlayer, "num_enter", down, next_weapon)
    bindKey (localPlayer, "q", down, previous_weapon)
    bindKey (localPlayer, "num_dec", down, previous_weapon)
    bindKey (localPlayer, "e", down, vehicle_look_left )
    bindKey (localPlayer, "q", down, vehicle_look_right )
    bindKey (localPlayer, "mouse3", down, vehicle_look_behind )
end
addEventHandler("onClientPlayerExit", getRootElement(), ReativarComandosJogo)

 

Edited by Guilherme Mendes
Titulo com as palavras juntas. ("Desativar Comandosdo GTA")
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...