iFoReX Posted May 5, 2012 Posted May 5, 2012 GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.23,0.2417,0.5213,0.5167,"GUI Mods Download",true) GUIEditor_Button[1] = guiCreateButton(147,141,95,37,"Descargar",false,GUIEditor_Window[1]) GUIEditor_Grid[1] = guiCreateGridList(9,26,131,275,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Autos Modificados",0.2) GUIEditor_Label[1] = guiCreateLabel(151,39,250,22,"Nombre real del auto :",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(151,67,250,22,"Nombre del auto modificado :",false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(152,260,228,39,"GUI Creada por ElMota",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Label[4] = guiCreateLabel(151,101,250,22,"Tamaño en MB : ",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(147,193,95,37,"Cancelar",false,GUIEditor_Window[1]) addEvent("onVisible", true) addEventHandler("onVisible", getLocalPlayer(), function() guiSetVisible(GUIEditor_Window[1],true) showCursor(true) end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[2] then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) end end ) bindKey("F5","down", function() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end ) sv-side addEventHandler("onPlayerLogin", getRootElement(), function() triggerClientEvent(source, "onVisible", source) end ) esto es cuando el player se logee aparesca la GUI y cuando apriete F5 tambien Ademas le agregue un buton para cerrar la GUI
elmarcosmta14 Posted May 5, 2012 Author Posted May 5, 2012 Gracias Por la gui mota ^^ ahora falta poner la lista de autos y hacer el script para que carge al apretar descargar
elmarcosmta14 Posted May 5, 2012 Author Posted May 5, 2012 ElMota no tienes skype o algun programa donde podamos hablar mejor?
iFoReX Posted May 5, 2012 Posted May 5, 2012 Ya ise el guiSetText me falta descargar el mod nomas GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.23,0.2417,0.5213,0.5167,"GUI Mods Download",true) GUIEditor_Button[1] = guiCreateButton(147,141,95,37,"Descargar",false,GUIEditor_Window[1]) GUIEditor_Grid[1] = guiCreateGridList(9,26,131,275,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) columna = guiGridListAddColumn(GUIEditor_Grid[1],"Autos Modificados",0.7) GUIEditor_Label[1] = guiCreateLabel(151,39,250,22,"Nombre real del auto :",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(151,67,250,22,"Nombre del auto modificado :",false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(152,260,228,39,"GUI Creada por ElMota",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Label[4] = guiCreateLabel(151,101,250,22,"Tamaño en MB : ",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(147,193,95,37,"Cancelar",false,GUIEditor_Window[1]) row1 = guiGridListAddRow(GUIEditor_Grid[1]) guiSetVisible(GUIEditor_Window[1],false) showCursor(false) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() guiGridListSetItemText(GUIEditor_Grid[1], row1, columna, "Lamborghini", false, false) end ) addEvent("onVisible", true) addEventHandler("onVisible", getLocalPlayer(), function() guiSetVisible(GUIEditor_Window[1],true) showCursor(true) end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[2] then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) end end ) bindKey("F5","down", function() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end ) addEventHandler("onClientGUIClick", guiRoot, function() if source == GUIEditor_Grid[1] then nRow = guiGridListGetSelectedItem( GUIEditor_Grid[1] ) if nRow ~= -1 then if nRow == 0 then guiSetText(GUIEditor_Label[1], "Nombre real del auto : Infernus") guiSetText(GUIEditor_Label[2], "Nombre del auto modificado : Laborghini") guiSetText(GUIEditor_Label[4], "Tamaño MB : 5.2 MB") end end end end ) pd: no tengo
iFoReX Posted May 5, 2012 Posted May 5, 2012 y... Sr.Mota lo hizo otra vez aqui ta el script cl-side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.23,0.2417,0.5213,0.5167,"GUI Mods Download",true) GUIEditor_Button[1] = guiCreateButton(147,141,95,37,"Descargar",false,GUIEditor_Window[1]) GUIEditor_Grid[1] = guiCreateGridList(9,26,131,275,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) columna = guiGridListAddColumn(GUIEditor_Grid[1],"Autos Modificados",0.7) GUIEditor_Label[1] = guiCreateLabel(151,39,250,22,"Nombre real del auto :",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(151,67,250,22,"Nombre del auto modificado :",false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(152,260,228,39,"GUI Creada por ElMota",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Label[4] = guiCreateLabel(151,101,250,22,"Tamaño en MB : ",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(147,193,95,37,"Cancelar",false,GUIEditor_Window[1]) row1 = guiGridListAddRow(GUIEditor_Grid[1]) guiSetVisible(GUIEditor_Window[1],false) showCursor(false) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() guiGridListSetItemText(GUIEditor_Grid[1], row1, columna, "Lamborghini", false, false) end ) addEvent("onVisible", true) addEventHandler("onVisible", getLocalPlayer(), function() guiSetVisible(GUIEditor_Window[1],true) showCursor(true) end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[2] then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) end end ) bindKey("F5","down", function() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end ) addEventHandler("onClientGUIClick", guiRoot, function() if source == GUIEditor_Grid[1] then nRow = guiGridListGetSelectedItem( GUIEditor_Grid[1] ) if nRow ~= -1 then if nRow == 0 then guiSetText(GUIEditor_Label[1], "Nombre real del auto : Infernus") guiSetText(GUIEditor_Label[2], "Nombre del auto modificado : Laborghini") guiSetText(GUIEditor_Label[4], "Tamaño MB : 5.2 MB") end end end end ) addEventHandler ( 'onClientGUIClick', guiRoot, function ( ) if ( source == GUIEditor_Button[1] ) then local row = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if row ~= -1 then if nRow == 0 then downloadFile("tuArchivo.txd") downloadFile("tuArchivo.dff") end end end end ) sv-side addEventHandler("onPlayerLogin", getRootElement(), function() triggerClientEvent(source, "onVisible", source) end )
elmarcosmta14 Posted May 5, 2012 Author Posted May 5, 2012 Gracias ElMota, estoy intentando hacer algo ya que al final estas haciendo todo tu, no era la idea que me hicieras el script completo pero gracias por la ayuda
iFoReX Posted May 5, 2012 Posted May 5, 2012 alexs es que si edito no ven que edite D:, ademas marcos, tu puedes cambiar y agregar cosas
elmarcosmta14 Posted May 5, 2012 Author Posted May 5, 2012 Tengo un problema lo de la gui esta todo bien, pero hize el script para reemplazar el auto para que lo pueda ver y le puse un comando pero apenas le doy start, se empieza a descargar aqui esta : function replaceModel() txd = engineLoadTXD("buffalo.txd", 402 ) engineImportTXD(txd, 402) dff = engineLoadDFF("buffalo.dff", 402 ) engineReplaceModel(dff, 402) end addCommandHandler ( "loadcar1", replaceModel ) Lo agrege al final del script de la gui pero se descarga altiro y la idea es que se descarge al apretar el boton descargar. y en el meta le puse lo de download false pero igual se descarga apenas le doy start
elmarcosmta14 Posted May 5, 2012 Author Posted May 5, 2012 Mira aqui esta todo : GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.23,0.2417,0.5213,0.5167,"GUI Mods Download",true) GUIEditor_Button[1] = guiCreateButton(147,141,95,37,"Descargar",false,GUIEditor_Window[1]) GUIEditor_Grid[1] = guiCreateGridList(9,26,131,275,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) columna = guiGridListAddColumn(GUIEditor_Grid[1],"Autos Modificados",0.7) GUIEditor_Label[1] = guiCreateLabel(151,39,250,22,"Nombre real del auto :",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(151,67,250,22,"Nombre del auto modificado :",false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(152,260,228,39,"GUI Creada por ElMota",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Label[4] = guiCreateLabel(151,101,250,22,"Tamaño en MB : ",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(147,193,95,37,"Cancelar",false,GUIEditor_Window[1]) row1 = guiGridListAddRow(GUIEditor_Grid[1]) guiSetVisible(GUIEditor_Window[1],false) showCursor(false) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() guiGridListSetItemText(GUIEditor_Grid[1], row1, columna, "Aston Martin", false, false) end ) addEvent("onVisible", true) addEventHandler("onVisible", getLocalPlayer(), function() guiSetVisible(GUIEditor_Window[1],true) showCursor(true) end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[2] then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) end end ) bindKey("F5","down", function() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end ) addEventHandler("onClientGUIClick", guiRoot, function() if source == GUIEditor_Grid[1] then nRow = guiGridListGetSelectedItem( GUIEditor_Grid[1] ) if nRow ~= -1 then if nRow == 0 then guiSetText(GUIEditor_Label[1], "Nombre real del auto : Buffalo") guiSetText(GUIEditor_Label[2], "Nombre del auto modificado : Aston Martin") guiSetText(GUIEditor_Label[4], "Tamaño MB : 1.92 MB") end end end end ) addEventHandler ( 'onClientGUIClick', guiRoot, function ( ) if ( source == GUIEditor_Button[1] ) then local row = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if row ~= -1 then if nRow == 0 then downloadFile("buffalo.txd") downloadFile("buffalo.dff") end end end end ) function replaceModel() txd = engineLoadTXD("buffalo.txd", 402 ) engineImportTXD(txd, 402) dff = engineLoadDFF("buffalo.dff", 402 ) engineReplaceModel(dff, 402) end addCommandHandler ( "loadcar1", replaceModel ) Server side : addEventHandler("onPlayerLogin", getRootElement(), function() triggerClientEvent(source, "onVisible", source) end ) Meta : "ElMota" name="guimods" version="1.0.1" type="script"/>
iFoReX Posted May 6, 2012 Posted May 6, 2012 proba con esto "ElMota" name="guimods" version="1.0.1" type="script"/>
elmarcosmta14 Posted May 6, 2012 Author Posted May 6, 2012 Eso es para reemplazar los archivos para que se vea la modificacion
Alexs Posted May 6, 2012 Posted May 6, 2012 el gui es para eso pero tu agregaste un command handler, si le haras asi mejor no le pedias nada a Mota
elmarcosmta14 Posted May 6, 2012 Author Posted May 6, 2012 La gui no va a remplazar los archivos ''buffalo.txd y buffalo.dff'' la gui ara que solo se descargen cuando uno lo desee
Alexs Posted May 6, 2012 Posted May 6, 2012 en ese caso debes escribir el comando y luego usar la GUI, mejor usa onResourceStart
Alexs Posted May 6, 2012 Posted May 6, 2012 marcos ya le arregleno pued publicar el codigo D: Por que?? D:
iFoReX Posted May 6, 2012 Posted May 6, 2012 me dice esto : General Error SQL ERROR [ mysqli ] Incorrect string value: '\xF1\xAF\xA0\x8DB ...' for column 'post_text' at row 1 [1366] An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists. D:
Recommended Posts