# getElementSyncer (Server)

> Tells which player syncs an element, that is, which client simulates it and sends its state to the server.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Server
- **Category**: Elements
- **URL**: https://wiki.mymp.gg/en/getElementSyncer

## Syntax

```lua
player|false getElementSyncer(element element)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | The element to read. |

## Returns

The syncing player, or `false` if nobody syncs the element or its syncing was turned off with `setElementSyncer`.

## Example

```lua
addCommandHandler("syncer", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    local syncer = vehicle and getElementSyncer(vehicle)
    outputDebugString(syncer and getPlayerName(syncer) or "nobody")
end)
```

## See also

- [setElementSyncer (Server)](https://wiki.mymp.gg/en/setElementSyncer.md): Chooses which player syncs a ped or vehicle.
- [isElementSyncer (Client)](https://wiki.mymp.gg/en/isElementSyncer.md): Tells whether this client syncs a ped or vehicle for the server.
- [onElementStartSync (Server)](https://wiki.mymp.gg/en/onElementStartSync.md): Fired when a player starts syncing a ped or vehicle.
