ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. setElementFrozen

Function

setElementFrozen

Server and clientElementsIdentical to MTA:SA

Freezes or unfreezes an element. A frozen element does not move.

Syntax

bool setElementFrozen(element theElement, bool freezeStatus)

Arguments

theElementelement
The element.
freezeStatusbool
true freezes.

Returns

true on success.

Example

addEventHandler("onPlayerSpawn", root, function()
    setElementFrozen(source, true)
    setTimer(setElementFrozen, 3000, 1, source, false)
end)

Notes

Your own character in client scripts. On the client you can also freeze your own character (localPlayer).

See also