-
Posts
1,708 -
Joined
-
Last visited
Everything posted by iFoReX
-
Como Hago para que un objeto se mueva aravez de escribir
iFoReX replied to WazonArellano's topic in Scripting
objeto = createObject( Model, PosX, PosY, PosZ ) addCommandHandler("moverObjeto", function() moveObject( objeto, 5000, 1, MPosX, MposY, MposZ ) ---5000 = el timer , 1 = para que no se repita , MPosX, MPosY, MPosZ = las nuevas posiciones donde quiera que se mueva el objet end ) Atte Tu amigo ElMota -
Ok la ultima preguntita porq ai 3 variables SkinUno SkinDos SkinTres ? 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", getModel) executeSQLQuery("CREATE TABLE IF NOT EXISTS personajes (ID STRING,SkinUno NUMBER,SkinDos NUMBER,SkinTres NUMBER)") end addEvent("guardandoDatos", true) addEventHandler("onResourceStart",root,resourceStart) addEventHandler("guardandoDatos",root,resourceStart)
-
Pero sigo sin entender como obtendre los values del executeSQLInsert del ped
-
executeSQLInsert ( "tabla", "'columna', 'columna', '" .. value .. "'" ) y la tabla ? ai que crearla ?
-
INSERT INTO Store_Information (store_name, Sales, Date) VALUES ('Los Angeles', 900, '10-Jan-1999' store information = la tabla sotre_names , Sales, Date = las Columnas VALUES = los Valores a insertar ? asi es verdad ? o no ?
-
voy entendiendo http://sql.1keydata.com/es/sql-select.php entonces SELECT "nombre_columna" FROM "nombre_tabla" ---Nombre_columna la tabla que viene de nombre_tabla ya voy entendiendo pero eso que funcion seria en el .lua ?
-
First you cant call a resource from a event Second you need do your functions logins in your resource I think
-
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", getModel) executeSQLQuery("CREATE TABLE IF NOT EXISTS personajes (ID STRING,SkinUno NUMBER,SkinDos NUMBER,SkinTres NUMBER)") end addEvent("guardandoDatos", true) addEventHandler("onResourceStart",root,resourceStart) addEventHandler("guardandoDatos",root,resourceStart) ? no entiendo ni pito de SQL
-
?? addEvent("onClientGetModel", true) addEventHandler("onClientGetModel", getLocalPlayer(), function() getModel = getElementModel(ped) end ) 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", getModel) executeSQLQuery("CREATE TABLE IF NOT EXISTS personajes (ID STRING,SkinUno NUMBER,SkinDos NUMBER,SkinTres NUMBER)") end addEventHandler("onResourceStart",root,resourceStart)
-
en el CL o en el SV ? addEvent("onClientGetModel", true) addEventHandler("onClientGetModel", getModel, function() getModel = getElementModel(ped) end )
-
Liisto nose si sirva soy malo triggeando estas cosas cl-side 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 ) addEvent("onClientGetModel", true) addEventHandler("onClientGetModel", getLocalPlayer(), function() getElementModel(ped) 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) executeSQLQuery("CREATE TABLE IF NOT EXISTS personajes (ID STRING,SkinUno NUMBER,SkinDos NUMBER,SkinTres NUMBER)") end addEventHandler("onResourceStart",root,resourceStart)
-
... no deberias antes crear un SQL ? pero buee vos sos el genio en esto del SQL
-
xDD, guardar la cuenta con el skin nomas
-
no ya lo solucione -.- tenia todo bueno pero abia puesto para obtener el edit 2 y era el 4 xDD epic fail error ahora necesitamos tu ayuda edikosh necesitamos que crees la tabla sql con el skin y que se guarde en el row 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] ) ) ) 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("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 )
-
para que no agan un posible spam con eso
-
lol ahy puse todos los parametros los otros parametros son para el blip especial addEvent("onWarpCar", true) addEventHandler("onWarpCar", getRootElement(), function() auto = createVehicle( 411, 2039.9306640625, 1535.390625, 10.671875 ) setVehicleColor( auto, 0,0,0 ) warpPedIntoVehicle( source, auto ) outputChatBox("#FF0000[sERVER]#000000Ve al Blip que HAY en el radar Si te sales del vehiculo perderas el job", source, 0, 0, 0, true) local x,y,z = getElementPosition( source ) local city = getZoneName ( x, y, z, true ) if ( city == 'Las Venturas' ) then createBlip( 2474.6201171875, 1024.251953125, 10.8203125, 37, 0, 99999.0, source ) ---ordering, visibletodistance, visibleTo -.- createMarker( 2474.6201171875, 1024.251953125, 10.8203125, 36, "cylinder", 1.5, 255, 0, 0, 100 ) end end )
-
Necesito que al hacer click en el button[3] se obtenga el texto del edit 2 y con el texto del edit2 se cree un row llamado como el texto del edit 2 me entendes ?
-
Ok ahora ya gira pero el problema es el gridlist ahora no se obtiene el texto aqui el codigo no me arroja ningun error el debug 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) 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] ) ) ) 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 getTheText = guiGetText(GUIEditor_Edit[2]) local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText(GUIEditor_Grid[1], row, column, getTheText, false, false) end end )
-
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(thePed,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(thePed,numero) end end addEventHandler("onClientGUIClick", GUIEditor_Button[3], on_pushButton_3_clicked) bad argument SetElementModel
-
Ok pero en donde coloco los botones ? reemplazo button por los botones ?
-
is it , I think carros = createVehicle ( 440,1543.98962, -1670.46398, 13.300, 0,0,90) warpPedIntoVehicle ( source, carros ) --make sure you define theped end )
-
Lo se pero se necesita algo para que si al precionar el boton se balla cambiando el skin algo en ipairs o algo asi ya estoy asiendo lo del nametag pero no me funciona solo se cambia en el scoreboard no en realidad 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) 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) showCursor(true) 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] ) ) ) 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)
-
Ya ta funcionando soren le puse onClientRender y que al precionar el boton empezar a jugar se destruyera el ped porque se puede hacer colapso de peds hehe, ahora faltan los 2 botones Si pero el otro no era con botones era con un edit y al poner el ID se iba cambiando el skin con un setElementModel( localPlayer, tonumber ( guiGetText ( GUIEditor_Edit[1] ) ) )
-
ya ta funcionando *-* 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) 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) showCursor(true) 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) setCameraTarget( localPlayer ) elseif source == GUIEditor_Button[2] then 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) 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 ) ahora faltan los 2 jodidos botones
