Charly_767 Posted May 14, 2013 Share Posted May 14, 2013 Hola, alguien podria hacerme un codigo que al hacer click en un boton "teletransportase" el jugador local a esta ubicación (mas abajo),y que despues se cerrase la ventana X = 3168.16 Y= -1401.482 Z= 130.72 Tambien les dejo el codigo de la ventana GUIEditor = { button = {}, window = {}, staticimage = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(319, 23, 449, 490, "Censurado xD", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.staticimage[1] = guiCreateStaticImage(10, 32, 427, 420, "Censurado xD", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(317, 136, 86, 34, "Censurado xD", false, GUIEditor.staticimage[1]) GUIEditor.button[2] = guiCreateButton(108, 319, 64, 38, "Censurado xD", false, GUIEditor.staticimage[1]) GUIEditor.button[3] = guiCreateButton(162, 225, 53, 25, "Censurado xD", false, GUIEditor.staticimage[1]) GUIEditor.button[4] = guiCreateButton(212, 140, 41, 30, "Censurado xD", false, GUIEditor.staticimage[1]) GUIEditor.button[5] = guiCreateButton(133, 142, 65, 28, "Censurado xD", false, GUIEditor.staticimage[1]) GUIEditor.label[1] = guiCreateLabel(9, 462, 428, 28, "Censurado xD", false, GUIEditor.window[1]) end ) Link to comment
Castillo Posted May 14, 2013 Share Posted May 14, 2013 Es muy facil, tenes que usar el evento: onClientGUIClick y la funcion: setElementPosition ( hace click en ambos para obtener mas informacion ). Link to comment
EstrategiaGTA Posted May 16, 2013 Share Posted May 16, 2013 Usa, para tele transportarlo al lugar: setElementPosition onClientGUIClick Y para cerrar la ventana: guiSetVisible Esto sería, haces que cuando el jugador haga clic en el botón, la ventana no esté visible (se cierra) y el jugador se transportará al lugar indicado. Link to comment
Recommended Posts