GraphicsClient2 outputs

getActualScreenResolution

GET_ACTUAL_SCREEN_RESOLUTION0x873C9F3104101DD3

The GTA V native GET_ACTUAL_SCREEN_RESOLUTION of the GRAPHICS namespace, as LS:MP client scripts call it: the global function getActualScreenResolution, in JavaScript and in Lua.

SignatureJavaScript
getActualScreenResolution(): [x: number, y: number]
SignatureLua
getActualScreenResolution(): integer, integer

Usage

JavaScript
const [x, y] = getActualScreenResolution();
Lua
local x, y = getActualScreenResolution()

Parameters

None. The game writes the outputs: they are handed back, not passed in.

Returns

2 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1xintnumberintegeroutput
2yintnumberintegeroutput

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Returns current screen resolution.

Reference

Namespace
Graphics GRAPHICS
In the game
void GET_ACTUAL_SCREEN_RESOLUTION(int* x, int* y)
Hash
0x873C9F3104101DD3
Formerly
_GET_SCREEN_ACTIVE_RESOLUTION _GET_ACTIVE_SCREEN_RESOLUTION

Open in the interactive natives reference