Sehr geehrte Community,
ich habe mir gestern ein Login & Register System gemacht bzw. von einem Tutorial nachgebaut und nun wollte ich mal fragen wo die Funktion "addAccount", die Accounts erstellt ?
Soll anscheinend was mit ACL zutun haben, aber ich finde einfach keine Datei...
Hoffe ihr könnt mir helfen ;).
registerPlayer Funktion im Script
Lua
function registerPlayer(username,password,passwordConfirm)
if not (username == "") then
if not (password == "") then
if not (passwordConfirm == "") then
if password == passwordConfirm then
local account = getAccount (username,password)
if (account == false) then
local accountAdded = addAccount(tostring(username),tostring(password))
if (accountAdded) then
triggerClientEvent(source,"hideRegisterWindow",getRootElement())
outputChatBox ("You have sucessfuly registered! [Username: #ABCDEF" .. username .. " #FF0000| #FFFFFFPassword: #ABCDEF" .. password .. "#FFFFFF]",source,255,255,255,true )
setTimer(outputChatBox,800,1,"You can now login with your new account.",source,255,255,255,true )
else
outputChatBox ("An unknown error has occured! Please choose a different username/password and try again.",source,255,255,255,true )
end
else
outputChatBox ("Error! An account with this username already exists!",source,255,255,255,true )
end
else
outputChatBox ("Error! Passwords do not match!",source,255,255,255,true)
end
else
outputChatBox ("´Error! Please confirm your password!",source,255,255,255,true)
end
else
outputChatBox ("Error! Please enter a password!",source,255,255,255,true)
end
else
outputChatBox ("Error! Please enter a username you would like to register with!",source,255,255,255,true)
end
end
Alles anzeigen