diff --git a/client/main.lua b/client/main.lua index 27d25394..0249ab82 100644 --- a/client/main.lua +++ b/client/main.lua @@ -269,7 +269,7 @@ Citizen.CreateThread(function() else -- open phone -- todo: is player busy (handcuffed, etc) - if IsControlJustReleased(0, Keys['F1']) and GetLastInputMethod(2) then + if IsControlJustReleased(0, Keys['F1']) and IsInputDisabled(0) then if not ESX.UI.Menu.IsOpen('phone', GetCurrentResourceName(), 'main') then ESX.UI.Menu.CloseAll() ESX.UI.Menu.Open('phone', GetCurrentResourceName(), 'main') @@ -295,7 +295,7 @@ Citizen.CreateThread(function() if CurrentAction ~= nil then ESX.ShowHelpNotification(CurrentActionMsg) - if IsControlJustReleased(0, Keys['E']) and GetLastInputMethod(2) then + if IsControlJustReleased(0, Keys['E']) and IsInputDisabled(0) then if CurrentAction == 'dispatch' then TriggerServerEvent('esx_phone:stopDispatch', CurrentDispatchRequestId) SetNewWaypoint(CurrentActionData.position.x, CurrentActionData.position.y)