Get Screen Type Native

Hello,

I tried searching for a native that would retrieve the screen type that’s selected in Settings → Advanced Graphics (Full Screen, Windowed, etc) but I couldn’t find it.
This would be a useful addition to the native that allows us to retrieve the active screen resolution.

But there’s GetActiveScreenRes GetActiveScreenResolution - FiveM Natives @ Cfx.re Docs

Please read the post again. I am asking for a native to retrieve the screen type, not the resolution which I acknowledged already exists.

Why would you need to know the screen type though? Like what use do you need it for?

Debug data, it’s more straightforward to get this from the players’ client-side instead of asking them to provide the information.

That doesn’t really answer the question. What are you trying to debug and why?

We are looking into multiple behavior signals to determine which players should be manually checked if they are using cheating software that’s currently undetected by FiveM. For example, some cheats require players to use “Windowed” mode, which is not used by 99% of our players.

Oh right. What use?

For example, some cheats require players to use “Windowed” mode, which is not used by 99% of our players.

:man_facepalming: This makes no sense. Next thing you will ask is get player videocard manufacturer native because most cheaters use Nvidia GPUs? Or maybe the same for Intel CPUs? You know – cheaters love Intel CPUs for sure!

You’re in luck. Both this and whether the game is in windowed mode are in the same CSettingsManager struct. In fact, the fields are like next to one another.

– Function to check display mode
function CheckDisplayMode()
local displayMode = GetResourceKvpString(“fullscreen”)

if displayMode == "true" then
    print("The player is playing in fullscreen mode.")
elseif displayMode == "false" then
    print("The player is playing in windowed mode.")
else
    print("Display mode could not be determined.")
end

end

– Call the function
CheckDisplayMode()