Hi, i’m working on an NUI menu, i wan’t it to re enable the controls when it closed. Here is the thread that disable actions:
Citizen.CreateThread(function()
TriggerServerEvent('isFirstConnect')
while display do
Citizen.Wait(0)
DisableControlAction(0, 1, display) -- LookLeftRight
DisableControlAction(0, 2, display) -- LookUpDown
DisableControlAction(0, 142, display) -- MeleeAttackAlternate
DisableControlAction(0, 18, display) -- Enter
DisableControlAction(0, 322, display) -- ESC
DisableControlAction(0, 106, display) -- VehicleMouseControlOverride
end
end)
So the keys are disabled when the NUI is open but doesn’t enable on NUI close.
Any idea?