LogIn: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: bool logIn ( player, account, password ))
 
No edit summary
Line 1: Line 1:
bool logIn ( player, account, password )
__NOTOC__
{{Server function}}
This functions logs the given player in to the given account. You need to provide the password needed to log into that account.
 
==Syntax==
<syntaxhighlight lang="lua">
bool logIn ( player thePlayer, account theAccount, string thePassword )
</syntaxhighlight>
 
===Required Arguments===
*'''thePlayer:''' The player to log into an account
*'''theAccount:''' The account to log the player into
*'''thePassword:''' The password needed to sign into this account
 
===Returns===
Returns ''true'' if the player was successfully logged into the given account. Returns ''false'' or ''nil'' if the log in failed for some reason, ie. the player was already logged in to some account (use [[logOut]] first), if the account was already in use or if it failed for some other reason.
 
==Example==
This example shows how you could create a ''call_admin'' function that only could be run by registered users.
<syntaxhighlight lang="lua">
--TODO
</syntaxhighlight>
 
==See Also==
{{Account_functions}}

Revision as of 10:02, 26 November 2007

This functions logs the given player in to the given account. You need to provide the password needed to log into that account.

Syntax

bool logIn ( player thePlayer, account theAccount, string thePassword )

Required Arguments

  • thePlayer: The player to log into an account
  • theAccount: The account to log the player into
  • thePassword: The password needed to sign into this account

Returns

Returns true if the player was successfully logged into the given account. Returns false or nil if the log in failed for some reason, ie. the player was already logged in to some account (use logOut first), if the account was already in use or if it failed for some other reason.

Example

This example shows how you could create a call_admin function that only could be run by registered users.

--TODO

See Also