Skip to content

DisableControlAction

Disable a key, need to be called every tick

Argument Data Type Needed Default Description
Control string - The key to disable
Disable boolean true Disable or no

Need to be called every frame


Example
CreateLoop(function()
    DisableControlAction("K")
end)
Old method
Citizen.CreateThread(function()
    while true do
        DisableControlAction(0, 311, true)
        Citizen.Wait(1)
    end
end)
Using old native

although i dont recommend it, you can use the old native via old_DisableControlAction


Last update: October 31, 2022
Created: June 27, 2021