Entity::isPositionFrozen

From RAGE Multiplayer Wiki
Revision as of 16:02, 29 May 2024 by Shr0x (talk | contribs) (Created page with " {{ClientsideJsFunction}} {{JSContainer| Readonly property, returns whether entity position is frozen or not. ===Return value=== *''' {{RageType|boolean}} ''' ==Syntax== <syntaxhighlight lang="javascript"> entity.isPositionFrozen </syntaxhighlight> ==Example== <syntaxhighlight lang="javascript"> //Example creating a function that checks whether the player position is frozen before unfreezing them. function unfreezePlayer() { if (mp.players.local.isPositionFrozen)...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


Readonly property, returns whether entity position is frozen or not.

Return value

  • boolean

Syntax

entity.isPositionFrozen

Example

//Example creating a function that checks whether the player position is frozen before unfreezing them.
function unfreezePlayer() {
    if (mp.players.local.isPositionFrozen) {
        mp.players.local.freezePosition(false)
    }
}


See also