How to disable " like press K or F2 " when people in car?

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0) -- Wait 0 seconds to prevent crashing.
        if IsPedInAnyVehicle(PlayerPedId(), true) then -- If the player is (trying to use /) using a vehicle
            DisableControlAction(0, --[[Control ID Goes Here]], true)
        end
    end
end)


https://wiki.fivem.net/wiki/Controls

2 Likes