From 78f53f7af7950563fdc04fa98dfa0319f7c047df Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Mon, 11 Jul 2022 17:38:59 -0500 Subject: [PATCH] Add reset keybinds cmd --- scripts/server/keybind.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/server/keybind.js b/scripts/server/keybind.js index cd1f6879..9787aa19 100644 --- a/scripts/server/keybind.js +++ b/scripts/server/keybind.js @@ -93,6 +93,15 @@ function removeKeyBindCommand(command, params, client) { // =========================================================================== +function resetKeyBindsCommand(command, params, client) { + getPlayerData(client).promptType = AGRP_PROMPT_RESETKEYBINDS; + showPlayerPrompt(client, getLocaleString(client, "ResetAllKeyBindsConfirm"), getLocaleString(client, "GUIWarningTitle"), getLocaleString(client, "Yes"), getLocaleString(client, "No")); + //removePlayerKeyBind(client, keyId); + //messagePlayerSuccess(client, `You removed the keybind for the {ALTCOLOUR}${toUpperCase(getKeyNameFromId(keyId))} {MAINCOLOUR}key`); +} + +// =========================================================================== + function addPlayerKeyBind(client, keys, command, params, tempKey = false) { let keyBindData = new KeyBindData(false, keys, `${command} ${params}`); if (tempKey == true) {