ESX Menus wont select items

Added ESX to our server recently. Menus will open, you can navigate the menus but hitting enter or other buttons won’t select items and you cannot exit the menus without hitting F1 to pull out the phone, then ESC. There are no errors in the logs. This is happening for all users currently so it doesn’t seem like a custom keybind issue.

I believe you have in some script that disables pressing these keys, you have two options:

  1. Find the culprit script
  2. Edit esx_menu_default /client/main.lua, replacing this code
CreateThread(function()
	while true do
		Wait(15)

		if IsControlPressed(0, 18) and IsUsingKeyboard(0) and (GetGameTimer() - GUI.Time) > 150 then
			SendNUIMessage({action = 'controlPressed', control = 'ENTER'})
			GUI.Time = GetGameTimer()
		end

		if IsControlPressed(0, 177) and IsUsingKeyboard(0) and (GetGameTimer() - GUI.Time) > 150 then
			SendNUIMessage({action  = 'controlPressed', control = 'BACKSPACE'})
			GUI.Time = GetGameTimer()
		end

		if IsControlPressed(0, 27) and IsUsingKeyboard(0) and (GetGameTimer() - GUI.Time) > 200 then
			SendNUIMessage({action  = 'controlPressed', control = 'TOP'})
			GUI.Time = GetGameTimer()
		end

		if IsControlPressed(0, 173) and IsUsingKeyboard(0) and (GetGameTimer() - GUI.Time) > 200 then
			SendNUIMessage({action  = 'controlPressed', control = 'DOWN'})
			GUI.Time = GetGameTimer()
		end

		if IsControlPressed(0, 174) and IsUsingKeyboard(0) and (GetGameTimer() - GUI.Time) > 150 then
			SendNUIMessage({action  = 'controlPressed', control = 'LEFT'})
			GUI.Time = GetGameTimer()
		end

		if IsControlPressed(0, 175) and IsUsingKeyboard(0) and (GetGameTimer() - GUI.Time) > 150 then
			SendNUIMessage({action  = 'controlPressed', control = 'RIGHT'})
			GUI.Time = GetGameTimer()
		end
	end
end)

with this

CreateThread(function()
	while true do
		Wait(15)

		if (IsControlPressed(0, 18) or IsDisabledControlPressed(0, 18)) and IsUsingKeyboard(0) and (GetGameTimer() - GUI.Time) > 150 then
			SendNUIMessage({action = 'controlPressed', control = 'ENTER'})
			GUI.Time = GetGameTimer()
		end

		if (IsControlPressed(0, 177) or IsDisabledControlPressed(0, 177)) and IsUsingKeyboard(0) and (GetGameTimer() - GUI.Time) > 150 then
			SendNUIMessage({action  = 'controlPressed', control = 'BACKSPACE'})
			GUI.Time = GetGameTimer()
		end

		if IsControlPressed(0, 27) and IsUsingKeyboard(0) and (GetGameTimer() - GUI.Time) > 200 then
			SendNUIMessage({action  = 'controlPressed', control = 'TOP'})
			GUI.Time = GetGameTimer()
		end

		if IsControlPressed(0, 173) and IsUsingKeyboard(0) and (GetGameTimer() - GUI.Time) > 200 then
			SendNUIMessage({action  = 'controlPressed', control = 'DOWN'})
			GUI.Time = GetGameTimer()
		end

		if IsControlPressed(0, 174) and IsUsingKeyboard(0) and (GetGameTimer() - GUI.Time) > 150 then
			SendNUIMessage({action  = 'controlPressed', control = 'LEFT'})
			GUI.Time = GetGameTimer()
		end

		if IsControlPressed(0, 175) and IsUsingKeyboard(0) and (GetGameTimer() - GUI.Time) > 150 then
			SendNUIMessage({action  = 'controlPressed', control = 'RIGHT'})
			GUI.Time = GetGameTimer()
		end
	end
end)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.