System.isFocused

From RAGE Multiplayer Wiki
Revision as of 11:55, 13 August 2024 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| ===Return value=== *''' {{RageType|boolean}} ''' ==Syntax== <syntaxhighlight lang="javascript"> mp.system.isFocused </syntaxhighlight> ==Example== <syntaxhighlight lang="javascript"> mp.events.add("playerReady", () => { if (mp.system.isFocused) { mp.console.logInfo(`Player is focused into the game`); } }) </syntaxhighlight> }} ==See Also== *Functions: **mp.system.notify *Properties: **syste...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


Return value

  • boolean

Syntax

mp.system.isFocused

Example

mp.events.add("playerReady", () => {
    if (mp.system.isFocused) {
        mp.console.logInfo(`Player is focused into the game`);
    }
})


See Also