getActualScreenResolution
GET_ACTUAL_SCREEN_RESOLUTION0x873C9F3104101DD3The 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.
getActualScreenResolution(): [x: number, y: number]getActualScreenResolution(): integer, integerUsage
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.
| # | 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.
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