mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 18:28:52 +00:00
Keyboard only
This commit is contained in:
+7
-7
@@ -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)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user