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
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash
  • Private Bugtracker

Found 24 results

  1. [AYUDA] AVISO LOGEO

    Como hago que cuando inicie sección un personal del staff, aparezca una imagen personalizada en la parte de arriba con el nombre, y suene una canción? se los agradecería muchísimo, estaré atento a las respuestas.
  2. MySQL internal dbs

    How can I change the MTA internal db (internal.db and registry.db) to MySQL, maintening the functions like getAccountData, getElementData ?
  3. How can I add music to the login panel. My english :~, I apologize for this.
  4. Merhaba Türk kardeşlerim. Başlıkta da yazdığı gibi owl scriptleri üzerine login panele nasıl müzik koyabilirim.
  5. 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?????
  6. 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.
  7. 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
  8. 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
  9. 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))
  10. 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
  11. 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?
  12. 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?
  13. 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?
  14. 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)
  15. 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?
  16. 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.
  17. SaveAccount

    Hallo, please help me!
  18. 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?
  19. Login System Some Images of GUI: https://puu.sh/sJnRg/2928be4ec3.png https://puu.sh/sJnTw/cb57d4b9ce.png Features: Uses External MySQL Database for register/login Logs in user to MTA System if account exist. It is opensource Installation: Configure your database configurations in server.lua Export database.sql to your selected database. Add this resource to your ACL's admin group and boom! Finished! You can start the script and connect to the server! Download Links MTA Community Resource: https://community.mtasa.com/index.php?p=resources&s=details&id=13930 Exports: -- To Be Updated.. exports.login:getPlayerUsername(player) -- Gets Player Username.
  20. Login panel bug

    Hola, tengo un problema y no sé si es cosa mía o de como configuré este log-in (lo hice a partir de un video que decía como configurarlo y crearlo) el tema es que en el video (llegado el momento) dice que ejecutemos el comando anteriormente puesto y se le abre la ventana del login pero a mí me sucede todo lo contrario aunque yo haya establecido el mismo comando, haya puesto los mismos nombres en las funciones, etc. no pasa nada. Y ahora, no sé por qué, no me abre el "editor_gui" aunque ponga "/guied" o apriete "shift+c" (este dejo de funcionar a la segunda vez que use el "editor_gui") y como no lo puedo abrir, no puedo agregar un botón de regresar que me faltó en el registro para que vuelva al log-in panel. La verdad, no tengo ni idea de lo que sucede ni como arreglarlo ya que soy nuevo en Scripting y lo relacionado. (Mi primer resource es este login y al ver que no pasa nada es medio frustrante, jaja) Este es el client.lua: local screenM, screenH = guiGetScreenSize() function reg() winRegister = guiCreateWindow(387, 256, 414, 313, "Register panel by Seyer", false) guiWindowSetSizable(winRegister, false) usuario = guiCreateEdit(236, 24, 167, 43, "", false, winRegister) GUIEditor.label[1] = guiCreateLabel(17, 23, 159, 44, "Usuario:", false, winRegister) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 15, 239, 253) GUIEditor.label[2] = guiCreateLabel(19, 92, 217, 44, "Contraseña:", false, winRegister) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 15, 239, 253) GUIEditor.label[3] = guiCreateLabel(19, 160, 217, 44, "Contraseña:", false, winRegister) guiSetFont(GUIEditor.label[3], "sa-header") guiLabelSetColor(GUIEditor.label[3], 15, 239, 253) contraseña1 = guiCreateEdit(236, 94, 167, 42, "", false, winRegister) guiEditSetMasked(contraseña1,true) contraseña2 = guiCreateEdit(236, 160, 167, 44, "", false, winRegister) guiEditSetMasked(contraseña2,true) brtRegistrar = guiCreateButton(9, 234, 394, 69, "Register", false, winRegister) guiSetFont(GUIEditor.button[1], "sa-header") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0FEFFD") GUIEditor.label[4] = guiCreateLabel(27, 205, 56, 19, "(máx. 25)", false, winRegister) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 254, 254, 254) GUIEditor.label[5] = guiCreateLabel(27, 136, 56, 19, "(máx. 25)", false, winRegister) guiSetFont(GUIEditor.label[5], "default-bold-small") guiLabelSetColor(GUIEditor.label[5], 254, 254, 254) GUIEditor.label[6] = guiCreateLabel(27, 67, 56, 19, "(máx. 25)", false, winRegister) guiSetFont(GUIEditor.label[6], "default-bold-small") guiLabelSetColor(GUIEditor.label[6], 254, 254, 254) addEvent("onClientGUIClick",brtRegistrar,function() user=guiGetText(usuario) c=guiGetText(contraseña1) c1=guiGetText(contraseña2) if(c==c1)then triggerServerEvent("rg",getLocalPlayer(),user,c) outputChatBox("Las contraseñas coinciden.") else outputChatBox("Las contraseñas no coinciden.") end addEvent("cerrar",true") addEventHandler("cerrar,getLocalPlayer(),function() guiSetVisible(winRegister,false) showCursor(false) addEvent("cerrar2",true") addEventHandler("cerrar,getLocalPlayer(),function() guiSetVisible(winLogin,false) showCursor(false) function login() winLogin = guiCreateWindow(387, 256, 414, 316, "Log-in panel by Seyer", false) guiWindowSetSizable(winLogin, false) usuario = guiCreateEdit(236, 24, 167, 43, "", false, winLogin) GUIEditor.label[1] = guiCreateLabel(17, 23, 159, 44, "Usuario:", false, winLogin) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 15, 239, 253) GUIEditor.label[2] = guiCreateLabel(19, 92, 217, 44, "Contraseña:", false, winLogin) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 15, 239, 253) contraseña1 = guiCreateEdit(236, 94, 167, 42, "", false, winLogin) btrLoggearse = guiCreateButton(10, 165, 394, 68, "Login", false, winLogin) guiSetFont(GUIEditor.button[1], "sa-header") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0FEFFD") GUIEditor.label[3] = guiCreateLabel(27, 136, 56, 19, "(máx. 25)", false, winLogin) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 254, 254, 254) GUIEditor.label[4] = guiCreateLabel(27, 67, 56, 19, "(máx. 25)", false, winLogin) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 254, 254, 254) registro = guiCreateButton(11, 240, 393, 66, "Register", false, winLogin) guiSetFont(GUIEditor.button[2], "sa-header") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0FEFFD") showCursor(true) addEvent("onClientGUIClick",registro,function() guiSetVisible(winLogin, false) reg() end) addEvent("onClientGUIClick",btrLoggearse,function() user = guiGetText(usuario) clave = guiGetText(pass) triggerServerEvent("lg",getLocalPlayer(),user,clave) end addCommandHandler("log",login) addEvent("abrirlogin",true) addEventHandler("abrirlogin",getLocalPlayer(),login) y este es el server.lua: function rg(user,clave) if(addAccount(user,clave))then outputChatBox("Regristado correctamente.") triggerClientEvent(source,"cerrar",source) logIn(source,getAccount(user,clave),clave) else outputChatBox("La cuenta ya existe.") end addEvent("rg",true) addEventHandler("rg", getRootElement(),rg) function lg(user,clave) cuenta = getAccount(user,clave) if(cuenta)then logIn(source,getAccount(user,clave),clave) triggerClientEvent(source,"cerrar2",source) else outputChatBox("La cuenta no existe o usuario y/o contraseña incorrectos.") end addEvent("lg",true) addEventHandler("lg", getRootElement(),lg) addEventHandler("onPlayerJoin",getRootElement(),function() triggerClientEvent(source,"abrirlogin",source) end) Saludos y gracias de antemano.
  21. [[Ayuda~ Poner Musica En Login~]]

    Ayuda porfavor como pongo musica en Login Server side: function addNotification(player, text, type) if (player and text and type) then triggerClientEvent(player, 'addNotification', player, text, type); end end function loginPlayer(source, username, password) local account = getAccount ( username ) if ( account ~= false ) then local account = getAccount ( username, password ) if ( account ~= false ) then addNotification(source, "Te has logeado correctamente!", "success") logIn (source, account, password) triggerClientEvent("belepesfunkctsiker", source) else addNotification(source, "Contraseña Incorrecta!", "error") end else addNotification(source, "Contraseña Incorrecta!", "error") end end addEvent("attemptLogin", true) addEventHandler("attemptLogin", getRootElement(), loginPlayer) function registerPlayer(source, username, password) local account = getAccount (username) if (account == false) then local accountAdded = addAccount(tostring(username),tostring(password)) if (accountAdded) then triggerClientEvent("belepesfunkctsikerregisztracio", source) addNotification(source, "Has creado la cuenta correctamente! Logeate para obtener tu nueva cuenta.", "success") else addNotification(source, "Un error a ocurrido!", "error") end else addNotification(source, "Una cuenta con el Username que ingreso ya existe!", "error") end end addEvent("attemptRegister", true) addEventHandler("attemptRegister", getRootElement(), registerPlayer) addEventHandler("onPlayerCommand", root, function(cmd) if cmd == "logout" then cancelEvent() elseif cmd == "register" then cancelEvent() elseif cmd == "login" then cancelEvent() end end) Client Side: local screenWidth, screenHeight = guiGetScreenSize() local page = "http://mta/local/index.html" local initBrowser = guiCreateBrowser(0, 0, screenWidth, screenHeight, true, true, false) local theBrowser = guiGetBrowser(initBrowser) addEventHandler("onClientBrowserCreated", theBrowser, function() loadBrowserURL(source, page) showCursor(true) guiSetInputEnabled(true) addNotification("Porfavor Crea una cuenta o logeate!", "info") end ) function belepesfunkc(UsernameValue, PasswordValue) username = tostring(UsernameValue) password = tostring(PasswordValue) UsernameValue = nil PasswordValue = nil if (string.len(username)<4) then addNotification("Username should be at least 4 characters long.", "warning") elseif (string.len(username)>35) then addNotification("Username not be longer than 35 characters.", "warning") elseif (string.len(password)<4) then addNotification("Password should be at least 4 characters long.", "warning") elseif (string.len(password)>35) then addNotification("Password not be longer than 35 characters.", "warning") else triggerServerEvent("attemptLogin", getRootElement(), getLocalPlayer(), username, password) end end addEvent("belepesfunkc", true) addEventHandler("belepesfunkc", root, belepesfunkc) function belepesfunkct() destroyElement(initBrowser) destroyElement(zene) guiSetInputEnabled(false) showCursor(false) end addEvent("belepesfunkctsiker", true) addEventHandler("belepesfunkctsiker", getLocalPlayer(), belepesfunkct) function belepesfunkctsikerregisztraciohandler() executeBrowserJavascript ( theBrowser, "gotologinfromregister()" ) end addEvent("belepesfunkctsikerregisztracio", true) addEventHandler("belepesfunkctsikerregisztracio", getLocalPlayer(), belepesfunkctsikerregisztraciohandler) function belepesfunkcregisztral(UsernameValue, PasswordValue, PasswordConfirmValue) username = tostring(UsernameValue) password = tostring(PasswordValue) passwordC = tostring(PasswordConfirmValue) UsernameValue = nil PasswordValue = nil PasswordConfirmValue = nil if (string.len(username)<4) then addNotification("El nombre de usuario debe tener al menos 4 caracteres.", "warning") elseif (string.len(username)>35) then addNotification("El nombre de usuario no debe tener más de 35 caracteres.", "warning") elseif (string.len(password)<4) then addNotification("La contraseña debe tener al menos 4 caracteres.", "warning") elseif (string.len(password)>35) then addNotification("La contraseña no debe tener más de 35 caracteres.", "warning") elseif (password ~= passwordC) then addNotification("Las contraseñas no coinciden.", "error") else triggerServerEvent("attemptRegister", getRootElement(), getLocalPlayer(), username, password) end end addEvent("belepesfunkcregisztral", true) addEventHandler("belepesfunkcregisztral", root, belepesfunkcregisztral) local displayWidth, displayHeight = guiGetScreenSize(); local notificationData = {}; local notificationFont = dxCreateFont('files/fonts/roboto.ttf', 12 * 2, false); local iconsFont = dxCreateFont('files/fonts/icons.ttf', 12 * 2, false); addEventHandler('onClientRender', root, function() for k, v in pairs(notificationData) do if (v.State == 'fadeIn') then local alphaProgress = (getTickCount() - v.AlphaTick) / 650; local alphaAnimation = interpolateBetween(0, 0, 0, 255, 0, 0, alphaProgress, 'Linear'); if (alphaAnimation) then v.Alpha = alphaAnimation; else v.Alpha = 255; end if (alphaProgress > 1) then v.Tick = getTickCount(); v.State = 'openTile'; end elseif (v.State == 'fadeOut') then local alphaProgress = (getTickCount() - v.AlphaTick) / 650; local alphaAnimation = interpolateBetween(255, 0, 0, 0, 0, 0, alphaProgress, 'Linear'); if (alphaAnimation) then v.Alpha = alphaAnimation; else v.Alpha = 0; end if (alphaProgress > 1) then notificationData = {}; end elseif (v.State == 'openTile') then local tileProgress = (getTickCount() - v.Tick) / 350; local tilePosition = interpolateBetween(v.StartX, 0, 0, v.EndX, 0, 0, tileProgress, 'Linear'); local tileWidth = interpolateBetween(0, 0, 0, v.Width, 0, 0, tileProgress, 'Linear'); if (tilePosition and tileWidth) then v.CurrentX = tilePosition; v.CurrentWidth = tileWidth; else v.CurrentX = v.EndX; v.CurrentWidth = v.Width; end if (tileProgress > 1) then v.State = 'fixTile'; setTimer(function() v.Tick = getTickCount(); v.State = 'closeTile'; end, string.len(v.Text) * 45 + 5000, 1); end elseif (v.State == 'closeTile') then local tileProgress = (getTickCount() - v.Tick) / 350; local tilePosition = interpolateBetween(v.EndX, 0, 0, v.StartX, 0, 0, tileProgress, 'Linear'); local tileWidth = interpolateBetween(v.Width, 0, 0, 0, 0, 0, tileProgress, 'Linear'); if (tilePosition and tileWidth) then v.CurrentX = tilePosition; v.CurrentWidth = tileWidth; else v.CurrentX = v.StartX; v.CurrentWidth = 0; end if (tileProgress > 1) then v.AlphaTick = getTickCount(); v.State = 'fadeOut'; end elseif (v.State == 'fixTile') then v.Alpha = 255; v.CurrentX = v.EndX; v.CurrentWidth = v.Width; end roundedRectangle(v.CurrentX, 20, 25 + v.CurrentWidth, 25, tocolor(0, 0, 0, 150 * v.Alpha / 255), _, true); dxDrawRectangle(v.CurrentX, 20, 25, 25, tocolor(0, 0, 0, 255 * v.Alpha / 255), true); if (v.Alpha == 255) then dxDrawText(v.Text, v.CurrentX + 25 + 10, 20, v.CurrentX + 25 + 10 + v.CurrentWidth - 20, 20 + 25, tocolor(255, 255, 255, 255), 0.40, notificationFont, 'center', 'center', true, false, true); end if (v.Type == 'error') then dxDrawText('', v.CurrentX + 5, 20, v.CurrentX + 5 + 25 - 10, 20 + 25, tocolor(215, 90, 90, v.Alpha), 0.50, iconsFont, 'center', 'center', false, false, true); elseif (v.Type == 'warning') then dxDrawText('', v.CurrentX + 5, 20, v.CurrentX + 5 + 25 - 10, 20 + 25, tocolor(220, 180, 80, v.Alpha), 0.50, iconsFont, 'center', 'center', false, false, true); elseif (v.Type == 'info') then dxDrawText('', v.CurrentX + 5, 20, v.CurrentX + 5 + 25 - 10, 20 + 25, tocolor(85, 180, 245, v.Alpha), 0.50, iconsFont, 'center', 'center', false, false, true); elseif (v.Type == 'success') then dxDrawText('', v.CurrentX + 5, 20, v.CurrentX + 5 + 25 - 10, 20 + 25, tocolor(80, 205, 105, v.Alpha), 0.50, iconsFont, 'center', 'center', false, false, true); end end end ) addEvent('addNotification', true); function addNotification(text, type) if (text and type) then if (notificationData ~= nil) then table.remove(notificationData, #notificationData); end table.insert(notificationData, { StartX = (displayWidth / 2) - (25 / 2), EndX = (displayWidth / 2) - ((dxGetTextWidth(text, 0.40, notificationFont) + 20 + 25) / 2), Text = text, Width = dxGetTextWidth(text, 0.40, notificationFont) + 20, Alpha = 0, State = 'fadeIn', Tick = 0, AlphaTick = getTickCount(), CurrentX = (displayWidth / 2) - (25 / 2), CurrentWidth = 0, Type = type or 'info' } ); playSoundFrontEnd(11); end end addEventHandler('addNotification', root, addNotification); function roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI) if (x and y and w and h) then if (not borderColor) then borderColor = tocolor(0, 0, 0, 200); end if (not bgColor) then bgColor = borderColor; end --> Background dxDrawRectangle(x, y, w, h, bgColor, postGUI); --> Border dxDrawRectangle(x + 2, y - 1, w - 4, 1, borderColor, postGUI); -- top dxDrawRectangle(x + 2, y + h, w - 4, 1, borderColor, postGUI); -- bottom dxDrawRectangle(x - 1, y + 2, 1, h - 4, borderColor, postGUI); -- left dxDrawRectangle(x + w, y + 2, 1, h - 4, borderColor, postGUI); -- right end end Les agradeceria la ayuda
  22. help

    function loginReguest(player,username,password) local account exports.mysql:_Query("SELECT 'users' WHERE username = " .. username) if (account) then local account = accounts[1] -- local password == accounts["password"] then outputChatBox("Succesfully logged In!") spawnPlayer(player,accounts["posX"],accounts["posY"],accounts["posZ"],accounts["pRot"],accounts["pSkin"],accounts["pInt"],accounts["pDim"]) else outputChatBox("Username or Password is wrong!") end end end triggerClientEvent(player,"showHide", getRootElement() ) end addEvent("logIn",false) addEventHandler("logIn",getRootElement(), loginReguest) I try to figure out the mysql but i dont now i am on the right track ??
  23. Login - Youtube

    Hi, Is there any way to use a youtube video on the login screen? Example: Example
  24. HTML Login panel - Soporte

    Buenas, estoy intentando realizar un panel login mediante HTML con el uso de CEF. La duda que tengo es que quiero, con la ayuda de los input de HTML, al apretar un botón, realizar una función en Lua de MTA, ¿Cómo podría hacerlo? Gracias de antemano.