RemoveElementDataSubscriber

From Multi Theft Auto: Wiki
Revision as of 17:19, 7 November 2024 by Fernando187 (talk | contribs) (Remove obsolete Requirements section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 [-]
Server
addEventHandler("onVehicleExit", getRootElement(), function(thePlayer)
      removeElementDataSubscriber(source, "id", thePlayer) 
   end)

See Also