Hi Leute,
wollte mal das Login-System aus dem Wiki ausprobieren aber es Funktionieren Teile nicht
wie die Chatnachricht "Invalid username and password. Please re-connect and try again.".
Code
function loginHandler(username,password)
-- check that the username and password are correct
if username == "user" and password == "apple" then
-- the player has successfully logged in, so spawn them
if (client) then
spawnPlayer(client, 1959.55, -1714.46, 10)
fadeCamera(client, true)
setCameraTarget(client, client)
outputChatBox("Welcome to My Server.", client)
end
else
-- if the username or password are not correct, output a message to the player
outputChatBox("Invalid username and password. Please re-connect and try again.",client)
end
end
addEvent("submitLogin",true)
addEventHandler("submitLogin",root,loginHandler)
Alles anzeigen
Außerdem versteh ich nicht (unabhängig von diesem Problem) was getRottElement() für eine Bedeutung hat bzw. wofür man es braucht.
MfG Leonid4s
//DaNNy: Beim nächsten Mal bitte einen aussagekräftigen Titel verwenden, sowas wie "Brauche Hilfe" sagt Nichts aus. Ich mein, Du bist ja hier im Forum generell angemeldet, um die Hilfe von anderen Usern zu holen.