Guilherme Mendes Posted May 14, 2022 Share Posted May 14, 2022 (edited) 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 May 14, 2022 by Guilherme Mendes Titulo com as palavras juntas. ("Desativar Comandosdo GTA") Link to comment
DaeRoNz Posted May 17, 2022 Share Posted May 17, 2022 Ola Guilherme , usa a função toggleControl . ex: toggleControl ( "change_camera", false ) Link to comment
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