OnElementStopSync: Difference between revisions
Jump to navigation
Jump to search
(→Source) |
|||
Line 16: | Line 16: | ||
The [[event system#Event source|source]] of this event is the [[element]] which is no longer synced by a player. | The [[event system#Event source|source]] of this event is the [[element]] which is no longer synced by a player. | ||
<section name="Example" class="server" show="true" | <section name="Example" class="server" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
veh = createVehicle(520, 0,0,4) -- create our testing vehicle | veh = createVehicle(520, 0,0,4) -- create our testing vehicle | ||
Line 28: | Line 28: | ||
addEventHandler("onElementStopSync",getRootElement(),syncStop) -- onElementStopSync, the function syncStop gets called | addEventHandler("onElementStopSync",getRootElement(),syncStop) -- onElementStopSync, the function syncStop gets called | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
{{See also/Server event|Element events}} | {{See also/Server event|Element events}} |
Revision as of 16:08, 27 March 2012
Script Example Missing Event OnElementStopSync needs a script example, help out by writing one. | |
Before submitting check out Editing Guidelines Script Examples. |
This event is triggered when an element is no longer synced by a player.
Parameters
player oldSyncer
- oldSyncer: player element representing the last player who was syncing the element
Source
The source of this event is the element which is no longer synced by a player.
Click to collapse [-]
Exampleveh = createVehicle(520, 0,0,4) -- create our testing vehicle function syncStop() if source == veh then -- check if the element that stopped getting synced was our vehicle outputChatBox("You stopped syncing the vehicle!!",oldSyncer) -- tell the player he stopped syncing the vehicle ( veh ) end end addEventHandler("onElementStopSync",getRootElement(),syncStop) -- onElementStopSync, the function syncStop gets called
See Also
Element events
- onElementClicked
- onElementColShapeHit
- onElementColShapeLeave
- onElementDataChange
- onElementDestroy
- onElementDimensionChange
- onElementInteriorChange
- onElementModelChange
- onElementStartSync
- onElementStopSync
Event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled