hasElementDataSubscriber
Server
Tells whether a player is subscribed to an element data key.
bool hasElementDataSubscriber(element element, string key, player player)
Parameters
| Name | Type | Description |
|---|---|---|
| element | element | The element holding the data. |
| key | string | The data's key. Keys longer than 128 characters are cut, with a warning. |
| player | player | The player to check. |
Returns
true if the player is subscribed to that key, false otherwise.
Example
local function watchMoney(player, target)
if not hasElementDataSubscriber(target, "money", player) then
addElementDataSubscriber(target, "money", player)
end
end