diff --git a/client/job.lua b/client/job.lua index a13ec181..1021b88c 100644 --- a/client/job.lua +++ b/client/job.lua @@ -361,7 +361,7 @@ Citizen.CreateThread(function() if CurrentAction then ESX.ShowHelpNotification(CurrentActionMsg) - if IsControlJustReleased(0, Keys['E']) then + if IsControlJustReleased(0, 38) then if CurrentAction == 'AmbulanceActions' then OpenAmbulanceActionsMenu() @@ -380,7 +380,7 @@ Citizen.CreateThread(function() end elseif ESX.PlayerData.job ~= nil and ESX.PlayerData.job.name == 'ambulance' and not isDead then - if IsControlJustReleased(0, Keys['F6']) then + if IsControlJustReleased(0, 167) then OpenMobileAmbulanceActionsMenu() end else @@ -832,12 +832,12 @@ function WaitForVehicleToLoad(modelHash) while not HasModelLoaded(modelHash) do Citizen.Wait(0) - DisableControlAction(0, Keys['TOP'], true) - DisableControlAction(0, Keys['DOWN'], true) - DisableControlAction(0, Keys['LEFT'], true) - DisableControlAction(0, Keys['RIGHT'], true) + DisableControlAction(0, 27, true) + DisableControlAction(0, 173, true) + DisableControlAction(0, 174, true) + DisableControlAction(0, 175, true) DisableControlAction(0, 176, true) -- ENTER key - DisableControlAction(0, Keys['BACKSPACE'], true) + DisableControlAction(0, 177, true) drawLoadingText(_U('vehicleshop_awaiting_model'), 255, 255, 255, 255) end diff --git a/client/main.lua b/client/main.lua index deb877e3..f0375890 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,15 +1,3 @@ -Keys = { - ["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57, - ["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177, - ["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18, - ["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182, - ["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81, - ["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70, - ["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178, - ["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173, - ["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118 -} - local firstSpawn, PlayerLoaded = true, false isDead = false @@ -85,9 +73,9 @@ Citizen.CreateThread(function() if isDead then DisableAllControlActions(0) - EnableControlAction(0, Keys['G'], true) - EnableControlAction(0, Keys['T'], true) - EnableControlAction(0, Keys['E'], true) + EnableControlAction(0, 47, true) + EnableControlAction(0, 245, true) + EnableControlAction(0, 38, true) else Citizen.Wait(500) end @@ -163,7 +151,7 @@ function StartDistressSignal() AddTextComponentSubstringPlayerName(_U('distress_send')) EndTextCommandDisplayText(0.175, 0.805) - if IsControlPressed(0, Keys['G']) then + if IsControlPressed(0, 47) then SendDistressSignal() Citizen.CreateThread(function() @@ -270,21 +258,21 @@ function StartDeathTimer() if not Config.EarlyRespawnFine then text = text .. _U('respawn_bleedout_prompt') - if IsControlPressed(0, Keys['E']) and timeHeld > 60 then + if IsControlPressed(0, 38) and timeHeld > 60 then RemoveItemsAfterRPDeath() break end elseif Config.EarlyRespawnFine and canPayFine then text = text .. _U('respawn_bleedout_fine', ESX.Math.GroupDigits(Config.EarlyRespawnFineAmount)) - if IsControlPressed(0, Keys['E']) and timeHeld > 60 then + if IsControlPressed(0, 38) and timeHeld > 60 then TriggerServerEvent('esx_ambulancejob:payFine') RemoveItemsAfterRPDeath() break end end - if IsControlPressed(0, Keys['E']) then + if IsControlPressed(0, 38) then timeHeld = timeHeld + 1 else timeHeld = 0