Skip to content

feat(mumble): resolve push-to-talk not working inside menu/map#1237

Closed
Ktos93 wants to merge 1 commit intocitizenfx:masterfrom
Ktos93:push_to_talk
Closed

feat(mumble): resolve push-to-talk not working inside menu/map#1237
Ktos93 wants to merge 1 commit intocitizenfx:masterfrom
Ktos93:push_to_talk

Conversation

@Ktos93
Copy link
Contributor

@Ktos93 Ktos93 commented Jan 20, 2022

usage IS_DISABLED_CONTROL_PRESSED fix problem when we cant talk with open menu/map but still we can disable this control by DISABLE_ALL_CONTROL_ACTIONS etc.

@Disquse Disquse self-assigned this Feb 12, 2022
@HalconBM
Copy link

HalconBM commented Apr 5, 2022

We need this change to be 100% functional

@dkden7e
Copy link

dkden7e commented Apr 5, 2022

Yes! this is really important!

@Disquse
Copy link
Contributor

Disquse commented Apr 5, 2022

Sadly this solution is very rough and have very annoying side effects. For example, if you press N (default push-to-talk control) and keep talking, while trying to open in-game chat (or do anything that would block the controls in general, open map, alt-tab and etc), the state of pressed N would be frozen until you press it again. So player would keep talking even when he doesn't want to. That's why FiveM have a bit more complex realization of such a feature. I would prefer to avoid such annoying "side effect", for me the benefits of this PR aren't comparable to the problems that this solution makes.

@HalconBM
Copy link

HalconBM commented Apr 5, 2022

Hopefully in the future it will have a better solution

@Ktos93
Copy link
Contributor Author

Ktos93 commented Apr 7, 2022

If I'm not mistaken the problems you write about already occur in the game. Running any NUI overlay causes the pressed state of N to be frozen until pressed again. Same if you pressing N and open console. So you need to add something like this to your scripts

 SetNuiFocus(true, true)
 SetNuiFocusKeepInput(true)
 DisableControlsKey()

function DisableControlsKey()
    Citizen.CreateThread(function()
        while isInventoryOpen do
            Wait(0)
            DisableAllControlActions(0)
            EnableControlAction(0, 0x4BC9DABB, true) -- INPUT_PUSH_TO_TALK
        end
    end)
end

https://streamable.com/qxo8fw
left bottom corner microphone icon

@AvarianKnight
Copy link
Contributor

Would it not make sense to just use IsDisabledControlPressed for GTA and RDR?

This would fix an issue for pma-voice where you can't use radio (or simulate PTT) while in the map because every control action gets disabled

@Ktos93
Copy link
Contributor Author

Ktos93 commented Apr 19, 2022

@Disquse What do you think about it?

@outsider31000
Copy link
Contributor

its been 3 years since this been here @Ktos93 , just bumping it, assuming is still needed?

@Ktos93 Ktos93 closed this Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants