Julian09123 Posted July 16, 2015 Posted July 16, 2015 Hola amigos hace tiempo que no scripteaba Tengo un problema, no puedo hacer que un texto que esta en .txt se ponga en un DxDrawText el error que me tira es: DxDrawText Argumento 1, boolean como cien veces ----texto jugar ---- dxDrawText(jugar, 19, 96, 781, 468, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) local jugar = fileOpen("texts/Jugar.txt", true) Tengo mas pero no lo pondre. Seguramente estoy haciendo algo mal, como lo puedo abrir y que se ponga el texto en ese Dx? Skype: Juliang09123
John Smith Posted July 16, 2015 Posted July 16, 2015 local file = fileOpen("texts/Jugar.txt", true) local jugar = fileRead(file, fileGetSize(file)) dxDrawText(jugar, 19, 96, 781, 468, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) If you find my post useful or if it helped you, please like my post Ingame name: ZoeN
UserToDelete Posted July 16, 2015 Posted July 16, 2015 Porque la funcion es fileRead, fileOpen es simplemente un handling local file = fileOpen("test.txt") local content = fileRead(file, fileGetSize(file))
Julian09123 Posted July 16, 2015 Author Posted July 16, 2015 Listo Gracias a todos! funciono pero el texto es muy grande y se pasa de mi dxRectangle hay alguna forma de que el texto no se pase ? EJ: Texto ---> Blabllblblbalablalbasdsdasd Recta----> _____________ ( asi me queda en el script ) y despues de tener el panel unos 2 min el texto desaparece Skype: Juliang09123
John Smith Posted July 16, 2015 Posted July 16, 2015 dxDrawText clip = true wordBreak = true dxDrawText(jugar, 19, 96, 781, 468, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", true, true, true, false, false) If you find my post useful or if it helped you, please like my post Ingame name: ZoeN
Julian09123 Posted July 16, 2015 Author Posted July 16, 2015 Funciona pero hay otro problema :c Al mantener abierto el panel un 1 minuto el texto desaparece y cuando le doy a f2 de nuevo sigue desaparecido y tampoco aparece todo el texto esta cortado Skype: Juliang09123
Tomas Posted July 16, 2015 Posted July 16, 2015 Funciona pero hay otro problema :cAl mantener abierto el panel un 1 minuto el texto desaparece y cuando le doy a f2 de nuevo sigue desaparecido y tampoco aparece todo el texto esta cortado ¿Adivinamos el código? Currently developing for International Gaming Community - Join us!
Julian09123 Posted July 16, 2015 Author Posted July 16, 2015 este es function content () dxDrawLine(6 - 1, 82 - 1, 6 - 1, 529, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(795, 82 - 1, 6 - 1, 82 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(6 - 1, 529, 795, 529, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(795, 529, 795, 82 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(6, 82, 789, 447, tocolor(102, 0, 0, 255), false) ---- rectangulo fondo medio ---- dxDrawLine(6 - 1, 15 - 1, 6 - 1, 80, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(795, 15 - 1, 6 - 1, 15 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(6 - 1, 80, 795, 80, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(795, 80, 795, 15 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(6, 15, 789, 65, tocolor(79, 0, 0, 255), false) --- rectangulo arriba ---- dxDrawText("FullGamez Panel De Ayuda", 36 - 1, 37 - 1, 361 - 1, 72 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("FullGamez Panel De Ayuda", 36 + 1, 37 - 1, 361 + 1, 72 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("FullGamez Panel De Ayuda", 36 - 1, 37 + 1, 361 - 1, 72 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("FullGamez Panel De Ayuda", 36 + 1, 37 + 1, 361 + 1, 72 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("FullGamez Panel De Ayuda", 36, 37, 361, 72, tocolor(167, 9, 9, 255), 2.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawLine(36, 20, 36, 82, tocolor(1, 0, 0, 64), 1, false) dxDrawLine(361, 20, 361, 82, tocolor(1, 0, 0, 81), 1, false) ---dxDrawImage(672, 18, 118, 62, ":Tienda/Imagenes/Logo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawLine(169 - 1, 486 - 1, 169 - 1, 529, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(304, 486 - 1, 169 - 1, 486 - 1, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(169 - 1, 529, 304, 529, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(304, 529, 304, 486 - 1, tocolor(113, 0, 0, 215), 1, false) dxDrawRectangle(169, 486, 135, 43, tocolor(0, 0, 0, 145), false) ---- Juego--- dxDrawLine(330 - 1, 486 - 1, 330 - 1, 529, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(465, 486 - 1, 330 - 1, 486 - 1, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(330 - 1, 529, 465, 529, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(465, 529, 465, 486 - 1, tocolor(113, 0, 0, 215), 1, false) dxDrawRectangle(330, 486, 135, 43, tocolor(0, 0, 0, 145), false) ----Radio---- dxDrawLine(495 - 1, 486 - 1, 495 - 1, 529, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(630, 486 - 1, 495 - 1, 486 - 1, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(495 - 1, 529, 630, 529, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(630, 529, 630, 486 - 1, tocolor(113, 0, 0, 215), 1, false) dxDrawRectangle(495, 486, 135, 43, tocolor(0, 0, 0, 145), false)----Comandos---- dxDrawLine(660 - 1, 486 - 1, 660 - 1, 529, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(795, 486 - 1, 660 - 1, 486 - 1, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(660 - 1, 529, 795, 529, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(795, 529, 795, 486 - 1, tocolor(113, 0, 0, 215), 1, false) dxDrawRectangle(660, 486, 135, 43, tocolor(0, 0, 0, 145), false)---- Reglas ---- dxDrawLine(6 - 1, 486 - 1, 6 - 1, 529, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(141, 486 - 1, 6 - 1, 486 - 1, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(6 - 1, 529, 141, 529, tocolor(113, 0, 0, 215), 1, false) dxDrawLine(141, 529, 141, 486 - 1, tocolor(113, 0, 0, 215), 1, false) dxDrawRectangle(6, 486, 135, 43, tocolor(0, 0, 0, 145), false) ---- Ventas ---- dxDrawText("Juego", 31, 490, 121, 523, tocolor(167, 9, 9, 255), 2.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Radio", 198, 490, 288, 523, tocolor(167, 9, 9, 255), 2.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Comandos", 330, 490, 420, 523, tocolor(167, 9, 9, 255), 2.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Reglas", 520, 490, 610, 523, tocolor(167, 9, 9, 255), 2.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Ventas", 688, 490, 778, 523, tocolor(167, 9, 9, 255), 2.00, "default-bold", "left", "top", false, false, false, false, false) --Real Time-- local tiempo = getRealTime() local horas = tiempo.hour local minutos = tiempo.minute dxDrawText(horas.. ":".. minutos, 463, 39, 516, 67, tocolor(255, 255, 255, 255), 1.5, "default-bold", "center", "center", true, true, true, true, true) -------------------- ----texto jugar ---- clip = true wordBreak = true local file = fileOpen("texts/Jugar.txt", true) local jugar = fileRead(file, fileGetSize(file)) dxDrawText(jugar, 19, 96, 781, 468, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", true, true, true, false, false) end function abrir() bindKey("F2", "down", function() if not visible then start = getTickCount() addEventHandler("onClientRender", root, content ) visible = true showCursor( true ) showPlayerHudComponent ( "all", true ) showChat ( false ) else removeEventHandler("onClientRender", root, content ) showPlayerHudComponent ( "all", true ) showCursor( true ) showChat ( true ) showCursor( false ) visible = false end end ) end addEventHandler ( "onClientResourceStart", resourceRoot, abrir ) Skype: Juliang09123
Enargy, Posted July 16, 2015 Posted July 16, 2015 Listo Gracias a todos!funciono pero el texto es muy grande y se pasa de mi dxRectangle hay alguna forma de que el texto no se pase ? EJ: Texto ---> Blabllblblbalablalbasdsdasd Recta----> _____________ ( asi me queda en el script ) y despues de tener el panel unos 2 min el texto desaparece En los argumentos del dxtext, el segundo false cambialo a true ( creo que ese es el wordwrap o me equivoco ) - Inactivo.
Recommended Posts