Soren Posted April 29, 2012 Author Share Posted April 29, 2012 WTF... donde se quedaron o que etsan haciendo? Link to comment
iFoReX Posted April 29, 2012 Share Posted April 29, 2012 GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} rotation = 0 GUIEditor_Window[1] = guiCreateWindow(0.75,0,0.25,0.9967,"GUI IDs",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(25,28,113,21,"Escoge el ID ",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Grid[1] = guiCreateGridList(9,63,182,463,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"ID",0.2) GUIEditor_Button[1] = guiCreateButton(10,532,181,37,"Empezar a Jugar",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(0,0,0.245,0.4567,"GUI Seleccion",true) guiWindowSetMovable(GUIEditor_Window[2],false) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Button[2] = guiCreateButton(23,36,57,31,"<",false,GUIEditor_Window[2]) GUIEditor_Button[3] = guiCreateButton(80,36,57,31,">",false,GUIEditor_Window[2]) GUIEditor_Label[2] = guiCreateLabel(27,78,100,22,"NameTag Color",false,GUIEditor_Window[2]) GUIEditor_Edit[1] = guiCreateEdit(65,98,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[1],3) GUIEditor_Label[3] = guiCreateLabel(52,101,9,15,"R",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[3],255,0,0) GUIEditor_Edit[2] = guiCreateEdit(65,123,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[2],3) GUIEditor_Label[4] = guiCreateLabel(52,127,9,15,"G",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[4],0,255,0) GUIEditor_Edit[3] = guiCreateEdit(65,147,61,23,"",false,GUIEditor_Window[2]) GUIEditor_Label[5] = guiCreateLabel(52,151,9,15,"B",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[5],0,0,255) GUIEditor_Label[6] = guiCreateLabel(9,189,83,17,"Nombre del ID",false,GUIEditor_Window[2]) GUIEditor_Edit[4] = guiCreateEdit(96,186,91,23,"",false,GUIEditor_Window[2]) GUIEditor_Button[4] = guiCreateButton(9,230,169,28,"Crear Personaje/ID",false,GUIEditor_Window[2]) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) addEvent("onVisible",true) addEventHandler("onVisible", getLocalPlayer(), function() guiSetVisible(GUIEditor_Window[1],true) guiSetVisible(GUIEditor_Window[2],true) showPlayerHudComponent ("radar",false) showCursor(true) guiSetInputMode("no_binds_when_editing") triggerServerEvent("onCameraMatrix", getLocalPlayer()) ped = createPed( 0, -1586.671875, 1351.53125, 8.2823114395142 ) end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) setElementPosition( localPlayer, 2580.7265625, 2328.77734375, 17.822208404541) destroyElement(ped) setCameraTarget( localPlayer ) setPlayerNametagColor ( localPlayer, tonumber ( guiGetText ( GUIEditor_Edit[1] ) ), tonumber ( guiGetText ( GUIEditor_Edit[2] ) ), tonumber ( guiGetText ( GUIEditor_Edit[3] ) ) ) showPlayerHudComponent ("radar",true) end end ) function rotateTempPed ( ) if isElement ( ped ) then rotation = rotation + 1 if ( rotation > 359 ) then rotation = 0 end setPedRotation ( ped, rotation ) end end addEventHandler("onClientRender", root, rotateTempPed) numero = 0 function on_pushButton_2_clicked(button,state) if (button == "left" and state == "up") then if(numero == 1) then return end numero = numero - 1 setElementModel(ped,numero) end end addEventHandler("onClientGUIClick", GUIEditor_Button[2], on_pushButton_2_clicked) function on_pushButton_3_clicked(button,state) if (button == "left" and state == "up") then if (numero == 200) then return end numero = numero + 1 setElementModel(ped,numero) end end addEventHandler("onClientGUIClick", GUIEditor_Button[3], on_pushButton_3_clicked) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[4] then guiSetVisible(GUIEditor_Window[2],false) local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText(GUIEditor_Grid[1], row, column, (guiGetText(GUIEditor_Edit[4])), false, false) end end ) addEventHandler("onClientGUIClick", root, function() local getModel = getElementModel(ped) triggerServerEvent("guardandoDatos",localPlayer) end end ) sv-side addEventHandler("onPlayerLogin", getRootElement(), function() triggerClientEvent(source,"onVisible",source) end ) addEvent("onCameraMatrix", true) addEventHandler("onCameraMatrix", getRootElement(), function() setCameraMatrix( source, -1570.66796875, 1358.087890625, 11.218300819397, -1586.671875, 1351.53125, 8.2823114395142 ) end ) function resourceStart() triggerClientEvent("onClientGetModel", ped) executeSQLCreateTable ( "skins", "TheID TEXT, theSkinID NUMBER" ) ---esto es en lo q nos emos complicado end addEventHandler("onResourceStart",root,resourceStart) Nos falta el sistema de SQL y lo tenemos listo Link to comment
~Zeus~ Posted April 29, 2012 Share Posted April 29, 2012 Impresionante elMota, eres todo un genio del GUI, Impresionante. EDIT: Una cosa elMota, si se lo pasas a Soren por medio de un link de Mediafire o cualquier parecido, solo una cosa, PONLE UNA CONTRASEÑA.No valla a ser que lo roben Link to comment
iFoReX Posted April 29, 2012 Share Posted April 29, 2012 Gracias pero nos falta el sistema de guardado SQL y yo no entiendo ni pito de SQL osea entiendo lo que me explico ayer edikosh entiendo la estructura pero no se de donde sacamos los valores y como agregarlos a la tabla EDIT: ZeuZ mi Pt modem tiene proteccion contra descargas y no puedo entrar ni a mediafire ni a rapidshare ni a ninguno de esos Link to comment
Soren Posted April 29, 2012 Author Share Posted April 29, 2012 ElMota eres un genio! Son unos genios todos los que me ayudaron! mil gracias a todos son todos geniales! Cuando acabemos eso, solo tendre que hacer las misiones y listo el server estara open. La version 2.0 contendra una nueva isla que pagaras alrededor de 5000 para ir. Sera de lujo pero sera mas dificil de matar zombies. Mil gracias Mota y Edikosh! solo los toques finales de SQL y listo! Ymb hay que hacer que salve la posicion de cada personaje. y lo que tiene ese personaje y un limite de 3 personajes por player. O falto tmb el boton que diga create Character Link to comment
Soren Posted April 29, 2012 Author Share Posted April 29, 2012 Pasame la ip de tu server para testear lo que llevamos pls Link to comment
iFoReX Posted April 29, 2012 Share Posted April 29, 2012 mtasa://186.9.105.58:22003 dale ve Link to comment
Edikosh998 Posted April 29, 2012 Share Posted April 29, 2012 Aver dale que lo termino, que tengo que guardar explicitamente...? Asi no damos mas vueltas El Nombre del skin y el ID del skin nada mas? Link to comment
Soren Posted April 29, 2012 Author Share Posted April 29, 2012 (edited) Aver dale que lo termino, que tengo que guardar explicitamente...? Asi no damos mas vueltasEl Nombre del skin y el ID del skin nada mas? Posiciones ,armas y dinero pls Mil gracias! Edited April 29, 2012 by Guest Link to comment
~Zeus~ Posted April 29, 2012 Share Posted April 29, 2012 Soren cuando digas me pongo manos a la obra para hacer la Isla 2 Link to comment
Soren Posted April 29, 2012 Author Share Posted April 29, 2012 comienzala cuando quieras Link to comment
Edikosh998 Posted April 29, 2012 Share Posted April 29, 2012 Y dos pregunta mas, asi queda bien, una vez que se crea el PJ, luego spawnea? Cuando loguee de vuelta, que le tendria que aparecer? Link to comment
iFoReX Posted April 29, 2012 Share Posted April 29, 2012 aa por si acaso soren se me avia olvidado decirte togglie el radar asi al precionar el boton empezar a jugar vuelve a aparecer *-* ademas edikosh seria bueno que no apareciera el Window[2] al loggearse nuevamente asi al precionar el nuevo boton que puse : GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} rotation = 0 GUIEditor_Window[1] = guiCreateWindow(0.75,0,0.25,0.9967,"GUI IDs",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(10,549,181,37,"Empezar a Jugar",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(25,65,113,21,"Escoge el ID ",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Button[5] = guiCreateButton(9,31,182,32,"Crear nuevo personaje",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Grid[1] = guiCreateGridList(9,82,182,463,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"ID",0.7) GUIEditor_Window[2] = guiCreateWindow(0,0,0.245,0.4567,"GUI Seleccion",true) guiWindowSetMovable(GUIEditor_Window[2],false) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Button[2] = guiCreateButton(23,36,57,31,"<",false,GUIEditor_Window[2]) GUIEditor_Button[3] = guiCreateButton(80,36,57,31,">",false,GUIEditor_Window[2]) GUIEditor_Label[2] = guiCreateLabel(27,78,100,22,"NameTag Color",false,GUIEditor_Window[2]) GUIEditor_Edit[1] = guiCreateEdit(65,98,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[1],3) GUIEditor_Label[3] = guiCreateLabel(52,101,9,15,"R",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[3],255,0,0) GUIEditor_Edit[2] = guiCreateEdit(65,123,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[2],3) GUIEditor_Label[4] = guiCreateLabel(52,127,9,15,"G",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[4],0,255,0) GUIEditor_Edit[3] = guiCreateEdit(65,147,61,23,"",false,GUIEditor_Window[2]) GUIEditor_Label[5] = guiCreateLabel(52,151,9,15,"B",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[5],0,0,255) GUIEditor_Label[6] = guiCreateLabel(9,189,83,17,"Nombre del ID",false,GUIEditor_Window[2]) GUIEditor_Edit[4] = guiCreateEdit(96,186,91,23,"",false,GUIEditor_Window[2]) GUIEditor_Button[4] = guiCreateButton(9,230,169,28,"Crear Personaje/ID",false,GUIEditor_Window[2]) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Button[5],false) showCursor(false) addEvent("onVisible",true) addEventHandler("onVisible", getLocalPlayer(), function() guiSetVisible(GUIEditor_Window[1],true) guiSetVisible(GUIEditor_Window[2],true) showPlayerHudComponent ("radar",false) showCursor(true) guiSetInputMode("no_binds_when_editing") triggerServerEvent("onCameraMatrix", getLocalPlayer()) ped = createPed( 0, -1586.671875, 1351.53125, 8.2823114395142 ) end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) setElementPosition( localPlayer, 2580.7265625, 2328.77734375, 17.822208404541) destroyElement(ped) setCameraTarget( localPlayer ) setPlayerNametagColor ( localPlayer, tonumber ( guiGetText ( GUIEditor_Edit[1] ) ), tonumber ( guiGetText ( GUIEditor_Edit[2] ) ), tonumber ( guiGetText ( GUIEditor_Edit[3] ) ) ) showPlayerHudComponent ("radar",true) end end ) function rotateTempPed ( ) if isElement ( ped ) then rotation = rotation + 1 if ( rotation > 359 ) then rotation = 0 end setPedRotation ( ped, rotation ) end end addEventHandler("onClientRender", root, rotateTempPed) numero = 0 function on_pushButton_2_clicked(button,state) if (button == "left" and state == "up") then if(numero == 1) then return end numero = numero - 1 setElementModel(ped,numero) end end addEventHandler("onClientGUIClick", GUIEditor_Button[2], on_pushButton_2_clicked) function on_pushButton_3_clicked(button,state) if (button == "left" and state == "up") then if (numero == 200) then return end numero = numero + 1 setElementModel(ped,numero) end end addEventHandler("onClientGUIClick", GUIEditor_Button[3], on_pushButton_3_clicked) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[4] then guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Button[5],true) local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemColor(GUIEditor_Grid[1], row, column, (guiGetText(GUIEditor_Edit[1])), (guiGetText(GUIEditor_Edit[2])), (guiGetText(GUIEditor_Edit[3]))) guiGridListSetItemText(GUIEditor_Grid[1], row, column, (guiGetText(GUIEditor_Edit[4])), false, false) end end ) addEvent("onClientGetModel", true) addEventHandler("onClientGetModel", getModel, function() getModel = getElementModel(ped) end ) le aparece nuevamente *-* Link to comment
Edikosh998 Posted April 29, 2012 Share Posted April 29, 2012 A ver, voy entendiendo de a poco. Pero me confunde lo de Soren, el me habia dicho que se puedan hacer 3 PJ como max no? Es como el zombie mode chileno Link to comment
iFoReX Posted April 29, 2012 Share Posted April 29, 2012 Creo que si pero mas ionisado Link to comment
Edikosh998 Posted April 29, 2012 Share Posted April 29, 2012 Bueno, vos Mota haces el GUI de cuando tenga que elegir el PJ? Link to comment
Soren Posted April 29, 2012 Author Share Posted April 29, 2012 ElMota, se pueden acer personajes ocn el mismo nombre. Eso no es problema la verdad pero el verdadero problema es que no apareces con el skin que seleccionaste Link to comment
iFoReX Posted April 29, 2012 Share Posted April 29, 2012 lo se soren pero seria mejor ponerse nombres , lo del skin que seleccionaste respecto a eso lo estoy asiendo Link to comment
Edikosh998 Posted April 29, 2012 Share Posted April 29, 2012 Soren, de eso me encargo...lo del mismo nombre capaz tarda mas aunque si me dan tiempo despues hago hasta que sea con nombre unico. Ahora hago lo de insertar datos en SQL, pero diganme donde tiene que spawnear el tipo Link to comment
iFoReX Posted April 29, 2012 Share Posted April 29, 2012 setElementPosition( localPlayer, 2580.7265625, 2328.77734375, 17.822208404541) yo le puse estas coordenadas que es en donde se spawnea en lolmode Link to comment
iFoReX Posted April 29, 2012 Share Posted April 29, 2012 soren ya ise para que al aparecer aparesca con el mismo skin del ped ahora falta que se guarde nomas GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} rotation = 0 GUIEditor_Window[1] = guiCreateWindow(0.75,0,0.25,0.9967,"GUI IDs",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(10,549,181,37,"Empezar a Jugar",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(25,65,113,21,"Escoge el ID ",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Button[5] = guiCreateButton(9,31,182,32,"Crear nuevo personaje",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Grid[1] = guiCreateGridList(9,82,182,463,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"ID",0.7) GUIEditor_Window[2] = guiCreateWindow(0,0,0.245,0.4567,"GUI Seleccion",true) guiWindowSetMovable(GUIEditor_Window[2],false) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Button[2] = guiCreateButton(23,36,57,31,"<",false,GUIEditor_Window[2]) GUIEditor_Button[3] = guiCreateButton(80,36,57,31,">",false,GUIEditor_Window[2]) GUIEditor_Label[2] = guiCreateLabel(27,78,100,22,"NameTag Color",false,GUIEditor_Window[2]) GUIEditor_Edit[1] = guiCreateEdit(65,98,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[1],3) GUIEditor_Label[3] = guiCreateLabel(52,101,9,15,"R",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[3],255,0,0) GUIEditor_Edit[2] = guiCreateEdit(65,123,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[2],3) GUIEditor_Label[4] = guiCreateLabel(52,127,9,15,"G",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[4],0,255,0) GUIEditor_Edit[3] = guiCreateEdit(65,147,61,23,"",false,GUIEditor_Window[2]) GUIEditor_Label[5] = guiCreateLabel(52,151,9,15,"B",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[5],0,0,255) GUIEditor_Label[6] = guiCreateLabel(9,189,83,17,"Nombre del ID",false,GUIEditor_Window[2]) GUIEditor_Edit[4] = guiCreateEdit(96,186,91,23,"",false,GUIEditor_Window[2]) GUIEditor_Button[4] = guiCreateButton(9,230,169,28,"Crear Personaje/ID",false,GUIEditor_Window[2]) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Button[5],false) showCursor(false) addEvent("onVisible",true) addEventHandler("onVisible", getLocalPlayer(), function() guiSetVisible(GUIEditor_Window[1],true) guiSetVisible(GUIEditor_Window[2],true) showPlayerHudComponent ("radar",false) showCursor(true) guiSetInputMode("no_binds_when_editing") triggerServerEvent("onCameraMatrix", getLocalPlayer()) ped = createPed( 0, -1586.671875, 1351.53125, 8.2823114395142 ) end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) setCameraTarget( localPlayer ) showCursor(false) setElementPosition( localPlayer, 2580.7265625, 2328.77734375, 17.822208404541) local skin = getElementModel( ped ) setElementModel( localPlayer, tonumber(skin) ) destroyElement(ped) setPlayerNametagColor ( localPlayer, tonumber ( guiGetText ( GUIEditor_Edit[1] ) ), tonumber ( guiGetText ( GUIEditor_Edit[2] ) ), tonumber ( guiGetText ( GUIEditor_Edit[3] ) ) ) showPlayerHudComponent ("radar",true) end end ) function rotateTempPed ( ) if isElement ( ped ) then rotation = rotation + 1 if ( rotation > 359 ) then rotation = 0 end setPedRotation ( ped, rotation ) end end addEventHandler("onClientRender", root, rotateTempPed) numero = 0 function on_pushButton_2_clicked(button,state) if (button == "left" and state == "up") then if(numero == 1) then return end numero = numero - 1 setElementModel(ped,numero) end end addEventHandler("onClientGUIClick", GUIEditor_Button[2], on_pushButton_2_clicked) function on_pushButton_3_clicked(button,state) if (button == "left" and state == "up") then if (numero == 200) then return end numero = numero + 1 setElementModel(ped,numero) end end addEventHandler("onClientGUIClick", GUIEditor_Button[3], on_pushButton_3_clicked) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[4] then guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Button[5],true) local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemColor(GUIEditor_Grid[1], row, column, (guiGetText(GUIEditor_Edit[1])), (guiGetText(GUIEditor_Edit[2])), (guiGetText(GUIEditor_Edit[3]))) guiGridListSetItemText(GUIEditor_Grid[1], row, column, (guiGetText(GUIEditor_Edit[4])), false, false) end end ) addEvent("onClientGetModel", true) addEventHandler("onClientGetModel", getModel, function() getModel = getElementModel(ped) end ) Link to comment
Soren Posted April 29, 2012 Author Share Posted April 29, 2012 Se supone que Edi hara todo lo relasionado a SQL si tengo entendido Link to comment
Edikosh998 Posted April 29, 2012 Share Posted April 29, 2012 Dejamelo a mi Mota, ya lo estoy haciendo... EDIT : Como seria el nickName del PJ??? Lo de nombreID? Link to comment
Recommended Posts