# CFX::GET_CURRENT_SCREEN_RESOLUTION

- **Hash:** `0x337F0116`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `GetCurrentScreenResolution`
- **Side:** client (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/GET_CURRENT_SCREEN_RESOLUTION

## Signature

```c
void GET_CURRENT_SCREEN_RESOLUTION(int* width, int* height);
```

## Parameters

- `width` (`int*`)
- `height` (`int*`)

## Returns

`void`

## Description

*Source: Cfx.re native reference*

Gets the current screen resolution.

```lua
local  width, height = GetCurrentScreenResolution()
print(string.format("Current screen resolution: %dx%d", width, height))

```

## Usage

### Lua

```lua
local width, height = GetCurrentScreenResolution()

-- always available, by hash
local width, height = Citizen.InvokeNative(0x337f0116, Citizen.PointerValueInt(), Citizen.PointerValueInt())
```

### JavaScript

```js
const [width, height] = GetCurrentScreenResolution();

// by hash
const [width, height] = Citizen.invokeNative('0x337f0116', Citizen.pointerValueInt(), Citizen.pointerValueInt());
```

### C#

```csharp
var width = new OutputArgument();
var height = new OutputArgument();
Function.Call((Hash)0x337f0116, width, height);
// width.GetResult<int>()
// height.GetResult<int>()
```

- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.

*Sources: Cfx.re native reference.*
