M MY Multiplayer: Wiki
Side
Kind

isElementSyncer

Client

Tells whether this client syncs a ped or vehicle for the server.

bool isElementSyncer(element element)

Parameters

NameTypeDescription
elementelementThe ped or vehicle.

Returns

true if this client is the one syncing the element, false if not.

Example

for _, vehicle in ipairs(getElementsByType("vehicle", root, true)) do
    if isElementSyncer(vehicle) then
        setElementVelocity(vehicle, 0, 0, 0)
    end
end

See also