RemoveElementDataSubscriber: Difference between revisions
Jump to navigation
Jump to search
Zangomangu (talk | contribs) (Created page with "{{Server function}} __NOTOC__ {{New items|5.0157|1.5.7-9.20477|This function unsubscribes a player from specific element data. This function is used together with s...") |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Server function}} | {{Server function}} | ||
__NOTOC__ | __NOTOC__ | ||
{{New items| | {{New items|3.0158|1.5.7-9.20477|This function unsubscribes a [[player]] from specific [[element data]]. | ||
This function is used together with [[setElementData]] in ''"subscribe"'' mode. | This function is used together with [[setElementData]] in ''"subscribe"'' mode. | ||
}} | }} | ||
Line 23: | Line 23: | ||
<section name="Server" class="server" show="true"> | <section name="Server" class="server" show="true"> | ||
<syntaxhighlight> | <syntaxhighlight> | ||
addEventHandler("onVehicleExit", getRootElement(), function(thePlayer) | |||
removeElementDataSubscriber(source, "id", thePlayer) | |||
end) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> | ||
==See Also== | ==See Also== | ||
{{Element_functions}} | {{Element_functions|server}} |
Latest revision as of 17:19, 7 November 2024
This function unsubscribes a player from specific element data. This function is used together with setElementData in "subscribe" mode.
Syntax
bool removeElementDataSubscriber ( element theElement, string key, player thePlayer )
OOP Syntax Help! I don't understand this!
- Method: element:removeDataSubscriber(...)
- Counterpart: addElementDataSubscriber
Required Arguments
- theElement: The element you wish to unsubscribe the player from.
- key: The key you wish to unsubscribe the player from.
- thePlayer: The player you wish to unsubscribe.
Returns
Returns true if the player was unsubscribed, false otherwise.
Example
Click to collapse [-]
ServeraddEventHandler("onVehicleExit", getRootElement(), function(thePlayer) removeElementDataSubscriber(source, "id", thePlayer) end)
See Also
- addElementDataSubscriber
- clearElementVisibleTo
- cloneElement
- getElementSyncer
- getElementZoneName
- hasElementDataSubscriber
- isElementVisibleTo
- removeElementData
- removeElementDataSubscriber
- setElementSyncer
- setElementVisibleTo
- Shared
- attachElements
- createElement
- destroyElement
- detachElements
- getAttachedElements
- getElementAlpha
- getElementAttachedOffsets
- getElementAttachedTo
- getElementByIndex
- getElementByID
- getElementChild
- getElementChildren
- getElementChildrenCount
- getElementCollisionsEnabled
- getElementColShape
- getElementData
- getAllElementData
- hasElementData
- getElementDimension
- getElementHealth
- getElementID
- getElementInterior
- getElementMatrix
- getElementModel
- getElementParent
- getElementPosition
- getElementRotation
- getElementsByType
- getElementsWithinColShape
- getElementsWithinRange
- getElementType
- getElementVelocity
- getLowLODElement
- getRootElement
- isElement
- isElementAttached
- isElementCallPropagationEnabled
- isElementDoubleSided
- isElementFrozen
- isElementInWater
- isElementLowLOD
- isElementWithinColShape
- isElementWithinMarker
- setElementAlpha
- setElementAngularVelocity
- getElementAngularVelocity
- setElementAttachedOffsets
- setElementCallPropagationEnabled
- setElementCollisionsEnabled
- setElementData
- setElementDimension
- setElementDoubleSided
- setElementFrozen
- setElementHealth
- setElementID
- setElementInterior
- setElementModel
- setElementParent
- setElementPosition
- setElementRotation
- setElementVelocity
- setLowLODElement
- getPedContactElement
- getResourceDynamicElementRoot
- getResourceRootElement