maauroo Posted May 26, 2012 Posted May 26, 2012 Hola.. Como Estan? Hace Unas Semanas Atras E Echo Un Tema Que Queria Saber Como Hacer Un Menu De Regla Y La Solucion No La Entendia Bien, Quisiera Que Me Digan Un Mini Tutorial Como Hacer Una Ventana Usando El "GuiEditor" De Todas Las Reglas Del Servidor Y Que Tenga Boton "Aceptar" ¿Se Entiende?"Se Los Agradesco."
maauroo Posted May 27, 2012 Author Posted May 27, 2012 Pero Cuales Son Las Opciones Del GuiEditor Que Tengo Que Usar?? Por lo menos Hacer La Ventana Y El Texto.. Luego Veremos.
maauroo Posted May 27, 2012 Author Posted May 27, 2012 Ya. Le Puse Titulo. Ahora Como Hago Para Ponerle El Texto?
Castillo Posted May 27, 2012 Posted May 27, 2012 Vos me estas tomando el pelo o que? es que no sabes a que le dicen probar?
maauroo Posted May 27, 2012 Author Posted May 27, 2012 Ne Mentira.. Ya Esta: Aqui El Codigo: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(604,304,264,228,"Reglas:",false) GUIEditor_Label[1] = guiCreateLabel(8,27,162,19,"*No Pedir Ser Administrador.",false,GUIEditor_Window[1]) guiSetAlpha(GUIEditor_Label[1],1) GUIEditor_Label[2] = guiCreateLabel(7,46,218,18,"*No Hacer Spam O Tendras Problemas.",false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(7,65,239,22,"*Respetar A Los User Y Administradores.",false,GUIEditor_Window[1]) GUIEditor_Label[4] = guiCreateLabel(7,85,235,20,"*No Insultar A Los User Y Administradores.",false,GUIEditor_Window[1]) GUIEditor_Label[5] = guiCreateLabel(14,131,196,16,"Estas Son Las Reglas Del Servidor...",false,GUIEditor_Window[1]) GUIEditor_Label[6] = guiCreateLabel(15,147,168,16,"Respeta Las Reglas O Tendras Problemas!",false,GUIEditor_Window[1]) GUIEditor_Label[7] = guiCreateLabel(141,193,122,21,"By:[XTE][M]aauroo",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(14,190,115,24,">> Aceptar <<",false,GUIEditor_Window[1]) --- --- --- --- --- Ahora Quiero Ponerlo Cada Ves Que Entran Las Persona Y Cuando Le Dan Aceptar Puedan Jugar. Como Lo Hago?
Castillo Posted May 27, 2012 Posted May 27, 2012 Simplemente lo pones en un script y creas el meta.xml. Para lo del boton usa el evento: onClientGUIClick.
maauroo Posted May 27, 2012 Author Posted May 27, 2012 Algo Entendi Como Se Usa Pero Como Hago La Funcion Para Que Se Cierre La Ventana Del Menu De Regla?
Araa Posted May 28, 2012 Posted May 28, 2012 Algo Entendi Como Se Usa Pero Como Hago La Funcion Para Que Se Cierre La Ventana Del Menu De Regla? addEventHandler("onClientGUIClick",getRootElement(), function (player) if (source == GUIEditor_Button[1]) then guiSetVisible (GUIEditor_Window[1],false) showCursor (false) end end Ah.. y te recomiendo usar variables, es mas ordenado.
maauroo Posted May 28, 2012 Author Posted May 28, 2012 Mira Lo Puse Asi.. Lo Probe Pero No Funca. Algo Esta Mal: function menuReglas() GUIEditor_Window[1] = guiCreateWindow(604,304,264,228,"Reglas:",false) GUIEditor_Label[1] = guiCreateLabel(8,27,162,19,"*No Pedir Ser Administrador.",false,GUIEditor_Window[1]) guiSetAlpha(GUIEditor_Label[1],1) GUIEditor_Label[2] = guiCreateLabel(7,46,218,18,"*No Hacer Spam O Tendras Problemas.",false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(7,65,239,22,"*Respetar A Los User Y Administradores.",false,GUIEditor_Window[1]) GUIEditor_Label[4] = guiCreateLabel(7,85,235,20,"*No Insultar A Los User Y Administradores.",false,GUIEditor_Window[1]) GUIEditor_Label[5] = guiCreateLabel(14,131,196,16,"Estas Son Las Reglas Del Servidor...",false,GUIEditor_Window[1]) GUIEditor_Label[6] = guiCreateLabel(15,147,168,16,"Respeta Las Reglas O Tendras Problemas!",false,GUIEditor_Window[1]) GUIEditor_Label[7] = guiCreateLabel(141,193,122,21,"By:[XTE][M]aauroo",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(14,190,115,24,">> Aceptar <<",false,GUIEditor_Window[1]) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), menuReglas) addEventHandler("onClientGUIClick",getRootElement(), function (player) if (source == GUIEditor_Button[1]) then guiSetVisible (GUIEditor_Window[1],false) showCursor (false) end end Supuestamente Use "addEventHandler" A Los Gui Para Que Al Entrar Funcione Pero No Anda. Como Lo Arreglo?
Araa Posted May 28, 2012 Posted May 28, 2012 function menuReglas() ventana = guiCreateWindow(604,304,264,228,"Reglas:",false) label = guiCreateLabel(8,27,162,19,"*No Pedir Ser Administrador.",false,ventana) label2 = guiCreateLabel(7,46,218,18,"*No Hacer Spam O Tendras Problemas.",false,ventana) label3 = guiCreateLabel(7,65,239,22,"*Respetar A Los User Y Administradores.",false,ventana) label4 = guiCreateLabel(7,85,235,20,"*No Insultar A Los User Y Administradores.",false,ventana) label5 = guiCreateLabel(14,131,196,16,"Estas Son Las Reglas Del Servidor...",false,ventana) label6 = guiCreateLabel(15,147,168,16,"Respeta Las Reglas O Tendras Problemas!",false,ventana) label7 = guiCreateLabel(141,193,122,21,"By:[XTE][M]aauroo",false,ventana) boton = guiCreateButton(14,190,115,24,">> Aceptar <<",false,ventana) showCursor (true) end addEventHandler("onClientResourceStart", getRootElement(), menuReglas) addEventHandler("onClientGUIClick",getRootElement(), function (player) if (source == boton) then guiSetVisible (ventana,false) showCursor (false) end end) Proba asi. EDIT: Si queres hacer un renglon abajo no es necesario que hagas otro label podes crear una tabla o directamente usar \n (eso hara que el texto pase a la siguiente linea)
maauroo Posted May 28, 2012 Author Posted May 28, 2012 Funciona Bien.. Eso Es Todo. Gracias "AraaFTW,Solid" Se Los Agradesco. Pueden Cerrar. EDIT: Ultima Cosa.. Como Hago Para Que Nadie Pueda Agrandar La Ventana?? Se Entiende Lo Que Digo?
Soren Posted May 28, 2012 Posted May 28, 2012 function menuReglas() ventana = guiCreateWindow(604,304,264,228,"Reglas:",false) label = guiCreateLabel(8,27,162,19,"*No Pedir Ser Administrador.",false,ventana) label2 = guiCreateLabel(7,46,218,18,"*No Hacer Spam O Tendras Problemas.",false,ventana) label3 = guiCreateLabel(7,65,239,22,"*Respetar A Los User Y Administradores.",false,ventana) label4 = guiCreateLabel(7,85,235,20,"*No Insultar A Los User Y Administradores.",false,ventana) label5 = guiCreateLabel(14,131,196,16,"Estas Son Las Reglas Del Servidor...",false,ventana) label6 = guiCreateLabel(15,147,168,16,"Respeta Las Reglas O Tendras Problemas!",false,ventana) label7 = guiCreateLabel(141,193,122,21,"By:[XTE][M]aauroo",false,ventana) boton = guiCreateButton(14,190,115,24,">> Aceptar <<",false,ventana) showCursor (true) guiWindowSetSizable ( ventana, false ) end addEventHandler("onClientResourceStart", getRootElement(), menuReglas) addEventHandler("onClientGUIClick",getRootElement(), function (player) if (source == boton) then guiSetVisible (ventana,false) showCursor (false) end end)
Recommended Posts