GET_SCREEN_RESOLUTION
Hardcoded to always set x to 1280 and y to 720.
Hash
0x66773C92835D0909Runtime name
GetScreenResolutionNamespaceGRAPHICS
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x888D57E407E63624Signature
void GET_SCREEN_RESOLUTION(int* x, int* y);Parameters
| Name | Type | Description |
|---|---|---|
x | int* | — |
y | int* | — |
Returns void
Description
Hardcoded to always set x to 1280 and y to 720.
Usage
local x, y = GetScreenResolution()
-- always works, by hash
local x, y = Citizen.InvokeNative(0x66773C92835D0909, Citizen.PointerValueInt(), Citizen.PointerValueInt())JavaScript and C#
const [x, y] = GetScreenResolution();
// by hash
const [x, y] = Citizen.invokeNative('0x66773C92835D0909', Citizen.pointerValueInt(), Citizen.pointerValueInt());var x = new OutputArgument();
var y = new OutputArgument();
Function.Call((Hash)0x66773C92835D0909, x, y);
// x.GetResult<int>()
// y.GetResult<int>()- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.