From 133825dbea8145a30aae9a21a93a85ea83cb5d55 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sun, 19 Jan 2020 17:57:28 +0100 Subject: [PATCH] Use new key register --- client/main.lua | 15 ++++++--------- locales/br.lua | 5 +++++ locales/cs.lua | 6 ++++++ locales/de.lua | 5 +++++ locales/en.lua | 7 ++++++- locales/fi.lua | 5 +++++ locales/fr.lua | 5 +++++ locales/pl.lua | 7 ++++++- locales/sv.lua | 5 +++++ 9 files changed, 49 insertions(+), 11 deletions(-) diff --git a/client/main.lua b/client/main.lua index 48285d2b..18d0ad43 100644 --- a/client/main.lua +++ b/client/main.lua @@ -436,16 +436,13 @@ Citizen.CreateThread(function() end end) --- Menu interactions -Citizen.CreateThread(function() - while true do - Citizen.Wait(0) - - if IsControlJustReleased(0, 289) and IsInputDisabled(0) and not isDead and not ESX.UI.Menu.IsOpen('default', 'es_extended', 'inventory') then - ESX.ShowInventory() - end +RegisterCommand('showinventory', function() + if not isDead and not ESX.UI.Menu.IsOpen('default', 'es_extended', 'inventory') then + ESX.ShowInventory() end -end) +end, false) + +RegisterKeyMapping('showinventory', _U('keymap_showinventory'), 'keyboard', 'F2') -- Disable wanted level if Config.DisableWantedLevel then diff --git a/locales/br.lua b/locales/br.lua index 98d58441..e67cdc54 100644 --- a/locales/br.lua +++ b/locales/br.lua @@ -40,6 +40,10 @@ Locales['br'] = { ['threw_weapon_already'] = 'you already carry the same weapon', ['threw_cannot_pickup'] = 'you cannot pickup that because your inventory is full!', ['threw_pickup_prompt'] = 'press ~y~E~s~ to pickup', + + -- Key mapping + ['keymap_showinventory'] = 'show Inventory', + -- Salary related ['received_salary'] = 'voce recebeu seu salario: ~g~$%s~s~ ', ['received_help'] = 'voce recebeu seu cheque de bem-estar: ~g~$%s~s~ ', @@ -73,6 +77,7 @@ Locales['br'] = { ['command_clearinventory'] = 'clear all items from inventory', ['command_clearloadout'] = 'remove all weapons from loadout', ['command_playerid_param'] = 'specify playerId or leave blank for yourself', + -- Locale settings ['locale_digit_grouping_symbol'] = ' ', ['locale_currency'] = '$%s', diff --git a/locales/cs.lua b/locales/cs.lua index 38521079..7c537b59 100644 --- a/locales/cs.lua +++ b/locales/cs.lua @@ -40,6 +40,11 @@ Locales['cs'] = { ['threw_weapon_already'] = 'you already carry the same weapon', ['threw_cannot_pickup'] = 'you cannot pickup that because your inventory is full!', ['threw_pickup_prompt'] = 'press ~y~E~s~ to pickup', + + -- Key mapping + ['keymap_showinventory'] = 'show Inventory', + + -- Salary related ['received_salary'] = 'obdrželi jste výplatu: ~g~$%s~s~', ['received_help'] = 'obdrželi jste sociální dávku: ~g~$%s~s~', @@ -73,6 +78,7 @@ Locales['cs'] = { ['command_clearinventory'] = 'clear all items from inventory', ['command_clearloadout'] = 'remove all weapons from loadout', ['command_playerid_param'] = 'specify playerId or leave blank for yourself', + -- Locale settings ['locale_digit_grouping_symbol'] = ' ', ['locale_currency'] = '$%s', diff --git a/locales/de.lua b/locales/de.lua index 5df299f5..4a9a5f7f 100644 --- a/locales/de.lua +++ b/locales/de.lua @@ -40,6 +40,10 @@ Locales['de'] = { ['threw_weapon_already'] = 'you already carry the same weapon', ['threw_cannot_pickup'] = 'you cannot pickup that because your inventory is full!', ['threw_pickup_prompt'] = 'press ~y~E~s~ to pickup', + + -- Key mapping + ['keymap_showinventory'] = 'show Inventory', + -- Salary related ['received_salary'] = 'du hast dein Gehalt erhalten: ~g~$%s~s~', ['received_help'] = 'du hast deine Sozialhilfe erhalten: ~g~$%s~s~', @@ -73,6 +77,7 @@ Locales['de'] = { ['command_clearinventory'] = 'clear all items from inventory', ['command_clearloadout'] = 'remove all weapons from loadout', ['command_playerid_param'] = 'specify playerId or leave blank for yourself', + -- Locale settings ['locale_digit_grouping_symbol'] = ' ', ['locale_currency'] = '$%s', diff --git a/locales/en.lua b/locales/en.lua index d3c2b4b4..a41b982d 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -40,12 +40,16 @@ Locales['en'] = { ['threw_weapon_already'] = 'you already carry the same weapon', ['threw_cannot_pickup'] = 'you cannot pickup that because your inventory is full!', ['threw_pickup_prompt'] = 'press ~y~E~s~ to pickup', + + -- Key mapping + ['keymap_showinventory'] = 'show Inventory', + -- Salary related ['received_salary'] = 'you received your salary: ~g~$%s~s~', ['received_help'] = 'you recieved your welfare check: ~g~$%s~s~', ['company_nomoney'] = 'the company you\'re employeed at is too poor to pay out your salary', ['received_paycheck'] = 'received paycheck', - ['bank'] = 'bank', + ['bank'] = 'maze Bank', ['black_money'] = 'dirty Money', ['act_imp'] = 'action impossible', @@ -73,6 +77,7 @@ Locales['en'] = { ['command_clearinventory'] = 'clear all items from inventory', ['command_clearloadout'] = 'remove all weapons from loadout', ['command_playerid_param'] = 'specify playerId or leave blank for yourself', + -- Locale settings ['locale_digit_grouping_symbol'] = ',', ['locale_currency'] = '$%s', diff --git a/locales/fi.lua b/locales/fi.lua index b20da9c0..a3a32e6c 100644 --- a/locales/fi.lua +++ b/locales/fi.lua @@ -40,6 +40,10 @@ Locales['fi'] = { ['threw_weapon_already'] = 'you already carry the same weapon', ['threw_cannot_pickup'] = 'you cannot pickup that because your inventory is full!', ['threw_pickup_prompt'] = 'press ~y~E~s~ to pickup', + + -- Key mapping + ['keymap_showinventory'] = 'show Inventory', + -- Salary related ['received_salary'] = 'sinä vastaanotit palkkaa: ~g~$%s~s~', ['received_help'] = 'sinä vastaanotit valtion tukea: ~g~$%s~s~', @@ -73,6 +77,7 @@ Locales['fi'] = { ['command_clearinventory'] = 'clear all items from inventory', ['command_clearloadout'] = 'remove all weapons from loadout', ['command_playerid_param'] = 'specify playerId or leave blank for yourself', + -- Locale settings ['locale_digit_grouping_symbol'] = ' ', ['locale_currency'] = '$%s', diff --git a/locales/fr.lua b/locales/fr.lua index 2e134fe4..6a984c9b 100644 --- a/locales/fr.lua +++ b/locales/fr.lua @@ -40,6 +40,10 @@ Locales['fr'] = { ['threw_weapon_already'] = 'you already carry the same weapon', ['threw_cannot_pickup'] = 'you cannot pickup that because your inventory is full!', ['threw_pickup_prompt'] = 'press ~y~E~s~ to pickup', + + -- Key mapping + ['keymap_showinventory'] = 'show Inventory', + -- Salary related ['received_salary'] = 'vous avez reçu votre salaire: ~g~$%s~s~', ['received_help'] = 'vous avez reçu une aide de l\'état: ~g~$%s~s~', @@ -73,6 +77,7 @@ Locales['fr'] = { ['command_clearinventory'] = 'effacer tout les items de l\'inventaire', ['command_clearloadout'] = 'retirer toutes les armes de l\'équipement', ['command_playerid_param'] = 'spécifiez un playerid ou laissez vide pour vous-même', + -- Locale settings ['locale_digit_grouping_symbol'] = ' ', ['locale_currency'] = '$%s', diff --git a/locales/pl.lua b/locales/pl.lua index 40e7b373..37408c76 100644 --- a/locales/pl.lua +++ b/locales/pl.lua @@ -40,6 +40,11 @@ Locales['pl'] = { ['threw_weapon_already'] = 'you already carry the same weapon', ['threw_cannot_pickup'] = 'you cannot pickup that because your inventory is full!', ['threw_pickup_prompt'] = 'press ~y~E~s~ to pickup', + + -- Key mapping + ['keymap_showinventory'] = 'show Inventory', + + -- Salary related ['received_salary'] = 'otrzymałeś wynagrodzenie: ~g~%s$~s~', ['received_help'] = 'otrzymałem zapomogę: ~g~$%s~s~', @@ -72,7 +77,7 @@ Locales['pl'] = { ['command_clearinventory'] = 'usuń wszystkie przedmioty z ekwipunku', ['command_clearloadout'] = 'usuń wszystkie bronie z wyposażenia', ['command_playerid_param'] = 'id gracza lub zostaw puste dla siebie', - + -- Locale settings ['locale_digit_grouping_symbol'] = ' ', ['locale_currency'] = '$%s', diff --git a/locales/sv.lua b/locales/sv.lua index 98605566..47bc4bde 100644 --- a/locales/sv.lua +++ b/locales/sv.lua @@ -40,6 +40,10 @@ Locales['sv'] = { ['threw_weapon_already'] = 'du har redan ett sådant vapen på dig', ['threw_cannot_pickup'] = 'du kan inte plocka upp det på grund av att det kommer ej få plats i ditt förråd!', ['threw_pickup_prompt'] = 'tryck ~y~E~s~ för att plocka upp', + + -- Key mapping + ['keymap_showinventory'] = 'öppna inventory', + -- Salary related ['received_salary'] = 'du har mottagit din lön på ~g~%s SEK~s~', ['received_help'] = 'du har mottagit bidrag på ~g~%s SEK~s~', @@ -73,6 +77,7 @@ Locales['sv'] = { ['command_clearinventory'] = 'clear all items from inventory', ['command_clearloadout'] = 'remove all weapons from loadout', ['command_playerid_param'] = 'specify playerId or leave blank for yourself', + -- Locale settings ['locale_digit_grouping_symbol'] = ' ', ['locale_currency'] = '%s SEK',