setElementSyncer | Multi Theft Auto: Wiki Skip to content

setElementSyncer

Client-side
Server-side
Shared

Pair: getElementSyncer

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function can be used to change the syncer (player) of an element. The syncer is the player who is responsible for informing the server about the state of that element - it's position, orientation and other state information. The function can be also used to remove an element's syncer.

Syntax

setElementSyncer ( )

Code Examples

server
addCommandHandler ( "createMyVehicle", function ( player, command )
local x, y, z = getElementPosition ( player )
local myVehicle = createVehicle ( 411, x, y, z )
setElementSyncer ( myVehicle, player )
end
)

See Also

Element Functions