Request for IS_GAME_CONSOLE_OPEN

Having a feature to know if the player’s console is open could be nice!
Something like this syntax:

if IsGameConsoleOpen() then
   print("it is")
end

This native could be easily made by FiveM and could add more to FiveM’s scripting community!
Alternate names for the native:
IsGameConsoleActive()
IsConsoleOpen()
IsConsoleActive()
GetConsoleState()

You may also listen to the input used by the console, how would this be useful anyways?

Do you maybe have a more actionable use-case for this rather than just printing if the console is currently opened?

I honestly cannot think of a use-case for this that would improve the player experience in any way. (You don’t want to kick a player for opening the console right?)

1 Like

I think a feature like this will be misused to kick players, just like all the nui blockers do instead of actually making a resource secure.

No, I’m going to open DevTools on your NUI and there’s nothing you can do about it!!! MUHAHAHA /s

Seriously tho, there is not a single real use case to have this. Mainly because I can open most console tools before connecting to a server (and then I can steal your NUI)

This is the equivalent of people using the F8 meme kick from a couple of years ago. You’re not stopping anyone. You’re just showing your insecurities.

You don’t have to open the console to access the NUI devtools.
https://docs.fivem.net/docs/scripting-manual/nui-development/full-screen-nui/#developer-tools

You are not able to do that

Have you tried explaining what problem you are trying to solve by getting whether the console is open?

Checking if external “NUI” is open

What is external NUI and what problem are you trying to solve by detecting that?

cheats

That doesn’t make any sense, being able to tell when the F8 menu is open won’t magically help you find cheats.

There also isn’t an “External NUI”.

Well, you cannot, and there is no point on doing so anyways (assuming you’re referring to the external endpoint).

A little tampering with [the well-known shark program] can get you the contents of ui pages.

If this is an attempt to mitigate a vulnerability in the said NUI pages that you may have then this is not something that would fix it, just another slap on the wrist. A better approach would be to fix the issue itself.

This almost reminds me of the SUS keybind webhook.

Lets just hope we don’t start seeing the good old

(function(){debugger}())

To add to the other well explained replies:
If that’s about the “new” approach to combat cheaters with reading mouse movement on screen and then checking for certain “patterns” with well-known “3rd party tools”, this is already outdated again, as those tools now don’t block input to the game window when their menu has focus, so dead-end. (Though this was a great approach when they didn’t) :slight_smile: