Search the Community

Showing results for tags 'login'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • Open Source Contributors
    • Suggestions
  • General MTA
    • News
    • Media
    • Site/Forum/IRC/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • community.mtasa.com
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Gang


Location


Occupation


Interests

Found 31 results

  1. Hola bueno quería pedirles si me pueden ayudar con este script que ise lo que pasa es que ya funciona todos los botones y eso pero al momento de logearme me sale que esta mal la contraseña o no existe y al momento de registrarme me sale que ya existe queria saber si me ayudan a repararlo no se si es un problema de algun evento grid o algo por favor llevo todo el dia intentando y no me sale que podra ser el error cliente: GUIEditor = { button = {}, window = {}, edit = {}, staticimage = {}, label = {} } zero = "" two = "" GUIEditor.window[1] = guiCreateWindow(0.38, 0.31, 0.22, 0.32, "Login", true) guiWindowSetSizable(GUIEditor.window[1], false) showCursor(true) logon = guiCreateButton(0.03, 0.82, 0.46, 0.15, "Login", true, GUIEditor.window[1]) guiSetFont(logon, "default-bold-small") GUIEditor.button[2] = guiCreateButton(0.52, 0.82, 0.46, 0.15, "Registro", true, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") GUIEditor.staticimage[1] = guiCreateStaticImage(0.02, 0.06, 0.96, 0.26, ":guieditor/images/plus.png", true, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(0.41, 0.34, 0.20, 0.08, "Usuario", true, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") GUIEditor.label[2] = guiCreateLabel(0.41, 0.55, 0.20, 0.08, "contraseña", true, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[2], "center") GUIEditor.edit[1] = guiCreateEdit(0.28, 0.42, 0.47, 0.11, "", true, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(0.28, 0.65, 0.47, 0.10, "", true, GUIEditor.window[1]) guiEditSetMasked ( password, true ) usuario = guiGetText ( GUIEditor.edit[1] ) guiGetText ( GUIEditor.edit[2] ) function onregister ( ) triggerServerEvent("rg",getLocalPlayer(),usuario,contra) end addEventHandler ( "onClientGUIClick", GUIEditor.button[2], onregister) function onlogin ( ) triggerServerEvent("lg",getLocalPlayer(),usuario,contra) end addEventHandler ( "onClientGUIClick", logon, onlogin) function ocu ( ) guiSetVisible( GUIEditor.window[1], false ) showCursor(false) end addEvent ( "ocultar", true ) addEventHandler ( "ocultar", getLocalPlayer(), ocu) button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "OK", true ) --Create an edit box and define it as "editBox". editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "", true ) guiEditSetMaxLength ( editBox, 128 ) --the max chatbox length is 128, so force this --setup our function to output the message to the chatbox function outputEditBox () local text = guiGetText ( editBox )--get the text from the edit box outputChatBox ( contra ) --output that text end addEventHandler ( "onClientGUIClick", button, outputEditBox ) y servidor function rg(usuario,contra) if (addAccount(usuario,contra)) then triggerClientEvent(source,"ocultar",source) logIn (source,getAccount(usuario,contra),contra) else outputChatBox("la cuenta ya existe") end end addEvent("rg",true) addEventHandler("rg",getRootElement(), rg) function lg(usuario,contra) cuenta = getAccount(usuario,contra) if (cuenta) then triggerClientEvent(source,"ocultar",source) logIn (source,getAccount(usuario,contra),contra) outputChatBox("te logeaste correctamente") setCameraTarget(source) else outputChatBox("la cuenta no existe o la contraseña esta mal") end end addEvent("lg",true) addEventHandler("lg",getRootElement(), lg) addEventHandler ( "onPlayerJoin", getRootElement(),function () triggerClientEvent(source,"abrir",source) end) function setCameraOnPlayerJoin() -- slowly fade the camera in to make the screen visible fadeCamera(source, true, 5) -- set the player's camera to a fixed position, looking at a fixed point setCameraMatrix(source, -1568, 540, 80, -400000, 10000000, 99.881813049316) end addEventHandler("onPlayerJoin", root, setCameraOnPlayerJoin) addEventHandler ( "onResourceStart", getRootElement(), setCameraOnPlayerJoin )
  2. Pessoal a Pouco Tempo Comecei a Trabalhar Com Linguagem. Lua e Para Conseguir Cria Meu Servidor e Ser Independente De Precisar Pegar Um Painel Entrar Ou Um Script Em SItes Apr Aprendi Bastante Coisa Mais Pulei a Peça Do Painel Login e Queria Saber Se Voces Pode Explicar Como Consigo Criar Short Time Staff I Started Working With Language. Moon and To Be able to Create My Server And Be Independent Of Need To Pick A Login Panel Or A Script In SItes I Learned A Lot More Thing I Have Skipped The Part Of The Login Panel And I Wanted To Know If You Can Explain How I Can Create Краткосрочный персонал Я начал работать с языком. Луна и иметь возможность создавать свой сервер и быть независимыми от необходимости выбирать панель входа или сценарий В SItes я узнал, что многое другое, что я пропустил часть панели входа в систему, и я хотел узнать, можете ли вы объяснить, как я могу создать
  3. MrKAREEM

    [Help] Update Login Data

    Hello Guis I Want Help In Save Data The Original Code Save Data For The First Time Only And When Login Again It Get The Information That I Login From First Join So I Get Code That Update Data But Didont Work The Original Code executeSQLQuery("CREATE TABLE IF NOT EXISTS players_save( serial TEXT, user TEXT, pass TEXT)") function AddPlayer(serial,user,pass) executeSQLQuery("INSERT INTO players_save(serial,user,pass) VALUES(?,?,?)",serial,user,pass) end function isPlayerSave(serial) local sel = executeSQLQuery("SELECT serial FROM players_save WHERE serial=?",serial) if sel == 0 then return false else return true end end function getUserAndPass(serial) local user,pass = "","" if isPlayerSave(serial) then local sel = executeSQLQuery("SELECT * FROM players_save WHERE serial=?",serial) for i,player in ipairs(sel) do if i == 1 then user = player.user pass = player.pass end end return user,pass end return false end addEvent("onGetSave",true) addEventHandler("onGetSave",root, function () local serial = getPlayerSerial(source) if isPlayerSave(serial) then local user,pass = getUserAndPass(serial) triggerClientEvent(source,"onPutSave",source,user,pass) end end ) The Code That I Get executeSQLQuery("CREATE TABLE IF NOT EXISTS players_save( serial TEXT, user TEXT, pass TEXT)") function AddPlayer(serial,user,pass) local result = executeSQLQuery("SELECT serial,user,pass FROM players_save WHERE serial =?",serial) if ( result == 0 ) or ( not result ) then executeSQLQuery("INSERT INTO players_save(serial,user,pass) VALUES(?,?,?)",serial,user,pass) else executeSQLQuery("UPDATE players_save SET user =? , pass ? WHERE serial =?",user,pass,serial) end end function isPlayerSave(serial) local sel = executeSQLQuery("SELECT serial FROM players_save WHERE serial=?",serial) if sel == 0 then return false else return true end end function getUserAndPass(serial) local user,pass = "","" if isPlayerSave(serial) then local sel = executeSQLQuery("SELECT * FROM players_save WHERE serial=?",serial) for i,player in ipairs(sel) do if i == 1 then user = player.user pass = player.pass end end return user,pass end return false end addEvent("onGetSave",true) addEventHandler("onGetSave",root, function () local serial = getPlayerSerial(source) if isPlayerSave(serial) then local user,pass = getUserAndPass(serial) triggerClientEvent(source,"onPutSave",source,user,pass) end end ) I Wish Any One Help Me
  4. function check(source) local recipient = getPlayerFromName(source) local accName = getAccountName ( getPlayerAccount ( recipient ) ) -- get his account name local r,g,b if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Forever" ) ) then setPlayerTeam ( recipient, FO ) r, g, b = getTeamColor ( FO ) setPlayerNametagColor ( recipient, r, g, b ) end end addEventHandler ( "onPlayerLogin", getRootElement(), check ) ================================================================ i made a lil script to add clans but it seems that when u reconnect or login again , u are removed from player, the clan members are added into an ACL group marked Forever , i made this piece of code, to add player back into team if the player is in the acl group on login. but it doesnt work. I am not really good at this but , i dont know how to get player from server side , can someone pls explain to me what is wrong in this piece of code and also tell me how to get player from server side thanks
  5. KingBC

    Wind sound in Login Panel

    Guys, I have a problem with my login panel. I set to play a song but the wind is still in the background. Help me
  6. Siberhecy

    What is the default login system?

    As the title, what is the default login system for default server? I deleted all resource load from mtaserver.conf but still /login /register works.. Thanks.
  7. Wunder

    [HELP] Login Panel Problem

    Greetings People! I have a little problem with my Login Panel, because if i click on the Register button then nothing happens. I just tested my MySQL connection too , but its shows that the Connection is good and nothing comes out in the Debugscript either. If anyone can help me with this then Thank you! --Here is the Code for the Register function Server Side function registerReq(player, username, password, email) local password = md5(password) local regQuery = dbPoll(dbQuery(connection, "SELECT * FROM accounts"),-1) if regQuery then for _, rows in ipairs(regQuery) do if rows["username"] == username then exports.vmInfoBox:addNotification(player,"Ezzel a felhasználóval már regisztráltak!", "error") return end if rows["serial"] == getPlayerSerial(source) then exports.vmInfoBox:addNotification(player,"Az adott Serial már regisztrálva van!", "error") return end insertinfo = dbExec(connection, "INSERT INTO accounts SET username = ?, password = ?, ip = ?, serial = ?, email = ?, banned='0', online='0', regdate=NOW()", username, password, getPlayerIP(source), getPlayerSerial(source), email, banned, online, regdate) if insertinfo then exports.vmInfoBox:addNotification(player,"Sikeres regisztráció!", "success") else exports.vmInfoBox:addNotification(player,"Valami hiba történt, keress fel egy fejlesztöt!", "error") end end end end addEvent("registerReq", true) addEventHandler("registerReq", getRootElement(), registerReq) -- This is the code for Client Side function regregisterClick(button, state) if button == "left" and state == "down" then if source == regregbutton then if string.len(DGS:dgsGetText(reguseredit)) < 5 then exports.vmInfoBox:addNotification("A felhasználónév minimum 5 karakterböl kell állnia!", "error") return end if string.len(DGS:dgsGetText(regpasswedit)) < 6 then exports.vmInfoBox:addNotification("A jelszó minimum 6 karakterböl kell állnia!", "error") return end if DGS:dgsGetText(regpasswedit) ~= DGS:dgsGetText(regpasswedit2) then exports.vmInfoBox:addNotification("A két megadott jelszó nem egyezik!", "error") return end if string.len(DGS:dgsGetText(regmailedit)) < 7 then exports.vmInfoBox:addNotification("Az email cím minimum 7 karakterböl kell állnia!", "error") return end if not string.find(DGS:dgsGetText(regmailedit), "@") and string.find(DGS:dgsGetText(regmailedit), ".") then exports.vmInfoBox:addNotification("Kérlek adj meg egy érvényes email címet!", "error") return end if DGS:dgsGetText(reguseredit) == "" and DGS:dgsGetText(regpasswedit) == "" and DGS:dgsGetText(regpasswedit2) == "" and DGS:dgsGetText(regmailedit) == "" then exports.vmInfoBox:addNotification("Ne hagyd üresen a mezöket!", "error") end triggerServerEvent("registerReq", localPlayer, localPlayer, DGS:dgsGetText(reguseredit),DGS:dgsGetText(regpasswedit),DGS:dgsGetText(regpasswedit2),DGS:dgsGetText(regmailedit)) end end end addEventHandler("onDgsMouseClick", getRootElement(), regregisterClick)
  8. KingBC

    PAINEL DE LOGIN (LOGIN PANEL)

    Olá, estou montando um servidor de RPG, como criar um painel de login do zero? Alguma dica por onde começar? Queria criar um painel com a imagem personalizada do fundo e com a opção de registro. ----- Hello, I am setting up an RPG server, how to create a login panel from scratch? Any tips on where to start? I wanted to create a panel with the custom background image and with the registration option.
  9. #LycaN

    MySQL internal dbs

    How can I change the MTA internal db (internal.db and registry.db) to MySQL, maintening the functions like getAccountData, getElementData ?
  10. How can I add music to the login panel. My english :~, I apologize for this.
  11. Merhaba Türk kardeşlerim. Başlıkta da yazdığı gibi owl scriptleri üzerine login panele nasıl müzik koyabilirim.
  12. GonzaloBuenosAires

    Me ayduas por favor?

    Como es esto? tengo estas funciones la primera es la función de que si te rompes los huesos no puedes correr ni saltar... La segunda es la función de que si tieens sueño no puedes correr pero SI saltar... Cúal es el problema? pues es que cuando te rompes los huesos puedes correr pero no saltar.... La verdad no se que pasa es como si estuvieran mezcladas las funciones (mal colocadas nosé). function checkBrokenbone() if getElementData(getLocalPlayer(), "logedin") then if getElementData(getLocalPlayer(), "brokenbone") or getElementData(localPlayer,"sleep") <= 0 then if not isPedDucked(getLocalPlayer()) then end toggleControl("jump", false) toggleControl("sprint", false) else toggleControl("jump", true) toggleControl("sprint", true) end end end setTimer(checkBrokenbone, 1400, 0) --------------------------------------------------- --sleep function checkSleeping() if getElementData(getLocalPlayer(),"logedin") then if getElementData(getLocalPlayer(),"sleep") <= 20 then if not isPedDucked(getLocalPlayer()) then end toggleControl ( "sprint", false ) else toggleControl ( "sprint", true ) end end end setTimer(checkSleeping,1400,0) Se supone que la idéa sería que si me rompo los huesos no pueda correr ni saltar y cuando tenga sueño no pueda correr pero SI saltar.... Cúal es la solución chicos?????
  13. Eae gente tudo beleza ? Tenho uma dúvida pois entrei no mundo do MTA hoje e por isso tenho algumas dúvidas. Minha primeira dúvida é que se é preciso fazer um sistema de login/registro ou o próprio MTA já o faz ? Obrigado.
  14. my problem like this : i can't login my administration account another pc how can i fix it? server says me : serial pending authorization for account "my name"- bla bla bla Guys i need help
  15. i have a loginpanel, and i added this lines: time = getTickCount() x = 1000 y = 200 z = 20 function anim() x = x+0.31 y = y+0.32 setCameraMatrix(x,y,z, 0, 0, 0) if (getTickCount() - time >= 5000) then removeEventHandler("onClientPreRender", getRootElement(), anim) end end addEventHandler("onClientPreRender", getRootElement(), anim) but when i log in, how to set camera to the player? because when i login, the loginpanel disappear, and the camera stay there sorry for my bad english :c
  16. Anthony

    registering proplem

    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 outputChatBox ("#FF0000* #00FF00You have sucessfuly registered! [Username: #FFFFFF" .. username .. " #00FF00| Password: #FFFFFF" .. password .. "#00FF00 ]",source,255,255,255,true ) else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","An unknown error has occured! Please choose a different username/password and try again.") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","An account with this username already exists!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Passwords do not match!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Please confirm your password!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Please enter a password!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Please enter a username you would like to register with!") end end addEvent("onRequestRegister",true) addEventHandler("onRequestRegister",getRootElement(),registerPlayer) wheni press the register key the debug says that the resource can't add account as in : local accountAdded = addAccount(tostring(username),tostring(password))
  17. zezothelord

    cant connect to CIT server HELP!!

    okay, i downloaded MTA yesterday and joined server :CIT Cops 'n' Robbers, Gang Wars, Civilians | cit2.net | EN/AR/RU/+8 more languages IP : 91.121.96.47:27016 i registerd in it then when i went off my brother registerd too and played but when he made the account he named it headlord4 he started with my account name (zezothelord) idk how but afterthat he changed it and he went off then i tried to login found my account named headlord4 :0 but changed it back to zezothelord when i went off and my brother came back he couldnt login his account it said ur password is wrong but he was putting his password right then he made another account and same things happened untill he tried to put hhis password 10times and now we both cant login
  18. So i play on my server and i put some heavy mods of about 140 mb and my some people who join have bad internet connection and sometimes my upload rate slows down , so the login panel keeps annoying the hell out of people is there any way i can like to bypass login panel and then open it after player has downloaded?
  19. Turbo777

    Why not hide the loginpanel?

    client: function asdasd111() removeEventHandler("onClientRender",root,a123) guiSetVisible(buttonLogin,false) guiSetVisible(buttonRegister,false) guiSetVisible(buttonGuest,false) guiSetVisible(editPassword,false) guiSetVisible(editUsername,false) guiSetVisible(G1,false) guiSetVisible(G2,false) showCursor(false) end addEvent ( "onClientPlayerLogin", true ) addEventHandler ( "onClientPlayerLogin", root, asdasd111 ) server: function triggerLogin ( player, username, password ) triggerClientEvent ( player, "onClientPlayerLogin", player, username, password ) end what wrong?
  20. I want create a last login script, what output to the chatbox my last login, with date, and hours, when i login. But how to create?
  21. Hello guys,i'm making own login-register system using MySQL but i when i can't check username and password ; local sorgu = dbQuery( userdata_db, "SELECT * FROM `database` WHERE `USERNAME`=? AND `PASSWORD`=?",username,password ) local result = dbPoll ( sorgu, -1 ) if result == 1 then I'm using this code for select data it but i can't get result for check (there is no console logs it's failing when i try the command)
  22. hi i have server with cef (html,css,js) login panel all players are ok with that but one of my users cant see login panel and he just see a white screen login panel's music also play for him its not a scripting problem i know cuz i have a lot of players they didn't had any problems with that... he is using mta latest version whats the problem?
  23. DarkxD

    SaveAccount

    Hallo, please help me!
  24. Artisz

    Browser or HTML?

    Hi! I don't know, how is it possible: I try it with HTML, the video is in .webm format, and I have a bad fps drop, with link I can't do it, I don't know HTML well. I try it with createBrowser too, but with this, I can't do it that the gui or dxdraw be in front of the video, the browser.
  25. client: local localPlayer = getLocalPlayer() local playerName = getPlayerName(localPlayer) function noBinds() guiSetInputMode("no_binds_when_editing") end addEventHandler("onClientResourceStart", root, noBinds) function createLoginWindow() windowLogin = guiCreateWindow(0.3945,0.3646,0.2109,0.2018,"Magyar Play Szerver - Loginpanel by turbesz",true) guiSetSize(windowLogin, 270, 175, false) guiSetAlpha(windowLogin,1) labelUsername = guiCreateLabel(10,52,59,24,"Felh.név:",false,windowLogin) guiSetAlpha(labelUsername,1) guiLabelSetColor(labelUsername,255,255,255) guiLabelSetVerticalAlign(labelUsername,"center") guiLabelSetHorizontalAlign(labelUsername,"left",false) labelPassword = guiCreateLabel(10,86,59,24,"Jelszó:",false,windowLogin) guiSetAlpha(labelPassword,1) guiLabelSetColor(labelPassword,255,255,255) guiLabelSetVerticalAlign(labelPassword,"center") guiLabelSetHorizontalAlign(labelPassword,"left",false) labelInfo = guiCreateLabel(10,26,250,17,"Regizz, és jelentkezz be a játékhoz.",false,windowLogin) guiSetAlpha(labelInfo,1) guiLabelSetColor(labelInfo,255,255,255) guiLabelSetVerticalAlign(labelInfo,"top") guiLabelSetHorizontalAlign(labelInfo,"center",false) guiSetFont(labelInfo,"default-bold-small") editUsername = guiCreateEdit(79,52,181,25,"",false,windowLogin) guiSetAlpha(editUsername,1) guiEditSetMaxLength(editUsername, 50) editPassword = guiCreateEdit(79,86,181,25,"",false,windowLogin) guiSetAlpha(editPassword,1) guiEditSetMasked(editPassword, true) guiEditSetMaxLength(editPassword, 50) buttonLogin = guiCreateButton(10,121,120,21,"Bejelentkezés",false,windowLogin) guiSetAlpha(buttonLogin,1) buttonRegister = guiCreateButton(143,121,117,21,"Regisztrálás",false,windowLogin) guiSetAlpha(buttonRegister,1) buttonGuest = guiCreateButton(10,145,121,21,"Vendég",false,windowLogin) guiSetAlpha(buttonGuest,1) checkbox_save = guiCreateCheckBox(157,145,117,21,"Adatok mentése",false,false,windowLogin) guiSetFont(checkbox_save,"default-small") guiWindowSetSizable ( windowLogin, false ) guiSetVisible(windowLogin, false) addEventHandler("onClientGUIClick", buttonLogin, clientSubmitLogin, false) addEventHandler("onClientGUIClick", buttonRegister, clientSubmitRegister, false) local username, password = loadLoginFromXML() if not( username == "" or password == "") then guiCheckBoxSetSelected ( checkbox_save, true ) guiSetText ( editUsername, tostring(username)) guiSetText ( editPassword, tostring(password)) else guiCheckBoxSetSelected ( checkbox_save, false ) guiSetText ( editUsername, tostring(username)) guiSetText ( editPassword, tostring(password)) end end function loadLoginFromXML() local xml_save_log_File = xmlLoadFile ("files/xml/adatok.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/adatok.xml", "login") end local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if usernameNode and passwordNode then return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) else return "", "" end xmlUnloadFile ( xml_save_log_File ) end function saveLoginToXML(username, password) local xml_save_log_File = xmlLoadFile ("files/xml/adatok.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/adatok.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end xmlNodeSetValue (usernameNode, tostring(username)) end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, tostring(password)) end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("saveLoginToXML", true) addEventHandler("saveLoginToXML", getRootElement(), saveLoginToXML) function resetSaveXML() local xml_save_log_File = xmlLoadFile ("files/xml/adatok.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/adatok.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, "") end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("resetSaveXML", true) addEventHandler("resetSaveXML", getRootElement(), resetSaveXML) addEventHandler("onClientGUIClick",root, function () if source == buttonGuest then guiSetVisible ( windowLogin , false ) showCursor(false) end end ) function resourceStart() createLoginWindow() if (windowLogin ~= nil) then guiSetVisible(windowLogin, true) else outputChatBox("Whoops, valami error történt.") end showCursor(true) guiSetInputEnabled(true) end function clientSubmitLogin(button, state) if button == "left" and state == "up" then local username = guiGetText(editUsername) local password = guiGetText(editPassword) if username and password then triggerServerEvent("submitLogin", getRootElement(), localPlayer, username, password) else guiSetText(labelInfo, "Írj be felh.nevet és jelszót.") end end end function clientSubmitRegister(button, state) if button == "left" and state == "up" then local username = guiGetText(editUsername) local password = guiGetText(editPassword) if username and password then triggerServerEvent("submitRegister", getRootElement(), localPlayer, username, password) else guiSetText(labelInfo, "Írj be felh.nevet és jelszót.") end end end function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible(windowLogin, false) showCursor(false) end function unknownError() guiSetText(labelInfo, "Ismeretlen hiba.") end function loginWrong() guiSetText(labelInfo, "Hibás adatok.") end function registerTaken() guiSetText(labelInfo, "Felhasználó név regisztrálva van.") end addEvent("hideLoginWindow", true) addEvent("unknownError", true) addEvent("loginWrong", true) addEvent("registerTaken", true) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) addEventHandler("unknownError", getRootElement(), unknownError) addEventHandler("loginWrong", getRootElement(), loginWrong) addEventHandler("registerTaken", getRootElement(), registerTaken) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), resourceStart) fileDelete("client.lua") server: function loginHandler(player, username, password, checksave) local account = getAccount(username, password) if (account ~= false) then if (logIn(player, account, password) == true) then triggerClientEvent (player, "hideLoginWindow", getRootElement()) if checksave == true then triggerClientEvent(source,"saveLoginToXML",getRootElement(),username,password) else triggerClientEvent(source,"resetSaveXML",getRootElement(),username,password) end 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 triggerClientEvent(player, "hideLoginWindow", getRootElement()) else triggerClientEvent(player, "unknownError", getRootElement()) end end end addEvent("submitLogin", true) addEvent("submitRegister", true) addEventHandler("submitLogin", root, loginHandler) addEventHandler("submitRegister", root, registerHandler) why not save?