GetPlayerSerial: Difference between revisions
Jump to navigation
Jump to search
m (→Example) |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
This function returns the serial for a specified [[player]]. | This function returns the [[serial]] for a specified [[player]]. | ||
==Syntax== | ==Syntax== | ||
Line 13: | Line 13: | ||
==Returns== | ==Returns== | ||
Returns the serial as a ''string'' if it was found, ''false'' otherwise. | Returns the serial as a ''string'' if it was found, ''false'' otherwise. | ||
{{New feature|3|1.0| | |||
The format of the serial has been changed. | |||
}} | |||
==Example== | ==Example== |
Revision as of 12:59, 11 April 2009
This function returns the serial for a specified player.
Syntax
string getPlayerSerial ( player thePlayer )
Required Arguments
- thePlayer: A player object referencing the specified player.
Returns
Returns the serial as a string if it was found, false otherwise.
The format of the serial has been changed.
Example
Click to collapse [-]
ServerThis example creates a command with which player can check their own serial.
function checkMySerial( thePlayer, command ) local theSerial = getPlayerSerial( thePlayer ) if theSerial then outputChatBox( "Your serial is: " .. theSerial, thePlayer ) else outputChatBox( "Sorry, you have no serial. =(", thePlayer ) end end addCommandHandler( "serial", checkMySerial )