onPlayerChangesProtectedData | Multi Theft Auto: Wiki Skip to content

onPlayerChangesProtectedData

Client-side
Server-side
Shared

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

This event does not pass any parameters to the handler function.

Source

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

Code Examples

server

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