OnPlayerChangesProtectedData: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server event}} {{Added feature/item|1.6.1|1.6.0|22790|This event is triggered when a player tries to change protected element data. The server protects element data with using elementdata_whitelisted from '''mtaserver.conf''' and the '''clientChangesPolicy''' parameter in [setElementData.}} ==Parameters== *'''element''': The affected element. *'''key''': The name of the element data entry that has changed....")
 
(Fix URL)
 
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server event}}
{{Server event}}
{{Added feature/item|1.6.1|1.6.0|22790|This event is triggered when a player tries to change protected element data. The server protects element data with using [[Server_mtaserver.conf#elementdata_whitelisted|elementdata_whitelisted]] from '''mtaserver.conf''' and the '''clientChangesPolicy''' parameter in [[[setElementData]].}}
{{Added feature/item|1.6.1|1.6.0|22790|This event is triggered when a player tries to change protected element data. The server protects element data with using [[Server_mtaserver.conf#elementdata_whitelisted|elementdata_whitelisted]] from '''mtaserver.conf''' and the '''clientChangesPolicy''' parameter in [[setElementData]].}}
==Parameters==
==Parameters==
*'''element''': The affected element.
*'''element''': The affected element.

Latest revision as of 20:18, 6 December 2024

BETA: NEW FEATURE (BUILD: 1.6.0 r22790)
This event is triggered when a player tries to change protected element data. The server protects element data with using elementdata_whitelisted from mtaserver.conf and the clientChangesPolicy parameter in setElementData.

Parameters

  • element: The affected element.
  • key: The name of the element data entry that has changed.
  • value: The value that the player sends.

Source

The source of this event is the player who changes protected element data.

Example

The below example will ban all players who are trying to change protected element data.

function processPlayerElementDataHack()
    addBan(source, "Element data hacking attempt")
end
addEventHandler("onPlayerChangesProtectedData", root, processPlayerElementDataHack)

See Also

Player events


Event functions