From f2d519d0f191c0d0ea9ab38c063472d1bca77c9f Mon Sep 17 00:00:00 2001 From: KandaSoranyan <32266067+KandaSoranyan@users.noreply.github.com> Date: Sun, 21 Jan 2018 15:55:33 +0100 Subject: [PATCH] Keyboard only --- client/main.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/main.lua b/client/main.lua index e975e51c..966209f8 100644 --- a/client/main.lua +++ b/client/main.lua @@ -95,7 +95,7 @@ Citizen.CreateThread(function() Wait(0) - if IsControlPressed(0, Keys['ENTER']) and (GetGameTimer() - GUI.Time) > 150 then + if IsControlPressed(0, Keys['ENTER']) and GetLastInputMethod(2) and (GetGameTimer() - GUI.Time) > 150 then SendNUIMessage({ action = 'controlPressed', @@ -106,7 +106,7 @@ Citizen.CreateThread(function() end - if IsControlPressed(0, Keys['BACKSPACE']) and (GetGameTimer() - GUI.Time) > 150 then + if IsControlPressed(0, Keys['BACKSPACE']) and GetLastInputMethod(2) and (GetGameTimer() - GUI.Time) > 150 then SendNUIMessage({ action = 'controlPressed', @@ -117,7 +117,7 @@ Citizen.CreateThread(function() end - if IsControlPressed(0, Keys['TOP']) and (GetGameTimer() - GUI.Time) > 150 then + if IsControlPressed(0, Keys['TOP']) and GetLastInputMethod(2) and (GetGameTimer() - GUI.Time) > 150 then SendNUIMessage({ action = 'controlPressed', @@ -128,7 +128,7 @@ Citizen.CreateThread(function() end - if IsControlPressed(0, Keys['DOWN']) and (GetGameTimer() - GUI.Time) > 150 then + if IsControlPressed(0, Keys['DOWN']) and GetLastInputMethod(2) and (GetGameTimer() - GUI.Time) > 150 then SendNUIMessage({ action = 'controlPressed', @@ -139,7 +139,7 @@ Citizen.CreateThread(function() end - if IsControlPressed(0, Keys['LEFT']) and (GetGameTimer() - GUI.Time) > 150 then + if IsControlPressed(0, Keys['LEFT']) and GetLastInputMethod(2) and (GetGameTimer() - GUI.Time) > 150 then SendNUIMessage({ action = 'controlPressed', @@ -150,7 +150,7 @@ Citizen.CreateThread(function() end - if IsControlPressed(0, Keys['RIGHT']) and (GetGameTimer() - GUI.Time) > 150 then + if IsControlPressed(0, Keys['RIGHT']) and GetLastInputMethod(2) and (GetGameTimer() - GUI.Time) > 150 then SendNUIMessage({ action = 'controlPressed', @@ -164,4 +164,4 @@ Citizen.CreateThread(function() end end) -end) \ No newline at end of file +end)