onAccountDataChange
Client-side
Server-side
Shared
This event is triggered when an accounts data changes through setAccountData.
Parameters
account theAccount, string theKey, string theValue
- theAccount: the account that had data changed.
- theKey: the string key that is being changed.
- theValue: the value it is changing to.
Source
element: The source of this event is the root element.
Code Examples
server
This examples prevents the key of "level" being added or changed on every account.
function preventLevelChange(account, key, value) if (key == "level") then cancelEvent() endendaddEventHandler("onAccountDataChange", root, preventLevelChange)
See Also
Account Events
- onAccountCreate
- onAccountRemove
- onAccountDataChange
Account Functions
- addAccount
- getAccount
- getAccountByID
- copyAccountData
- getAccountData
- getAccountID
- getAccountName
- getAccountIP
- getAccountPlayer
- getAccountType
- getAccountSerial
- getAccountsByData
- getAccounts
- getAccountsByIP
- getAccountsBySerial
- getAllAccountData
- getPlayerAccount
- logIn
- isGuestAccount
- logOut
- removeAccount
- setAccountData
- setAccountName
- setAccountPassword