Jump to content

Homer Simpson

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by Homer Simpson

  1. Un buen aporte ya que habrás ayudado seguramente a gente le fueran a estafar (Aún que sea una cantidad pequeña o grande) y una pena llegar a esté punto publicando una GM (Aún que esté compilada) por gente sin vida. ¡Suerte! - Homer Simpson
  2. (Pantalla negra al entrar al servidor.) Sí estaría solucionado la MySQL debería de ir bien, fíjate de nuevo en todo y mira que esté todo bien. Por que yo cuando usaba de GM me daba ese falló y era por la base de datos (MySQL). > Ese error ya lo pude solucionar ahora me tira error el panel de login ¿A qué error te refieres? ¿Le diste permisos en el ACL? Sí me puedes especificar tu error más a detalle te podré ayudar más a fondo.
  3. Si buscas uno de pago para X sistemas te recomiendo a https://forum.multitheftauto.com/profile/47606-aka-blue/ maneja mucho del tema.
  4. No entiendo usa cosa, en esté post está gratis y fuiste tu mismo quien lo publico, wtf? Con mismo link de video y todo...
  5. Yes, i use that but IN GAME it shows all the time the same ID (1) and i need the textID to delete it more faster
  6. It works now but i need to put : /createtext [Something there] [text] and then it works but the ID all the time it´s 1 and in the DB shows the good ID but IN GAME not.
  7. Well, I explain I am trying to make a system in environments on my server but I have 2 problems and they are the following: Not detecting the ID and the text, the ID is inserted in the database but the text is not. I hope you can help me, thanks. CODE : local elements = { } local function loadText( id, text, x, y, z, interior, dimension ) local element = createElement( "3dtext" ) setElementPosition( element, x, y, z ) setElementInterior( element, interior ) setElementDimension( element, dimension ) setElementData( element, "text", tostring( text ) ) elements[ id ] = element end addEventHandler( "onResourceStart", resourceRoot, function( ) local result = dbPoll(dbQuery(handler, "SELECT * FROM 3dtext ORDER BY textID ASC" ),-1) if result then for key, data in ipairs( result ) do loadText( data.textID, data.text, data.x, data.y, data.z, data.interior, data.dimension ) end end end ) local function createtext(player,cmd,textID,...) if GetElementData(player,"AdminLvl", 5) then local text = table.concat( { ... }, " " ) local x, y, z = getElementPosition( player ) local insertid = dbExec ( handler, "INSERT INTO `3dtext`(`text`, `x`, `y`, `z`, `interior`, `dimension`) VALUES (?,?,?,?,?,?)", text, x, y, z, getElementInterior( player ),getElementDimension( player ) ) if insertid then loadText( insertid, text, x, y, z, getElementInterior( player ), getElementDimension( player ) ) outputChatBox( "Text created. (ID " .. insertid .. ")", player, 0, 255, 0 ) else outputDebugString( e ) outputChatBox( "Error MYSQL.", player, 255, 0, 0 ) end else outputChatBox( "Command: /" .. cmd .. " [text]", player, 255, 255, 255 ) end end addCommandHandler("createtext",createtext) (Sorry for my bad english) In the debugscript show´s me this error : In the line 37 : attempt to concatenate local 'insertid' (a boolean value) And this is how it create : https://imgur.com/2Je5B9T
  8. Bueno, os explico estoy intentando hacer un sistema en entornos en mi servidor pero tengo 2 problemas y son los siguientes : No detecta la ID y el texto, la ID se inserta en la base de datos pero el texto no. Espero que puedan ayudarme, gracias. local elements = { } local function loadText( id, text, x, y, z, interior, dimension ) local element = createElement( "3dtext" ) setElementPosition( element, x, y, z ) setElementInterior( element, interior ) setElementDimension( element, dimension ) setElementData( element, "text", tostring( text ) ) elements[ id ] = element end addEventHandler( "onResourceStart", resourceRoot, function( ) local result = dbPoll(dbQuery(handler, "SELECT * FROM 3dtext ORDER BY textID ASC" ),-1) if result then for key, data in ipairs( result ) do loadText( data.textID, data.text, data.x, data.y, data.z, data.interior, data.dimension ) end end end ) local function createxto(player,cmd,textID,...) if GetElementData(player,"NivelAdmin", 5) then local text = table.concat( { ... }, " " ) local x, y, z = getElementPosition( player ) local insertid = dbExec ( handler, "INSERT INTO `3dtext`(`text`, `x`, `y`, `z`, `interior`, `dimension`) VALUES (?,?,?,?,?,?)", text, x, y, z, getElementInterior( player ),getElementDimension( player ) ) if insertid then loadText( insertid, text, x, y, z, getElementInterior( player ), getElementDimension( player ) ) outputChatBox( "Texto creado. (ID " .. insertid .. ")", player, 0, 255, 0 ) else outputDebugString( e ) outputChatBox( "Error MYSQL.", player, 255, 0, 0 ) end else outputChatBox( "Comando: /" .. cmd .. " [texto]", player, 255, 255, 255 ) end end addCommandHandler("creartextoentorno",createxto) En el debugscript me da el siguiente error : Que en la línea 37 : attempt to concatenate local 'insertid' (a boolean value) Y así es como se crea : https://imgur.com/2Je5B9T
  9. Claro, dime una parte por donde poder hablar y te ayuda encantadamente.
  10. Si aún sigues necesitando ayuda, te podría ayudar mediante discord.
  11. Muchas gracias @DBY conseguí hacerlo y funciona perfectamente, gracias por el emjoncito me sirvio muchisimo, gracias por todo a todos
  12. ¿Alguien que sepa de paradise, sabe si se puede poner una imagen en el scoreboard? Es porque llevo intentadolo con dxDrawImage y no funciona. { type = "label", text = "In my World", prueba = dxDrawImage( "images/gui/info.png", 0, 0, 0, tocolor( 255, 255, 255, 255 ), true ), scale = 0.6, alignX = "center", }, No manejo mucho de scripting y ando escaso de dinero porque si no lo pagaría sin problemas el script, agradezco todas respuestas. PD : Uso paradise de mabuko
  13. ¡Gracias chicos, ya consegui solucionarlo gracias por los consejos y vuestra ayuda @aka Blue @Calculador . Si algun dia necesitais ayuda con algo, no olvideis contar conmigo, aunque no soy buen en el tema del scripting ?
  14. Sigo teniendo ahora un error y es el siguiente : Ahora cuando le doy a crear no me sale ningun texto de error como(no has introducido ninguna edad, la edad minima es de 18 años, etc... En caso de responder este texto, gracias.
  15. Increible el servidor y increibles ustedes, les deseo muchisima suerte con el servidor , y el texto "Si alguno de nuestros sistemas te gustan o te gustaría tener algo parecido en tu servidor, estoy a tu servicio para ayudarte de manera gratuita, no dejemos que la poca comunidad de este juego muera, creemos competición sana a base de méritos.¡No tengas pena en contactarme! Hagamos lo posible por mantener una comunidad libre de toxicidad" Me dejo impresionado ya que teneniendo un servidor desean ayudar a otra gente gratuitamente. Le veo mucho futuro a vuestro servidor y os deseo lo mejor. ? ATT : Homer Simpson
  16. Hello, good day. I have a problem whit a script. Im starting in the theme of scripting in MTA:SA and, well, if you can help me, i would really appreciate it. Well the problem comes here (I use the gamemode of paradise) That when I try to create another character, when putting age, nationality and stature always tells me Your minimum age can only be 18 years old. I have, one more question, would it be possible that only specific nationalities can be written? Thank you very much in case you answer and read this. Sorry for my bad english.
  17. Soy nuevo con el tema del Scripting, llevo 2 días intentando hacer lo de la edad y sigo sin caer en que usar, si me pudieses ayudar con el codigo te lo agradeceria mucho. local function tryCreate( key ) local name = destroy["g:createcharacter:name"] and guiGetText( destroy["g:createcharacter:name"] ) local edad = destroy["g:createcharacter:edad"] and guiGetText( destroy["g:createcharacter:edad"] ) local nacionalidad = destroy["g:createcharacter:nacionalidad"] and guiGetText( destroy["g:createcharacter:nacionalidad"] ) local estatura = destroy["g:createcharacter:estatura"] and guiGetText( destroy["g:createcharacter:estatura"] ) local error = verifyCharacterName( name ) or verifySkin( selectedSkin ) or verifyEdad( edad ) or verifyNacionalidad( nacionalidad ) or verifyEstatura( estatura ) if not error then triggerServerEvent( "gui:createCharacter", getLocalPlayer( ), name, selectedSkin, edad, nacionalidad, estatura ) else setMessage( error ) end end Ese es el codigo del tryCreate, en players>main.Lua ya puse lo necesario para que se guardase y funccionase. El unico error que tengo es en los siguientes verify : function verifyEdad( edad ) if not edad then return "No has una edad." elseif #edad < 18 then return "Tu edad minima solo puede ser de 18 años." elseif #edad >= 99 then return "Tu edad maxima solo puede ser 99 años." elseif tonumber(text) then return "No puedes usar letras" elseif foundSpace then return "No puedes usar espacios" end end function verifyNacionalidad( nacionalidad ) if not nacionalidad then return "No has puesto una nacionalidad" elseif not tonumber(text) then return "No tienes ninguna letra escrita" elseif nacionalidad and type(nacionalidad) == "number" then return "No puedes usar numeros" end end function verifyEstatura( estatura ) if not estatura then return "No has una estatura." elseif #estatura >= 200 then return "Tu estatura maxima solo puede ser de 200 CM." elseif #estatura < 140 then return "Tu estatura minima solo puede ser de 140 CM." elseif tonumber(text) then return "No puedes usar letras" elseif foundSpace then return "No puedes usar espacios" end end
  18. Ahora al registarme, me deja registrarme sin completar los campos : Edad, Nacionalidad y Estatura
×
×
  • Create New...