From 45a3f8e3d24da1580fcf2b65054d5d04f728d920 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sat, 14 Apr 2018 11:04:48 +0200 Subject: [PATCH] Only listen to keyboard input --- client/main.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/main.lua b/client/main.lua index 5348f408..7a8cb3b4 100644 --- a/client/main.lua +++ b/client/main.lua @@ -240,7 +240,7 @@ end) Citizen.CreateThread(function() while true do - Wait(0) + Citizen.Wait(10) if GUI.PhoneIsShowed then -- codes here: https://pastebin.com/guYd0ht4 DisableControlAction(0, 1, true) -- LookLeftRight @@ -282,7 +282,7 @@ end) Citizen.CreateThread(function() while true do - Citizen.Wait(0) + Citizen.Wait(10) if CurrentAction ~= nil then @@ -290,7 +290,7 @@ Citizen.CreateThread(function() AddTextComponentString(CurrentActionMsg) DisplayHelpTextFromStringLabel(0, 0, 1, -1) - if IsControlPressed(0, Keys['E']) and (GetGameTimer() - GUI.Time) > 300 then + if IsControlPressed(0, Keys['E']) and GetLastInputMethod(2) and (GetGameTimer() - GUI.Time) > 300 then if CurrentAction == 'dispatch' then TriggerServerEvent('esx_phone:stopDispatch', CurrentDispatchRequestId)