getScreenResolution
GET_SCREEN_RESOLUTION0x888D57E407E63624The GTA V native GET_SCREEN_RESOLUTION of the GRAPHICS namespace, as LS:MP client scripts call it: the global function getScreenResolution, in JavaScript and in Lua.
getScreenResolution(): [x: number, y: number]getScreenResolution(): integer, integerUsage
JavaScript
const [x, y] = getScreenResolution();Lua
local x, y = getScreenResolution()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.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | x | int | number | integer | output |
| 2 | y | int | number | integer | output |
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
int screenresx,screenresy;
getScreenResolution(&screenresx,&screenresy);Reference
- Namespace
- Graphics GRAPHICS
- In the game
void GET_SCREEN_RESOLUTION(int* x, int* y)- Hash
0x888D57E407E63624