Prevent keybind presses when GUI active

This commit is contained in:
Vortrex
2022-02-04 10:35:25 -06:00
parent 52a995493b
commit a16ba0e8f1

View File

@@ -26,6 +26,10 @@ function bindAccountKey(key, keyState) {
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Binded key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
keyBinds.push(toInteger(key));
bindKey(toInteger(key), keyState, function(event) {
if(isAnyGUIActive()) {
return false;
}
if(hasKeyBindDelayElapsed()) {
if(canLocalPlayerUseKeyBinds()) {
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Using keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key})`);