Mefisto_PL Posted January 1, 2012 Share Posted January 1, 2012 My login panel don't create new accounts In debugscript 3 i didn't see any error.. Look this: function passwordHandler(player, oldpassword, newpassword) local account = getPlayerAccount(player) if (account) then if (isGuestAccount(account)) then outputChatBox("Zaloguj się, aby zmienić hasło.", player) return end local playerName = getPlayerName(player) local password_check = getAccount(playerName, oldpassword) if (password_check ~= false) then if (string.len(newpassword) >= 5) then setAccountPassword(account, newpassword) triggerClientEvent(player, "hidePasswordWindow", getRootElement()) else outputChatBox("Twoje hasło musi mieć minimum 5 znaków !", player) end else outputChatBox("Stare hasło niepoprawne.", player) end end end function loginHandler(player, username, password) local account = getAccount(username, password) if (account ~= false) then if (logIn(player, account, password) == true) then outputChatBox("Witaj na Polskim Serwerze Zabawy !", player) triggerClientEvent (player, "hideLoginWindow", getRootElement()) else triggerClientEvent (player, "unknownError", getRootElement()) end else triggerClientEvent (player, "loginWrong", getRootElement()) end end function registerHandler(player, username, password) local account = getAccount(username, password) if (account ~= false) then triggerClientEvent(player, "registerTaken", getRootElement()) else account = addAccount(username, password) if (logIn(player, account, password) == true) then outputChatBox("Witaj na Polskim Serwerze Zabawy !", player) triggerClientEvent(player, "hideLoginWindow", getRootElement()) else triggerClientEvent(player, "unknownError", getRootElement()) end end end addEvent("submitChangepw", true) addEvent("submitLogin", true) addEvent("submitRegister", true) addEventHandler("submitChangepw", root, passwordHandler) addEventHandler("submitLogin", root, loginHandler) addEventHandler("submitRegister", root, registerHandler) Link to comment
50p Posted January 1, 2012 Share Posted January 1, 2012 Check what addAccount returns. Does your script get to the "Witaj ..." message? Link to comment
Mefisto_PL Posted January 1, 2012 Author Share Posted January 1, 2012 Script isn't my and I don't know everything about it. It's a P-Login I translate only messages. I can log in, but I can't register Link to comment
FatalTerror Posted January 1, 2012 Share Posted January 1, 2012 The login panel have admin rights? Link to comment
Mefisto_PL Posted January 1, 2012 Author Share Posted January 1, 2012 (edited) Oh >.< I'm stupid I don't add it. Sorry all. But I have problems with: That Edited January 1, 2012 by Guest Link to comment
50p Posted January 1, 2012 Share Posted January 1, 2012 My login panel don't create new accounts In debugscript 3 i didn't see any error.. Look this:... Misleading messages.. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now