DE/addAccount: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
OpenIDUser57 (talk | contribs) No edit summary  | 
				OpenIDUser57 (talk | contribs)  No edit summary  | 
				||
| Line 4: | Line 4: | ||
== Syntax ==  | == Syntax ==  | ||
<section name="  | <section name="Server" class="Server" show="true">  | ||
<syntaxhighlight lang="lua">  | <syntaxhighlight lang="lua">  | ||
bool playSound( string Name, string Passwort )      | bool playSound( string Name, string Passwort )      | ||
| Line 19: | Line 19: | ||
== Beispiel: ==  | == Beispiel: ==  | ||
<section name="  | <section name="Server" class="Server" show="true">  | ||
Erstellt automatisch einen Account mit den Namen des Spielers und dem Passwort.  | Erstellt automatisch einen Account mit den Namen des Spielers und dem Passwort.  | ||
<syntaxhighlight lang="lua">  | <syntaxhighlight lang="lua">  | ||
Latest revision as of 14:05, 7 August 2013
Erstellt einen Account und fügt diese in die internal.db ein.
Syntax
Click to collapse [-]
Serverbool playSound( string Name, string Passwort )
Benötigte Argumente:
- Name:: Den jeweiligen Namen den der Account haben soll
 - Passwort: Bestimmt das Passwort welches der Account dann hat
 
Rückgaben
Gibt true zurück, wenn der Account erstellt wurde. false, wenn nicht Argumente fehlen oder der Account bereits existiert
Beispiel:
Click to collapse [-]
ServerErstellt automatisch einen Account mit den Namen des Spielers und dem Passwort.
addEventHandler("onPlayerJoin", getRootElement(), function()
 local pname = getPlayerName(source)
 addAccount(pname, pname)
end)