Jump to content

Search the Community

Showing results for tags 'login'.

  • 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
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Member Title


Gang


Location


Occupation


Interests

  1. Github: https://github.com/ala-zul/sparrow-login-screen
  2. DINGO_FF

    help?

    i made a login panel and every think works but how can i make an intro like photo with music not a video when first register
  3. A kérdés a következő lenne, hogy birnék az accountData-ba a játékos által beírt szöveget megadni. Benne van a scriptben amit Worthless is csinált (direkt letöltöttem és bemásoltam azt a részt), de úgy sem jó. local sx, sy = guiGetScreenSize(); local relX, relY = sx/1680, sy/1050; local isPanelVisible = true; local panelState = "1"; -- 1 = Bejelentkezés, 2 = Regisztráció, 3 = Karakter létrehozás showCursor(true); setPlayerHudComponentVisible("all", false); showChat(true); local panelPosition = {0.79, 0.25}; local buttonColors = { [1] = tocolor(210, 155, 65, 150); [2] = tocolor(207, 83, 52, 150); }; local headerText = ""; local accountData = { -- Beviteli mezők tartalma [1] = { -- Bejelentkezés [1] = "", -- Felhasználónév [2] = "", -- Jelszó }, [2] = { -- Regisztráció [1] = "", -- Felhasználónév [2] = "", -- Jelszó [3] = "", -- E-Mail }, }; local dataPointer = false; addEventHandler("onClientRender", root, function() dxDrawRectangle( sx*panelPosition[1], sy*panelPosition[2], relX*300, relY*500, tocolor( 0, 0, 0, 150 ) ); dxDrawRectangle( sx*panelPosition[1], sy*panelPosition[2], relX*5, relY*500, tocolor( 210, 155, 65, 255 ) ); dxDrawText("ViolantGaming", sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.005), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.05), tocolor( 210, 155, 65, 255 ), relX*2, relY*2, "default-bold", "center"); dxDrawText(headerText, sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.03), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.6), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); -- Login felület if (panelState == "1") then headerText = "Bejelentkezés"; -- Felhasználónév dxDrawText("Felhasználónév", sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.075), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.07), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); --dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.2), relX*275, relY*50, tocolor( 255, 255, 255, 255)); dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.1), relX*275, relY*50, tocolor( 95, 95, 95, 150 ) ); -- // Felső mező \\ -- if (panelState == "1") then -- Bejelentkező ablak if (dataPointer == 1) then -- Mező kijelölve dxDrawText(accountData[1][1].."|", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.11), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9),tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); else if (accountData == "") then else text = string.rep("*", string.len(accountData[2][2])); dxDrawText(accountData[1][1], sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.11), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); end end end dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.2), relX*275, relY*50, tocolor( 95, 95, 95, 150 ) ); dxDrawText("Jelszó", sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.175), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.07), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); -- // Bejelentkezés : Jelszó \\ -- if (panelState == "1") then -- Regisztrációs ablak local text; if (dataPointer == 2) then -- Mező kijelölve text = string.rep("*", string.len(accountData[1][2])); dxDrawText(accountData[1][2].."|", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.21), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); else if (accountData == "") then else dxDrawText(accountData[1][2], sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.21), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); end end end dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.34), relX*275, relY*50, buttonColors[1]); -- Bejelentkező gomb dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.40), relX*275, relY*50, buttonColors[2]); -- Regisztrációs gomb dxDrawText("Bejelentkezés", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.35), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*2, relY*2, "default-bold", "center"); dxDrawText("Regisztráció", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.41), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*2, relY*2, "default-bold", "center"); elseif (panelState == "2") then headerText = "Regisztráció"; -- Felhasználónév dxDrawText("Felhasználónév", sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.075), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.07), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.1), relX*275, relY*50, tocolor( 95, 95, 95, 150 ) ); -- // Felhasználónév : Regisztráció \\ -- if (panelState == "2") then -- Regisztrációs ablak if (dataPointer == 1) then -- Mező kijelölve dxDrawText(accountData[2][1].."|", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.11), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); else if (accountData == "") then else dxDrawText(accountData[2][1], sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.11), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); end end end -- // Regisztrációs ablak : Jelszó \\ -- dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.18), relX*275, relY*50, tocolor( 95, 95, 95, 150 ) ); dxDrawText("Jelszó", sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.16), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.07), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); if (panelState == "2") then -- Regisztrációs ablak local text; if (dataPointer == 2) then -- Mező kijelölve text = string.rep("*", string.len(accountData[2][2])); dxDrawText(text.."|", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.19), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); else if (accountData == "") then else text = string.rep("*", string.len(accountData[2][2])); dxDrawText(text, sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.19), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); end end end dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.26), relX*275, relY*50, tocolor( 95, 95, 95, 150 ) ); dxDrawText("E-Mail", sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.24), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.07), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); if (panelState == "2") then -- Regisztrációs ablak if (dataPointer == 3) then -- Mező kijelölve dxDrawText(accountData[2][3].."|", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.27), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); else if (accountData == "") then else dxDrawText(accountData[2][3], sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.27), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); end end end dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.34), relX*275, relY*50, buttonColors[1]); -- Regisztrációs gomb dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.40), relX*275, relY*50, buttonColors[2]); -- Vissza gomb dxDrawText("Regisztráció", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.35), sx*(panelPosition[1]+0.175), sy*(panelPosition[2]+0.34), tocolor( 255, 255, 255, 255 ), relX*2, relY*2, "default-bold", "center"); dxDrawText("Visszalépés", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.41), sx*(panelPosition[1]+0.175), sy*(panelPosition[2]+0.34), tocolor( 255, 255, 255, 255 ), relX*2, relY*2, "default-bold", "center"); end end); addEventHandler("onClientCursorMove", root, function (cX, cY) if (isPanelVisible) then if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.34) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.39) ) then -- Gombon van a kurzor buttonColors[1] = tocolor(210, 155, 65, 255); else -- Nincs a gombon a kurzor buttonColors[1] = tocolor(210, 155, 65, 150); end if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.40) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.45) ) then -- Gombon van a kurzor buttonColors[2] = tocolor(207, 83, 52, 255); else -- Nincs a gombon a kurzor buttonColors[2] = tocolor(207, 83, 52, 150); end end end); addEventHandler("onClientClick", root, function(button, state) if (isPanelVisible) then local cX, cY = getCursorPosition(); if ( ( button == "left" ) and ( state == "down" ) ) then if (panelState == "1") then if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.1) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.15) ) then dataPointer = 1; end if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.2) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.25) ) then dataPointer = 2; end elseif (panelState == "2") then if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.1) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.15) ) then dataPointer = 1; end if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.16) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.22) ) then dataPointer = 2; end if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.27) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.31) ) then dataPointer = 3; end end if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.34) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.39) ) then if ( panelState == "1" ) then execLogin(); elseif ( panelState == "2" ) then execRegister(); end end if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.40) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.45) ) then if ( panelState == "1" ) then panelState = "2"; elseif ( panelState == "2" ) then panelState = "1"; end end end end end ); addEventHandler("onClientCharacter", resourceRoot, function(char) if (isPanelVisible == true) then if (dataPointer > 0) then accountData[panelState][dataPointer] = accountData[panelState][dataPointer][char] end end end ); function execLogin() outputChatBox("Bejelentkező gomb működik!"); end function execRegister() outputChatBox("Regisztrációs gomb működik!"); end
  4. Como fasso para tirar o chat T na tela de login Do Meu servidor, Pois no login se O user tiver letra t ele abre o chat E solta binds sozin E tambem Fica apertando os outros paineis Por exemplo O painel de estilo de andar na Letra U se o user ou senha Tiver u ele fica abrindo o painel Alguem Pode me falar como proceder?
  5. Opa, então sou novo na programação .lua e queria saber se alguém, tenha algum sistema de login básico para que eu possa estudar como funciona e tals... Desde já agradeço :D
  6. Ola pessoal, sou novo no blog mas estou fazendo um server freeroam e queria uma ajuda para colocar um limite de contas registradas por serial ja tentei algumas funções mas ate agora nada, pfv me ajudem preciso muito dessa função funcionando no painel de login codigo server: addEvent("onRequestLogin",true) addEventHandler("onRequestLogin",resourceRoot, function(username,password,checksave) if not (username == "") then if not (password == "") then local account = getAccount ( username, password ) if ( account ~= false ) then logIn(client,account,password) triggerClientEvent (client,"onClientPlayerLogin",resourceRoot) if checksave and checksave == "1" then triggerClientEvent(client,"useLoginFile",resourceRoot,"set",username,password) else triggerClientEvent(client,"useLoginFile",resourceRoot,"remove",username,password) end else triggerClientEvent(client,"setNotification",resourceRoot,"Errado Nome De Usuário Ou Senha!") end else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Digite Sua Senha!") end else triggerClientEvent(client,"setNotification",resourceRoot,"Digite Seu Nome De Usuário!") end end ) addEvent("onRequestRegister",true) addEventHandler("onRequestRegister",resourceRoot, function(username,password,repassword,serial) if #getAccountsBySerial(serial) == 2 then triggerClientEvent(client,"setNotification",resourceRoot,"Voce Ja Tem 2 Contas Registradas Nesse Serial!") else addAccount() if not (username == "") then if not (password == "") then if not (repassword == "") then if password == repassword then local account = getAccount (username) if (account == false) then local accountAdded = addAccount(tostring(username),tostring(password)) if (accountAdded) then logIn(client,accountAdded,password) triggerClientEvent(client,"onClientPlayerLogin",resourceRoot) triggerClientEvent(client,"useLoginFile",resourceRoot,"set",username,password) outputChatBox("*Logado Com Sucesso! ( Nome de Usuário: #ee8a11" .. username .. " #FFFFFF| Senha: #ee8a11" .. password .. "#FFFFFF )",client,255,255,255,true) else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Escolha Uma Conta E/Ou Senha Diferente") end else triggerClientEvent(client,"setNotification",resourceRoot,"Uma Conta Com Esse Nome De Usuario Ja Existe!") end else triggerClientEvent(client,"setNotification",resourceRoot,"As Senhas Não Coincidem!") end else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Confirme Sua Senha!") end else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Insira Uma Senha Para Criar Sua Nova Conta!") end else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Insira Um Nome De Usuario Para Criar Sua Conta!") end end end ) Erro dado no console: https://imgur.com/a/JlBwzt9 PFV ME AJUDEM ESTOU CRIANDO UM SERVER DE FREEROAM!
  7. Hola buenas necesito un panel login que cuando le des a registra te salte un tes de rp para un servidor chileno si alguien me ayuda seria fantástico gracias .
  8. Merhaba Türk kardeşlerim. Başlıkta da yazdığı gibi owl scriptleri üzerine login panele nasıl müzik koyabilirim.
  9. Alguém sabe como devo fazer uma tela de login que deixa o usuário registrar apenas uma conta, e setar o nome que ele colocou no login como nome de user?
  10. Estoy siguiendo este tutorial. Al momento, tengo esto: El script está ubicado dentro de una carpeta ("client"), y el archivo se llama "gui.Lua". El meta.xml está editado de tal manera que vaya a buscar el script a cliente/gui.Lua. He reducido el script a elementos más simples para testear las partes. Al momento, solo tengo habilitada la ventana; todo el resto está removido. No funciona. No tengo errores en la consola, pero tampoco tengo una ventana en el juego. ¿Es posible que el tutorial tenga errores o esté desactualizado? ¿El error lo estoy cometiendo yo? ¿Cómo lo puedo arreglar? Descubrí que tengo muchos errores y elementos faltantes. No pude encontrar alguna función para eliminar el post.
  11. Como tirar Mensagen quando loga tao chata login: You successfully logged in
  12. 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.multitheftauto.com/index.php?p=resources&s=details&id=13930 Exports: -- To Be Updated.. exports.login:getPlayerUsername(player) -- Gets Player Username.
  13. Olá, estava fazendo um painel de inicio e queria que ele rodasse um video não uma imagem e eu fiz está função: local sW, sH = guiGetScreenSize() local x, y = (sW/1366), (sH/768) local font = dxCreateFont("font.ttf", x*15) editBox = {} editBox.__index = editBox editBox.instances = {} function onClientResourceStart() tick = getTickCount() g = {} g.user = editBox.new() showCursor(true) showChat(false) setPlayerHudComponentVisible("all", false) addEventHandler("onClientRender", root, dxLoginS) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onClientResourceStart) function dxLoginS() end local browser = guiCreateBrowser( 0, 0, sW, sH, false, false, false) local theBrowser = guiGetBrowser( browser ) addEventHandler( "onClientBrowserCreated", theBrowser, function() loadBrowserURL( source, "https://www.youtube.com/watch?v=S0kWGy_XfMI" ) end) function editBox.new() local self = setmetatable({}, editBox) self.text = "" self.maxLength = 15 self.scale = y*0.8 self.state = "normal" self.font = font self.color = {255,255,255,220} self.textColor = {255,255,255,220} table.insert(editBox.instances, self) return self end function editBox:getPosition(x,y,w,h) return self.x, self.y, self.w, self.h end function editBox:setPosition(x,y,w,h) self.x, self.y, self.w, self.h = x,y,w,h return true end function dxDrawBorder(posX, posY,posW,posH,color,scale) dxDrawLine(posX, posY, posX+posW, posY, color, scale,false) dxDrawLine(posX, posY, posX, posY+posH, color, scale,false) dxDrawLine(posX, posY+posH, posX+posW, posY+posH, color, scale,false) dxDrawLine(posX+posW, posY, posX+posW, posY+posH, color, scale,false) end function isCursorOnElement(x, y, w, h) if (not isCursorShowing) then return false end local sx, sy = guiGetScreenSize() local cx, cy = getCursorPosition local cx, cy = (cx*sx), (cy*sy) if (cx >= x and cx <= x + w) and (cy >= y and cy <= y + h) then return true else return false end end Até ai tudo bem, ele abre o video e tals mas oque eu quero é que ele abra o video já em tela cheia e não igual ao youtube com a logo outros vídeos essas coisas, somente este video mas quando eu dou start nele ele abre ja em tela cheia se poderem me ajudar fico muito grato...
  14. 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 )
  15. 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 я узнал, что многое другое, что я пропустил часть панели входа в систему, и я хотел узнать, можете ли вы объяснить, как я могу создать
  16. 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
  17. 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
  18. 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
  19. 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.
  20. 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)
  21. 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.
  22. #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 ?
  23. How can I add music to the login panel. My english :~, I apologize for this.
  24. 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?????
  25. 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.
×
×
  • Create New...