HasElementDataSubscriber: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Server function}} __NOTOC__ {{New items|5.0157|1.5.7-9.20477|This function returns whether a player is subscribed to specific element data. This function is used to...")
 
No edit summary
Line 1: Line 1:
{{Server function}}
{{Server function}}
__NOTOC__  
__NOTOC__  
{{New items|5.0157|1.5.7-9.20477|This function returns whether a [[player]] is subscribed to specific [[element data]].
{{New items|3.0158|1.5.7-9.20477|This function returns whether a [[player]] is subscribed to specific [[element data]].
This function is used together with [[setElementData]] in ''"subscribe"'' mode.
This function is used together with [[setElementData]] in ''"subscribe"'' mode.
}}
}}
Line 26: Line 26:
</syntaxhighlight>
</syntaxhighlight>
</section>
</section>
==Requirements==
{{Requirements|1.5.7-9.20477|n/a|}}


==See Also==
==See Also==
{{Element_functions}}
{{Element_functions}}

Revision as of 14:17, 25 October 2020

This function returns whether a player is subscribed to specific element data. This function is used together with setElementData in "subscribe" mode.

Syntax

bool hasElementDataSubscriber ( element theElement, string key, player thePlayer )

OOP Syntax Help! I don't understand this!

Method: element:hasDataSubscriber(...)


Required Arguments

  • theElement: The element you wish to check whether the player is subscribed to.
  • key: The key you wish to check whether the player is subscribed to.
  • thePlayer: The player you wish to check.

Returns

Returns true if the player is subscribed, false otherwise.

Example

Click to collapse [-]
Server
TODO

Requirements

Minimum server version 1.5.7-9.20477
Minimum client version n/a

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.5.7-9.20477" />

See Also