getElementSyncer | Multi Theft Auto: Wiki Skip to content

getElementSyncer

Client-side
Server-side
Shared

Pair: setElementSyncer

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 gets the syncer of an element. The syncer is the player who is in control of the element.

Syntax

getElementSyncer ( )

Code Examples

server

This code will kill the syncer of the first ped created with createPed.

local elementSyncer = getElementSyncer(getElementsByType("ped")[1])
if elementSyncer and getElementType(elementSyncer) == "player" then --Check if its a player and if there is a syncer
killPed(elementSyncer, elementSyncer)
end

See Also

Element Functions