GetAccountSerial

From Multi Theft Auto: Wiki
Revision as of 11:01, 17 April 2014 by Miki785 (talk | contribs) (Created page with "__NOTOC__ {{Server function}} This function returns the last serial that logged onto the specified account. ==Syntax== <syntaxhighlight lang="lua"> string getAccountSerial ( account ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function returns the last serial that logged onto the specified account.

Syntax

string getAccountSerial ( account theAccount )

Required Arguments

  • theAccount: The account to get serial from

Returns

Returns string containing the serial, the string is empty if the account was never used. Returns false if invalid arguments were specified.

Example

This example adds command getaccserial that outputs the given account's serial in the chat box.

addCommandHandler("getaccserial", 
	function (player, cmd, account)
		account = getAccount(account)
		if (account) then
			outputChatBox("Serial: " .. getAccountSerial(account))
		else
			outputChatBox("Account not found")
		end
	end)

See Also