AR/getAccount: Difference between revisions
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
An ''account'' value or ''false'' if an account matching the username specified (and password, if specified) could not be found. | An ''account'' value or ''false'' if an account matching the username specified (and password, if specified) could not be found. | ||
== | ==مثال== | ||
<syntaxhighlight lang="lua">addEventHandler("onPlayerJoin",root,function() | <syntaxhighlight lang="lua">addEventHandler("onPlayerJoin",root,function() | ||
if getAccount(getPlayerName(source)) then | if getAccount(getPlayerName(source)) then |
Revision as of 22:39, 25 August 2012
هذه الوظيفة ترجع لحساب الاعب الاعب المحدد
Syntax
account getAccount ( string username, [ string password ] )
Required Arguments
- username: اسم الحساب الذي تريد استرداده
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: كلمة سر الحساب . يمكنك ان تضع هذه البرهان اذا كنت تعرف كلمة السر الحساب الذي تريده , بطريقة أُخرى كلمة السر يجب ان تكون مطابقة للحساب
Returns
An account value or false if an account matching the username specified (and password, if specified) could not be found.
مثال
addEventHandler("onPlayerJoin",root,function() if getAccount(getPlayerName(source)) then outputChatBox("Please Login!",source) else outputChatBox("Please Register!",source) end end)