Jump to content

iFoReX

Members
  • Posts

    1,708
  • Joined

  • Last visited

Everything posted by iFoReX

  1. eem... he estado haciendo un login-register panel con un sistema de cuentas XML que es haci como empezare a hacer todos los scripts que necesiten sistema de guardado, y bueno para empezar tenia que tener las cuentas , pero he tenido problemas con el login-register y no teniendo el login-register no puedo empezar con lo demas asi que porfavor ayudenme aqui los codigos : cl-side label = {} RGUI = guiCreateWindow(0.3703,0.3503,0.2914,0.2695,"Register Panel",true) guiWindowSetMovable(RGUI,false) guiWindowSetSizable(RGUI,false) label[1] = guiCreateLabel(25,47,317,20,"Registrate ya !, asi guardaras datos y todo eso...",false,RGUI) guiSetFont(label[1],"clear-normal") EPassword = guiCreateEdit(21,91,155,32,"",false,RGUI) Registrarme = guiCreateButton(181,90,92,32,"Registrarme !",false,RGUI) label[2] = guiCreateLabel(63,124,76,17,"CONTRASEÑA",false,RGUI) guiSetFont(label[2],"default-bold-small") label[3] = guiCreateLabel(15,149,183,21,"Ve ya a nuestro nuevo Foro ! ...",false,RGUI) label[4] = guiCreateLabel(107,174,171,18,"http://bhzserver.forochile.com",false,RGUI) LGUI = guiCreateWindow(0.4516,0.3112,0.1758,0.1237,"Loguin GUI(60 Sec)",true) guiWindowSetSizable(LGUI,false) Lpassword = guiCreateLabel(20,36,54,19,"Password",false,LGUI) EPasswordL = guiCreateEdit(77,28,137,33,"",false,LGUI) Login = guiCreateButton(16,64,200,22,"Login",false,LGUI) guiSetVisible(RGUI,false) showCursor(false) guiSetVisible(LGUI,false) function clientSubmitaccount ( button, state ) if ( button == "left" and state == "up" ) then local username = getPlayerName( getLocalPlayer() ) local password = guiGetText(EPassword) if ( username and password ) then triggerServerEvent("cuenta", localPlayer, username, password) else outputChatBox("Porfavor pon tu Nick y tu Contraseña.") end end end addEventHandler("onClientGUIClick", Registrarme, clientSubmitaccount, false) addEvent ( "closeLoginGUI", true ) addEventHandler ( "closeLoginGUI", root, function ( ) guiSetVisible ( RGUI, false ) showCursor ( false ) guiSetVisible( LGUI, false ) end ) function clientSubmitLogin ( button, state ) if ( button == "left" and state == "up" ) then triggerServerEvent("archivo", localPlayer, file) local username = xmlNodeGetAttribute( file, "name" ) local password = guiGetText(EPasswordL) if ( username and password ) then triggerServerEvent("submitLoginEM", localPlayer, username, password) else outputChatBox("Porfavor pon tu Nick y tu Contrase?a.") end end end addEventHandler("onClientGUIClick", Login, clientSubmitLogin, false) addEvent("open:LGUI",true) addEventHandler("open:LGUI", root, function() guiSetVisible(LGUI,true) showCursor(true) end ) addEvent("open:RGUI",true) addEventHandler("open:RGUI", root, function() guiSetVisible(RGUI,true) showCursor(true) end ) sv-side addEvent("cuenta", true) addEventHandler("cuenta", root, function ( username, password ) if ( password ~= "" and password ~= nil and username ~= "" and username ~= nil ) then if ( not getAccount ( username ) ) then local accountAdded = addAccount ( username, password ) if ( accountAdded ) then outputChatBox ( "Gracias " .. getPlayerName ( source ) .. ", Ya estas Registrado y loggeado", source ) local file = xmlCreateFile(":lGUI/players"..username .." .xml","root") local node = xmlCreateChild(file,"stats") xmlNodeSetAttribute( node, "name", username ) local check = xmlNodeSetAttribute( node, "pass", password) xmlSaveFile(file) if file then outputChatBox ( "Tu Character se a creado con exito !.", source ) triggerClientEvent ( source, "closeLoginGUI", source ) logIn ( source, xmlNodeGetAttribute( file, "name" ), xmlNodeGetAttribute( file, "pass" ) ) end else outputChatBox ( "Error creando la Cuenta por Favor contacta a un Admin.", source ) end else outputChatBox ( "Esta Cuenta Ya Existe..", source ) end else outputChatBox ( "Porfavor Pon tus datos Correctos.", source ) end end ) function loginHandler(username,password) if ( username ) then local acc = getAccount(username, password) if (acc) then logIn ( source, acc, password ) fadeCamera(source, true) setCameraTarget(source) triggerClientEvent ( source, "closeLoginGUI", source ) outputChatBox("Enjoy your time!", source) else outputChatBox("invalid username and password. Please re-connect and try again.", source) end end end addEvent("submitLoginEM",true) addEventHandler("submitLoginEM",root, loginHandler) addEventHandler("onResourceStart", resourceRoot, function() local username = getPlayerName( source ) local file = xmlLoadFile( ":lGUI/players"..username .." .xml" ) if ( file ) then triggerClientEvent(source, "open:LGUI", source) elseif not ( file ) then triggerClientEvent(source, "open:RGUI", source) end end ) addEvent("archivo", true) addEventHandler("archivo", root, function( file ) local file = xmlLoadFile( ":lGUI/players"..username .." .xml" ) end ) problema en el debugg : ERROR : lGUI\server.lua:53: attemp to concatenate local 'username' ( a boolean value ) ademas ninguna de las 2 GUIs se me abren , gracias de antemano
  2. iFoReX

    Duda simple

    WoW solid alta funcion , la usare para un logo
  3. alexs le das una pagina de lua que esta en ingles y el talvez no sepa mucho ingles aqui una pagina de lua si no sabes mucho ingles. http://www.lua.org/manual/5.1/es/
  4. iFoReX

    Duda simple

    #OT: Buen Logo yakusa , hay algun programa para descomprimir gifs en imagenes ?
  5. iFoReX

    Duda simple

    no se pueden poner gifs en mta
  6. what argument I need put in my xmlSaveFile ? I done it. cl-side label = {} RGUI = guiCreateWindow(0.3703,0.3503,0.2914,0.2695,"Register Panel",true) guiWindowSetMovable(RGUI,false) guiWindowSetSizable(RGUI,false) label[1] = guiCreateLabel(25,47,317,20,"Registrate ya !, asi guardaras datos y todo eso...",false,RGUI) guiSetFont(label[1],"clear-normal") EPassword = guiCreateEdit(21,91,155,32,"",false,RGUI) Registrarme = guiCreateButton(181,90,92,32,"Registrarme !",false,RGUI) label[2] = guiCreateLabel(63,124,76,17,"CONTRASEÑA",false,RGUI) guiSetFont(label[2],"default-bold-small") label[3] = guiCreateLabel(15,149,183,21,"Ve ya a nuestro nuevo Foro ! ...",false,RGUI) label[4] = guiCreateLabel(107,174,171,18,"http://bhzserver.forochile.com",false,RGUI) guiSetVisible(RGUI,false) showCursor(false) addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), function() guiSetVisible(RGUI,true) showCursor(true) end ) function clientSubmitaccount ( button, state ) if ( button == "left" and state == "up" ) then local username = getPlayerName( getLocalPlayer() ) local password = guiGetText(EPassword) if ( username and password ) then triggerServerEvent("cuenta", localPlayer, username, password) else outputChatBox("Porfavor pon tu Nick y tu Contraseña.") end end end addEventHandler("onClientGUIClick", Registrarme, clientSubmitaccount, false) addEvent ( "closeLoginGUI", true ) addEventHandler ( "closeLoginGUI", root, function ( ) guiSetVisible ( RGUI, false ) showCursor ( false ) end ) sv-side addEvent("cuenta", true) addEventHandler("cuenta", root, function ( username, password ) if ( password ~= "" and password ~= nil and username ~= "" and username ~= nil ) then if ( not getAccount ( username ) ) then local accountAdded = addAccount ( username, password ) if ( accountAdded ) then outputChatBox ( "Gracias " .. getPlayerName ( source ) .. ", Ya estas Registrado ahora loggeate", source ) local character = xmlCreateFile(""..username..".xml",username) xmlSaveFile(character) if ( character ) then outputChatBox ( "Tu Character se a creado con exito !.", source ) triggerClientEvent ( source, "closeLoginGUI", source ) end else outputChatBox ( "Error creando la Cuenta por Favor contacta a un Admin.", source ) end else outputChatBox ( "Esta Cuenta Ya Existe..", source ) end else outputChatBox ( "Porfavor Pon tus datos Correctos.", source ) end end )
  7. iFoReX

    Dudas

    setElementFrozen ?
  8. iFoReX

    Dudas

    eso ya lo he intentado y realmente nose como hacerlo a mi se me cae el ped :c pero ahora que hablamos de esto me he acordado de una funcion setPedGravity creo que eso funcionara
  9. y para que usarias un trigger en ese caso ?, puedes usar onClientMarker, pero si quieres usar un trigger, podrias triggear un evento server-side en una funcion client-side
  10. iFoReX

    Ayudaaaaaa

    por lo que veo tiene solo algunos errores 1. para que y que es 'playerName' ? 2. para que poner 3 if si en 1 if puedes hacer todos esos con 'and's
  11. iFoReX

    Dudas

    mm... ya que no entiendes como usar setElementInterior podrias usar esto ... setCameraInterior
  12. iFoReX

    Ayudaaaaaa

    podrias hacer un setPlayerTeam( getPlayerFromName( sourcePlayer ) )
  13. iFoReX

    Dudas

    1.yo he usado esto : setCameraTarget(getLocalPlayer()) 2. Si. 3. setElementInterior + setElementDimension
  14. Ok, pero... descargaste e instalaste lo que te dije ?, ese es el primer problema los necesitas tener
  15. Buee yo tengo mta paradise en un server y hize esto libMySQL.dll esto lo pones en c:\program files\MTA San Andreas\server mta_mysql.dll esto lo pones en c:\program files\MTA San Andreas\server\mods\deathmach\modules Necesitas tener XAMPP, si lo tienes te creas una base de datos en http://localhost/phpmyadmin y luego editas el resource sql por ejemplo mi resource sql esta asi local server = get( "server" ) or "localhost" -- server local user = get( "user" ) or "root" -- username local password = get( "password" ) or "" -- password local db = get( "database" ) or "ElMota" -- database local port = get( "port" ) or 3306 local socket = get( "socket" ) or nil espero averte ayudado
  16. y para que pones el evento onResourceStart ?, ademas la funcion cancelar no existe u.u
  17. lol pero si quieres una IMG necesitas usar posiciones 2d no es tan simple como poner outputChatBox e.e, y lo puedes hacer con guiCreateStaticImagen ó dxDrawImage
  18. he cambiado variables ya varias veces pero me sigue el error :c, porque esto ? calGUI = {} E = {} B = {} calGUI[1] = guiCreateWindow(0.3211,0.3222,0.3375,0.2806,"GUI Calculadora",true) guiWindowSetSizable(cGUI,false) E.Numero[1] = guiCreateEdit(9,30,171,32,"",false,calGUI) E.Signo = guiCreateEdit(185,29,58,35,"",false,calGUI) guiEditSetReadOnly(E.Signo,true) E.Numero[2] = guiCreateEdit(250,30,171,32,"",false,calGUI) E.Resultado = guiCreateEdit(9,66,414,35,"",false,calGUI) guiEditSetReadOnly(E.Resultado,true) B = guiCreateButton(326,105,97,41,"Resultado",false,calGUI) B.S = guiCreateButton(9,109,58,36,"+",false,calGUI) B.R = guiCreateButton(70,109,58,36,"-",false,calGUI) B.M = guiCreateButton(70,148,58,36,"X",false,calGUI) B.D = guiCreateButton(9,147,58,36,"/",false,calGUI) guiSetVisible(calGUI,false) showCursor(false) bindKey("c","down", function() if getKeyState("lctrl") then guiSetVisible(calGUI, not guiGetVisible(calGUI)) showCursor(guiGetVisible(calGUI)) end end )
  19. iFoReX

    Correr

    lol 3 cosas 1. se pueden hacer muchas cosas scripteando 2. lo de la bandana la puedes cambiar con archivos .txd, dff, engineReplaceModel 3. no doble postees
  20. lol, el chatbox no funciona asi necesitas poner las posiciones 2d
  21. lol, primero aprende la sintaxis , eso lo copiaste de 2 resources, necesitas poner en donde ira la imagen creo
  22. seguro que no pasa nada e.e ?
  23. bueno, quiero hacer un pmGUI, voy en todo bien, pero tengo 1 problema :c, como hacer para que el player seleccionado en un grid vea los mensajes ? Grid = {} PMGui = guiCreateWindow(0.3258,0.1444,0.5039,0.7042,"PM System GUI",true) guiWindowSetMovable(PMGui,false) guiWindowSetSizable(PMGui,false) Grid.PM = guiCreateGridList(9,37,627,397,false,PMGui) CMensajes = guiGridListAddColumn(Grid.PM,"mensajes",0.2) ESend = guiCreateEdit(11,440,509,39,"",false,PMGui) BSend = guiCreateButton(521,442,107,35,"Enviar !",false,PMGui) PlayersGUI = guiCreateWindow(0.1602,0.1444,0.1664,0.5028,"Players",true) guiWindowSetMovable(PlayersGUI,false) guiWindowSetSizable(PlayersGUI,false) Grid.P = guiCreateGridList(9,23,195,330,false,PlayersGUI) CJugadores = guiGridListAddColumn(Grid.P,"Jugadores",0.-- s8) --> guiSetVisible(PMGui,false) guiSetVisible(PlayersGUI,false) showCursor(false) setTimer( function() local limpiado = guiGridListClear( Grid.P ) if ( limpiado ) and ( CJugadores ) then for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( Grid.P ) guiGridListSetItemText ( Grid.P, row, CJugadores, getPlayerName ( playeritem ), false, false ) end end end, 100, 0 ) bindKey("F7","down", function() guiSetVisible(PMGui, not guiGetVisible(PMGui)) guiSetVisible(PlayersGUI, not guiGetVisible(PlayersGUI)) showCursor(guiGetVisible(PMGui)) end ) addEventHandler("onClientGUIClick", root, function() if source == BSend then local row = guiGridListAddRow ( Grid.PM ) guiGridListSetItemText ( Grid.PM, row, CMensajes, ""..getPlayerName ( localPlayer ).." : "..guiGetText(ESend).."", false, false ) end end )
  24. iFoReX

    Tema pasado

    me refiero en la linea de la funcion ejemplo : function BlaBla() --- y en el parentesis especificarlo
×
×
  • Create New...