CopyAccountData

From Multi Theft Auto: Wiki
Revision as of 16:14, 16 September 2006 by MrJax (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function copies all of the data from one account to another.

Syntax

bool copyAccountData ( account theAccount, account fromAccount )

Required Arguments

  • theAccount: The account you wish to copy the data to.
  • fromAccount: The account you wish to copy the data from.

Returns

Returns a true if the accounts were valid, false otherwise.

Example

This example copys the account data from the 'guest' to a registered account when they login

addEventHandler ( "onClientLogin", root, "onClientLogin" )
function onClientLogin ( previous_account, current_account, auto-login )
  copyAccountData ( current_account, previous_account )
end

See Also