getElementSyncer
Server
Tells which player syncs an element, that is, which client simulates it and sends its state to the server.
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
addCommandHandler("syncer", function(player)
local vehicle = getPedOccupiedVehicle(player)
local syncer = vehicle and getElementSyncer(vehicle)
outputDebugString(syncer and getPlayerName(syncer) or "nobody")
end)