Graphics::getScreenActiveResolution: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
 
Line 14: Line 14:
{{Example}}
{{Example}}
<pre>
<pre>
let x = mp.game.graphics.getScreenActiveResolution(); // Saves the width of the active resolution in x
let x = mp.game.graphics.getScreenActiveResolution().x; // Saves the width of the active resolution in x
</pre>
</pre>
}}
}}

Latest revision as of 20:48, 13 November 2022

Client-Side
Event

 JavaScript



Returns current screen resolution.

JavaScript Syntax

Syntax

mp.game.graphics.getScreenActiveResolution();

Return value

  • x: number
  • y: number

Example

let x = mp.game.graphics.getScreenActiveResolution().x; // Saves the width of the active resolution in x



See also