AR/getAccount: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server function}} | {{Server function}} | ||
هذه الوظيفة ترجع لحساب الاعب الاعب المحدد | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> |
Revision as of 22:26, 25 August 2012
هذه الوظيفة ترجع لحساب الاعب الاعب المحدد
Syntax
account getAccount ( string username, [ string password ] )
Required Arguments
- username: The username of the account you want to retrieve
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.
- password: The password for the account. If this argument is not specified, you can get the account whatever password it is, otherwise the password must match the account's.
Returns
An account value or false if an account matching the username specified (and password, if specified) could not be found.
Example
addEventHandler("onPlayerJoin",root,function() if getAccount(getPlayerName(source)) then outputChatBox("Please Login!",source) else outputChatBox("Please Register!",source) end end)