SetElementSyncer

From Multi Theft Auto: Wiki
Revision as of 15:23, 17 April 2010 by Awwu (talk | contribs) (Created page with '{{Server function}} __NOTOC__ This function can be used to change the syncer (player) of an element. The function can be also used to remove element's syncer making it go ou…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function can be used to change the syncer (player) of an element. The function can be also used to remove element's syncer making it go out of sync.

Syntax

bool setElementSyncer ( element theElement, [ player thePlayer = nil, bool enabled = true ] )

Required Arguments

  • theElement: The element whose syncer you wish to change.

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • thePlayer: The player who should be the new syncer of the element. Can be ignored as nil when removing the sync of an element.
  • enabled: Whether the sync should be enabled or disabled. Disabling element's syncer may lead to desynchronization.

Returns

Returns true if the syncer was changed succesfully, false otherwise.

Example

Click to collapse [-]
Server
-- TODO

See Also