M MY Multiplayer: Wiki
Side
Kind

removeElementDataSubscriber

Server

Unsubscribes a player from an element data key. The player stops receiving that data's changes.

bool removeElementDataSubscriber(element element, string key, player player)

Parameters

NameTypeDescription
elementelementThe element holding the data.
keystringThe data's key. Keys longer than 128 characters are cut, with a warning.
playerplayerThe subscribed player.

Returns

true if the subscription was removed. false if the element has no data under that key or the player was not subscribed.

Example

addCommandHandler("hidestats", function(player)
    removeElementDataSubscriber(player, "stats", player)
end)

See also