Jump to content

iFoReX

Members
  • Posts

    1,708
  • Joined

  • Last visited

Everything posted by iFoReX

  1. iFoReX

    Pregunta GUI

    en los DxDrawRectangule se le pueden acoplar elementos como DxDrawText ??
  2. Kenix I tried Learn lua manuals but I dont undestand anything
  3. very thank you Solid in a minutes I go to test and I say how work
  4. #tittle I want Destroy element and again create but I dont know how here my code GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0,0.6583,0.2212,0.35,"GUI Garage",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(10,57,157,43,"Sacar Vehiculo",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(10,108,157,43,"Cambiar de color el Vehiculo",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(10,159,157,42,"Cambiar/poner Paintjob",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(53,29,56,16,"By ElMota",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Button[4] = guiCreateButton(141,22,25,29,"X",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(-0.005,0.0917,0.2275,0.5667,"GUI Autos",true) GUIEditor_Grid[1] = guiCreateGridList(9,28,164,303,false,GUIEditor_Window[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"Autos",0.-- s8) --> column2 = guiGridListAddColumn(GUIEditor_Grid[1],"ID",0.2) GUIEditor_Window[3] = guiCreateWindow(0.2212,0.6583,0.2675,0.3483,"GUI Agregar Auto",true) GUIEditor_Button[5] = guiCreateButton(13,164,187,33,"Agregar",false,GUIEditor_Window[3]) GUIEditor_Label[2] = guiCreateLabel(17,31,125,17,"Nombre de la Variable",false,GUIEditor_Window[3]) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Edit[1] = guiCreateEdit(17,49,187,29,"",false,GUIEditor_Window[3]) GUIEditor_Label[3] = guiCreateLabel(19,90,123,22,"Numero de ID",false,GUIEditor_Window[3]) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(17,107,187,29,"",false,GUIEditor_Window[3]) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[3],false) showCursor(false) marker = createMarker( 250.27734375, -1765.474609375, 3.7, "cylinder", 1.5, 255, 255, 255, 90 ) function markerHit(hitPlayer) name = getPlayerName( localPlayer ) if name == "ElMota(BienNice)" then if ( hitPlayer == localPlayer ) then guiSetVisible (GUIEditor_Window[1], true) guiSetVisible (GUIEditor_Window[2], true) guiSetVisible (GUIEditor_Window[3], true) showCursor (true) triggerServerEvent("onCameraView", getLocalPlayer()) guiSetInputMode ( "no_binds_when_editing" ) end end end addEventHandler("onClientMarkerHit", marker, markerHit) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[4] then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[3],false) showCursor(false) setCameraTarget( localPlayer ) end end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[5] then local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, (guiGetText(GUIEditor_Edit[1])), false, false ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column2, (guiGetText(GUIEditor_Edit[2])), false, false ) end end ) addEventHandler("onClientGUIChanged", GUIEditor_Edit[2], function() if isElement(auto) then destroyElement(auto) if destroyElement(auto) then local skins = guiGetText( source ) auto = createVehicle( tonumber ( skins ), -1951.6552734375, 263.078125, 35.46875 ) end end end )
  5. iFoReX

    ayuda

    intenta con esto dime si no te funciona es que no estoy seguro que si es tonumber o tostring addEventHandler("onPlayerWasted", getRootElement(), function() getSkin = getElementModel( source ) getArmas = getPedWeapon( source ) getAmmo = getPedTotalAmmo( source ) end ) addEventHandler("onPlayerSpawn", getRootElement(), function() setElementModel( source, tonumber(getSkin) ) giveWeapon( source, tonumber(getArmas), tonumber(getAmmo) ) end )
  6. Soren y si pones un camera matrix en vez de un avion contar la historia de porque esta todo asi
  7. 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 )
  8. setElementPosition( localPlayer, 2580.7265625, 2328.77734375, 17.822208404541) yo le puse estas coordenadas que es en donde se spawnea en lolmode
  9. lo se soren pero seria mejor ponerse nombres , lo del skin que seleccionaste respecto a eso lo estoy asiendo
  10. Creo que si pero mas ionisado
  11. 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 *-*
  12. mtasa://186.9.105.58:22003 dale ve
  13. 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
  14. very thnx u work 100%
  15. 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
  16. iFoReX

    Como hacer esto

    nose cuales vehiculos qres bloquear asi que te are un ejemplo "autos1" paintjob="3" model="597" plate="P0TTIZY" interior="0" dimension="0" posX="-2271.3000488281" posY="2294.3000488281" posZ="4.6999998092651" rotX="0" rotY="0" rotZ="270"> "autos2" paintjob="3" model="597" plate="P0TTIZY" interior="0" dimension="0" posX="-2271.3000488281" posY="2294.3000488281" posZ="4.6999998092651" rotX="0" rotY="0" rotZ="270"> ---y asi vamos en auto2, auto3, auto4, eso es lo q ase el index en vehicles2 no tenes q poner nada
  17. iFoReX

    help

    is more easy it ? function mta () window = guiCreateWindow(223,43,629,714,"news",false) guiSetAlpha(window,0.6) editBox = guiCreateMemo(0.0207,0.5392,0.965,0.3754,"",true,window) button = guiCreateButton(0.027,0.9202,0.4563,0.0672,"Edit",true,window) g = guiCreateButton(0.3943,0.2115,0.1558,0.0994,"",true,window) vv1 = guiCreateLabel(0.0318,0.5196,0.9412,0.021,"×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××",true,window) guiLabelSetColor(vv1,255,0,0) Close = guiCreateButton(0.5437,0.9202,0.4372,0.0672,"Clear",true,window) addEventHandler ( "onClientGUIClick", editBox, outputEditBox ) ---I dont undestand it ? a onClientGUIClick in an function ? guiEditSetMaxLength ( editBox, 128 ) end addCommandHandler("edit", mta) -------------------------------------------------------------------------- function closeInfo ( ) guiSetVisible(window,false) showCursor(false) end addEventHandler ("onClientGUIClick", Close, closeInfo) function outputEditBox () local text = guiGetText ( editBox ) if source == button then editBo = guiCreateMemo(0.0223,0.0322,0.9603,0.493,"",true,window) guiSetText(editBo, "..text..") ---Is more easy set a text end end addEventHandler ( "onClientGUIClick", root, outputEditBox )
  18. my row create down GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0,0.6583,0.2212,0.35,"GUI Garage",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(10,57,157,43,"Sacar Vehiculo",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(10,108,157,43,"Cambiar de color el Vehiculo",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(10,159,157,42,"Cambiar/poner Paintjob",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(53,29,56,16,"By ElMota",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Button[4] = guiCreateButton(141,22,25,29,"X",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(-0.005,0.0917,0.2275,0.5667,"GUI Autos",true) GUIEditor_Grid[1] = guiCreateGridList(9,28,164,303,false,GUIEditor_Window[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"Autos",0.-- s8) --> column2 = guiGridListAddColumn(GUIEditor_Grid[1],"ID",0.2) GUIEditor_Window[3] = guiCreateWindow(0.2212,0.6583,0.2675,0.3483,"GUI Agregar Auto",true) GUIEditor_Button[5] = guiCreateButton(13,164,187,33,"Agregar",false,GUIEditor_Window[3]) GUIEditor_Label[2] = guiCreateLabel(17,31,125,17,"Nombre de la Variable",false,GUIEditor_Window[3]) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Edit[1] = guiCreateEdit(17,49,187,29,"",false,GUIEditor_Window[3]) GUIEditor_Label[3] = guiCreateLabel(19,90,123,22,"Numero de ID",false,GUIEditor_Window[3]) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(17,107,187,29,"",false,GUIEditor_Window[3]) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[3],false) showCursor(false) marker = createMarker( 250.27734375, -1765.474609375, 3.7, "cylinder", 1.5, 255, 255, 255, 90 ) function markerHit(hitPlayer) name = getPlayerName( localPlayer ) if name == "ElMota(BienNice)" then if ( hitPlayer == localPlayer ) then guiSetVisible (GUIEditor_Window[1], true) guiSetVisible (GUIEditor_Window[2], true) guiSetVisible (GUIEditor_Window[3], true) showCursor (true) triggerServerEvent("onCameraView", getLocalPlayer()) end end end addEventHandler("onClientMarkerHit", marker, markerHit) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[4] then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[3],false) showCursor(false) setCameraTarget( localPlayer ) end end ) function CrearLosVehiculo() if source == GUIEditor_Button[5] then local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, (guiGetText(GUIEditor_Edit[1])), false, false ) end end addEventHandler("onClientGUIClick", root, CrearLosVehiculo) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[5] then local row2 = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText ( GUIEditor_Grid[1], row2, column2, (guiGetText(GUIEditor_Edit[2])), false, false ) end end ) here a image
  19. iFoReX

    call resource

    lol he cant -.- he had put the call in addEventHandler -.-
  20. iFoReX

    Travelling

    I think the vehicle cant move just, anypeople need move or the vehicle doesnt move
  21. iFoReX

    Como hacer esto

    mmm... hacer eso es facil aqui te paso un codigo que es de alexs_steel y me lo presto addEventHandler ( "onResourceStart", resourceRoot, function ( ) vehicles2 = { } for index = 1, 20 do vehicles2 [ getElementByID ( "autos".. index ) ] = true ---te lo explicare tienes que hacer un map con este script y poner vehiculos y cambiarle variable a los vehiculos a autos1 autos2 autos3 , asi con el numero end end ) addEventHandler ( "onVehicleStartEnter", root, function ( thePlayer, seat ) if ( seat ~= 0 ) then return end if ( vehicles [ source ] ) then if ( getPlayerTeam ( thePlayer ) and getTeamName ( getPlayerTeam ( thePlayer ) ) ~= "TUTEAM" ) then ---en TUTEAM pones el TEAM en el que quieras los autos restringidos outputChatBox ( "Este vehiculo esta restringido a los membros del TUTEAM", thePlayer, 255, 0, 0 ) ---y agregamos un mensaje cancelEvent ( ) end end end )
  22. try it addCommandHandler("cpofficer", function() createPed( ID, PosX,PosY,PosZ ) end ) ---you undestand me ?
  23. Ok voy entendiendo pero para que necesitara Skin si esta numeroPJ ?
×
×
  • Create New...