removeElementDataSubscriber | Multi Theft Auto: Wiki Skip to content

removeElementDataSubscriber

Client-side
Server-side
Shared

Pair: addElementDataSubscriber

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function unsubscribes a player from specific element data. This function is used together with setElementData in "subscribe" mode.

OOP Syntax Help! I don't understand this!

  • Method:element:removeDataSubscriber(...)

Syntax

bool removeElementDataSubscriber ( element theElement, string key, player thePlayer )
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

  • bool: value

Returns true if the player was unsubscribed, false otherwise.

Code Examples

shared
addEventHandler("onVehicleExit", getRootElement(), function(thePlayer)
removeElementDataSubscriber(source, "id", thePlayer)
end)

See Also

Element Functions