SetAccountData: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Note_box|It is strongly recommended that you use the standard ''module.key'' naming for your keys, as shown in the example below. This prevents collisions between different scripts.}}
{{Note_box|It is strongly recommended that you use the standard ''module.key'' naming for your keys, as shown in the example below. This prevents collisions between different scripts.}}
This function sets a string to be stored in an account. This can then be retrieved using [[setAccountData]]. Data stored as account data is persistent across user's sessions and maps, unless they are logged into a guest account.
This function sets a string to be stored in an account. This can then be retrieved using [[getAccountData]]. Data stored as account data is persistent across user's sessions and maps, unless they are logged into a guest account.


==Syntax==  
==Syntax==  

Revision as of 16:05, 8 September 2006

This template is no longer in use as it results in poor readability. This function sets a string to be stored in an account. This can then be retrieved using getAccountData. Data stored as account data is persistent across user's sessions and maps, unless they are logged into a guest account.

Syntax

bool setAccountData ( account theAccount, string key, string value )

Required Arguments

  • theAccount: The account you wish to retrieve the data from.
  • key: The key under which you wish to store the data
  • value: The value you wish to store

Returns

Returns a true if the account data was set, false if an invalid argument was specified.

Example

Need onPlayerLogin for this...


See Also