Jump to content

Anzo

Members
  • Posts

    276
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Anzo

  1. Anzo

    Hola :p

    Lo que quieres es que al precionar un botón o algo pase al jugador a otra gridlist? ya intentaste usando guiGridListAddRow
  2. Mmm, ¿tengo que separar los tipos de clothes de cada uno? o sea, así: Hair = { {"baldbeard"} } Camisa = { {"jacket"} } Edit: Lo que intente hacer es esto: Hair = { --Texture, name,type {"hairblond","hair",1}, {"hairred","hair",1}, {"hairblue","hair",1}, {"hairgreen","hair",1}, {"hairpink","hair",1}, {"bald","hair",1}, {"baldbeard","hair",1}, {"baldtash","hair",1}, {"baldgoatee","hair",1}, {"highfade","hair",1}, -- {"highafro","hair",1}, {"wedge","hair",1}, {"slope","hair",1}, {"jhericurl","hair",1}, {"cornrows","hair",1}, {"cornrowsb","hair",1}, {"tramline","hair",1}, {"groovecut","hair",1}, {"mohawk","hair",1}, {"mohawkblond","hair",1}, -- {"mohawkpink","hair",1}, {"mohawkbeard","hair",1}, {"afro","hair",1}, {"afrotash","hair",1}, {"afrobeard","hair",1}, {"afroblond","hair",1}, {"flattop","hair",1}, {"elvishair","hair",1}, {"beard","hair",1}, {"tash","hair",1}, {"goatee","hair",1}, {"afrogoatee","hair",1}, } function right(button) if button == "left" then if source == CabelloRight then for i,v in pairs(Hair) do local skinSi = getElementModel(localPlayer) if skinSi == 0 then addPedClothes(localPlayer, unpack(v)) end end end end end addEventHandler("onClientGUIClick", root, right) Pero no me pone los clothes (quizá es por que estoy usando unpack, pero no se me ocurre otra cosa)
  3. Es realmente necesario usar tablas para hacerlo? por que en los skinselector que he descargado no usan tablas y les cambia el skin según el que viene después del que tienen.
  4. Anzo

    HUD

    Solo divide la vida, en vez de /100 entre /200 Algo así: vida = getElementHealth(getLocalPlayer()) vida = vida/200
  5. Quiero hacer un selector de clothes para cj, esta dividido por partes, cabello,camisa,pantalón,zapato,etc. Pero no sé como como hacer que en los botones < > para cambiar al cabello se cambien así: cabello1,cabello2,cabell3, hasta llegar al ultimo. Lo que tengo es esto: --Server function clotheSRight() local SkinC = getElementModel(client) if client hen if (SkinC == 0 then) addPedClothes(client,"baldbeard","head",1) end end end addEvent("onClothes",true) addEventHandler("onClothes", root, clotheSRight) --Client function right(button) if button == "left" then if source == CabelloRight then triggerServerEvent("onClothes",getLocalPlayer()) end end end addEventHandler("onClientGUIClick", root, right) Se que no va a cambiar en cabello1,cabello2,cabello3, por que no lo tengo hecho así, pero no sé como hacer para que cambie así, me descargue un skinselector pero no es lo mismo, también mire los ejemplos de la wiki de /nextClothes pero ese me lo da al azar.
  6. Anzo

    Show

    Si tienes el speedomrter en una sola función, usa removeEventHandler('onClientRender', root, NOMBRE_DE_LA_FUNCION)
  7. Anzo

    Show

    setPlayerHudComponentVisible ( source, "all", false )
  8. No te preocupes, que hasta a mi me confunde, por eso decidí volver a hacerlo, por que tenía demasiados bug's el código. Disculpa por esto, pero son cosas que pasan al hacer un código largo y no organizarlo bien , igualmente gracias. De todas formas, si vuelvo a tener problemas con el onClientGUIClick, lo diré por aquí (aunque trataré de no tenerlos de nuevo, por que me doy cuenta que me traen muchos bug's).
  9. Mala costumbre la mía de estar diciéndole nombre a las variables . Bueno, probé lo que me dijiste ayer pero ahora no me deja darle click al boton para que aparezca la imagen de la desert eagle y los botoner para comprar. Dejare el código donde donde están las imágenes principales. --Este es la parte cuando entras al marker y te aparece la window function mainWindowD() if source == WeaponMarker2 then mainDXimage = guiCreateStaticImage(0, 0, 900, 600, ":spawn/imgShop/button.png", false) guiSetProperty(mainDXimage, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") guiSetVisible(mainDXimage, true) showCursor(true) --[[ EL PROBLEMA ES QUE SI LE DOY A UNA PARTE DE 'gray' YA SEA UN POCO A LA DERECHA O UN POCO ARRIBA, ME QUITARA DINERO Y ME DARÁ EL ARMA. Cuando debería quitarme el dinero y darme el arma cuando le doy al boton 'Desert Eagle' --]] gray = guiCreateStaticImage(225, 75, 640, 430, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(gray, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") desertEagleButton = guiCreateStaticImage(749, 490, 95, 69, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(desertEagleButton, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") ------------------ --AL PRECIONAR EL BOTON DesertEagle, APARECERA LA IMAGEN Y LOS BOTONES PARA COMPRAR EN LA IMAGEN 'gray' ----------------- DesertEagle = guiCreateStaticImage(-21, 5, 133, 76, ":hud/Armas/24.png", false, desertEagleButton) ----------- labelDesert = guiCreateLabel(18, 10, 63, 15, "Desert Eagle", false, desertEagleButton) guiSetFont(labelDesert, "default-small") guiLabelSetColor(labelDesert, 196, 245, 0) end end addEventHandler("onClientMarkerHit", getRootElement(), mainWindowD) --Y aquí es donde tengo la parte para que aparezcan los botones, la imagen de la desert en el gray, al precionar 'DesertEagle function clickInDesertIGEL() DeagleWep = guiCreateStaticImage(69, 50, 464, 291, ":hud/Armas/24.png", false, gray) guiSetVisible(NOMBRE_DE_LAS_ARMAS, false) DeagleNombre = guiCreateLabel(55, 51, 535, 32, "Desert Eagle", false, gray) botonComprarDeagle = guiCreateStaticImage(220, 325, 170, 60, ":spawn/imgShop/button.png", false, gray) guiSetProperty(botonComprarDeagle, "ImageColours", "tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000") labelComprarDeagle = guiCreateLabel(10, 31, 78, 23, "Comprar", false, botonComprarDeagle) precioDeagle = guiCreateLabel(10, 10, 150, 23, "$10.000 /Balas: 50", false, botonComprarDeagle) guiLabelSetColor(precioDeagle, 0, 255, 12) --Otra money otherDeagle = guiCreateStaticImage(400, 325, 200, 60, ":spawn/imgShop/button.png", false, gray) guiSetProperty(otherDeagle, "ImageColours", "tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000") lblDeagle = guiCreateLabel(10, 31, 140, 23, "Comprar con tokens", false, otherDeagle) precioDeagle2 = guiCreateLabel(10, 10, 150, 23, "$10.000 /Balas: 50", false, otherDeagle) guiLabelSetColor(precioDeagle2, 0, 255, 12) --Daño guiSetVisible(damageLabel, false) damageDeagle = guiCreateLabel(79, 75, 114, 42, "Daño: 30", false, grayInfos) --Precision guiSetVisible(AQUI_VA_LA_PRECISION,false) accuracyDeagle = guiCreateLabel(78, 189, 115, 21, "1", false, grayInfos) --Target_range guiSetVisible(RangTLabel,false) RangoDeagle = guiCreateLabel(85, 249, 118, 29, "Rango: ", false, grayInfos) --Range minigun guiSetVisible(AQUI_VA_EL_RANGO,false) rangoDeagle = guiCreateLabel(79, 328, 120, 22, "Rango (arma):", false, grayInfos) rangeMaxDeagle = guiCreateLabel(82, 354, 111, 29, "38", false, grayInfos) --Disable minigun guiSetVisible(minigunImagenMAIN,false) guiSetVisible(minigunNombre,false) guiSetVisible(botonComprarDX,false) guiSetVisible(botonComprarDX2,false) guiSetVisible(labelComprarDX,false) guiSetVisible(labelComprarDX2,false) guiSetVisible(precioDXLAB,false) guiSetVisible(precioDXLAB2,false) guiSetVisible(damageLabelMinigun,false) guiSetVisible(MINIGUNaccuracy,false) guiSetVisible(RangTMinigun,false) guiSetVisible(RangoMinigunLabel,false) guiSetVisible(minigunRangeMax,false) --Disable Rocket Launcher HS guiSetVisible(HSimageMain,false) guiSetVisible(HSNombre,false) guiSetVisible(botonCompraHS,false) guiSetVisible(labelCompraHS,false) guiSetVisible(precioHS,false) guiSetVisible(HS2,false) guiSetVisible(LblHS2,false) guiSetVisible(HSprecioT,false) guiSetVisible(damageHS,false) guiSetVisible(HSaccuracy,false) guiSetVisible(RangoHS,false) guiSetVisible(rangeMaxHS,false) guiSetVisible(rangoHSLabel,false) --Disable lanzallamas guiSetVisible(lanzallamasWeapn,false) guiSetVisible(lanzaNombre,false) guiSetVisible(botonComprarLanzallamas,false) guiSetVisible(labelComprarLanzallamas,false) guiSetVisible(precioLanzallamas,false) guiSetVisible(otherLanzallamas,false) guiSetVisible(precioLanzallamas,false) guiSetVisible(damageFuego,false) guiSetVisible(accuracyFuegos,false) guiSetVisible(RangoFuego,false) guiSetVisible(rangoNormalFuego,false) guiSetVisible(rangeMaxFuego,false) ---NORMAL guiSetVisible(NormalNombre,false) guiSetVisible(launcherNormal,false) guiSetVisible(botonComprarDX2,false) guiSetVisible(botonCompraNormal,false) guiSetVisible(labelCompraNormal,false) guiSetVisible(precioNormal,false) guiSetVisible(otherNormal,false) guiSetVisible(lblNormal,false) guiSetVisible(precioTNrmal,false) guiSetVisible(damageNormal,false) guiSetVisible(accuracyNormal,false) guiSetVisible(RangoNormal,false) guiSetVisible(rangeMaxNormal,false) --Knife disable guiSetVisible(KnifeWep,false) guiSetVisible(KnifeNombre,false) guiSetVisible(botonComprarKnife,false) guiSetVisible(labelComprarKnife,false) guiSetVisible(precioKnife,false) guiSetVisible(otherKnife,false) guiSetVisible(lblKnife,false) guiSetVisible(precioTNrmal,false) guiSetVisible(damageKnife,false) guiSetVisible(accuracyKnifes,false) guiSetVisible(RangoKnife,false) guiSetVisible(rangoKnife,false) guiSetVisible(rangeMaxKnife,false) --Katana disable guiSetVisible(KatanaWep,false) guiSetVisible(KatanaNombre,false) guiSetVisible(botonComprarKatana,false) guiSetVisible(labelComprarKatana,false) guiSetVisible(precioKatana,false) guiSetVisible(otherKatanas,false) guiSetVisible(lblKatanas,false) guiSetVisible(precioKatana2,false) guiSetVisible(damageKatana,false) guiSetVisible(accuracyKatana,false) guiSetVisible(RangoKatana,false) guiSetVisible(rangoKatana,false) guiSetVisible(rangeMaxKatanas,false) addEventHandler("onClientGUIClick", botonComprarDeagle, addWeaponDeagle) end addEventHandler("onClientGUIClick", DesertEagle, clickInDesertIGEL) La parte de los guiSetVisible's es solo para que se eliminen las imagenes de las demás armas si ya estaba precionadas antes . Necesito ayuda con esto para 'desbugear' el panel.
  10. Entonces le cambio el root por el nombre del boton? (no puedo probarlo ahora)
  11. Y... Cómo lo soluciono e_e?
  12. Tengo un problema con onClientGUIClick y es que, en vez de solo quitarle el dinero y darle el arma al jugador al precionar el boton, se le quita el dinero y le da el arma al precionar cualquier parte de la imagen/window. El problema es que tengo un addEventHandler("onClientGUIClick", . . . , . . . ) dentro de una función, y en vez de darme el arma y quitarme dinero al precionar únicamente el botón ''botonComprarDeagle'', me quita dinero y me da el arma si le doy a cualquier parte de la imagen. Pondré los códigos donde se da click y el de la window. -La imagen principal function mainWindowD() if source == WeaponMarker2 then local money = getPlayerMoney(localPlayer) local message = "Usa /centrar si tu resolución es mayor a 800x600" local messageImportante = "No le des click otra vez al arma elegida para poder usar el panel sin errores." local messageImportante2 = "En caso de que se te bugee el panel, cierralo y vuelve a entrar al marcador rojo" mainDXimage = guiCreateStaticImage(0, 0, 900, 600, ":spawn/imgShop/button.png", false) guiSetProperty(mainDXimage, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") guiSetVisible(mainDXimage, true) showCursor(true) gray = guiCreateStaticImage(225, 75, 640, 430, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(gray, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") NOMBRE_DE_LAS_ARMAS = guiCreateLabel(55, 51, 535, 32, "Elige una arma para comprar" , false, gray) Informacion = guiCreateLabel(55, 80, 535, 32, ""..message.."" , false, gray) informacionImportante = guiCreateLabel(55, 100, 535, 32, ""..messageImportante.."" , false, gray) informacionImportante2 = guiCreateLabel(55, 115, 535, 32, ""..messageImportante2.."" , false, gray) guiLabelSetColor(informacionImportante, 255,0,0) guiLabelSetColor(informacionImportante2, 255,0,0) grayInfos = guiCreateStaticImage(38, 75, 213, 430, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(grayInfos, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") damageImagen = guiCreateStaticImage(18, 60, 57, 64, ":spawn/imgShop/Icon_damage.png", false, grayInfos) damageLabel = guiCreateLabel(79, 75, 114, 42, "Daño:", false, grayInfos) PrecisionImagen = guiCreateStaticImage(18, 136, 57, 64, ":spawn/imgShop/Icon_accuracy.png", false, grayInfos) PrecisionLabel = guiCreateLabel(79, 158, 114, 42, "Presición:", false, grayInfos) AQUI_VA_LA_PRECISION = guiCreateLabel(78, 189, 115, 21, "...", false, grayInfos) RangImagen = guiCreateStaticImage(20, 229, 59, 70, ":spawn/imgShop/target_Icon.png", false, grayInfos) RangTLabel = guiCreateLabel(85, 249, 118, 29, "Rango: ...", false, grayInfos) ArmaRangoImagen = guiCreateStaticImage(20, 318, 59, 75, ":spawn/imgShop/Icon_range.png", false, grayInfos) RangoArmaLabel = guiCreateLabel(79, 328, 120, 22, "Rango (arma):", false, grayInfos) AQUI_VA_EL_RANGO = guiCreateLabel(82, 354, 111, 29, "...", false, grayInfos) buttonMejoras = guiCreateStaticImage(264, 51, 124, 57, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(buttonMejoras, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") MejorasLabel = guiCreateLabel(24, 19, 83, 20, "Mejoras", false, buttonMejoras) local font7_fontmoney = guiCreateFont(":hud/font/fontmoney.ttf", 12) guiSetFont(MejorasLabel, font7_fontmoney) buttonVender = guiCreateStaticImage(398, 51, 124, 57, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(buttonVender, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") VenderLabel = guiCreateLabel(24, 18, 100, 35, "Vender", false, buttonVender) guiSetFont(VenderLabel, font7_fontmoney) buttonMinigun = guiCreateStaticImage(54, 490, 116, 69, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(buttonMinigun, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") minigunLabel = guiCreateLabel(37, 10, 35, 16, "Minigun", false, buttonMinigun) guiSetFont(minigunLabel, "default-small") minigunImage = guiCreateStaticImage(2, 10, 114, 68, ":hud/Armas/38.png", false, buttonMinigun) labelsss = guiCreateLabel(395, 573, 286, 26, "", false, mainDXimage) buttonRocketLauncherHS = guiCreateStaticImage(170, 490, 116, 69, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(buttonRocketLauncherHS, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") RkcHS = guiCreateLabel(15, 10, 85, 15, "Rocket Launcher HS", false, buttonRocketLauncherHS) guiSetFont(RkcHS, "default-small") rocketLauncherHS = guiCreateStaticImage(10, 10, 93, 64, ":hud/Armas/36.png", false, buttonRocketLauncherHS) buttonRocketNormal = guiCreateStaticImage(286, 490, 116, 69, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(buttonRocketNormal, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") normalLabelRocket = guiCreateLabel(10, 10, 101, 15, "Rocket Launcher normal", false, buttonRocketNormal) guiSetFont(normalLabelRocket, "default-small") normalLauncher = guiCreateStaticImage(-4, 15, 126, 57, ":hud/Armas/35.png", false, buttonRocketNormal) buttonLanzallamas = guiCreateStaticImage(402, 490, 116, 69, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(buttonLanzallamas, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") lanzaLlamasLabel = guiCreateLabel(37, 6, 52, 15, "Lanzallamas", false, buttonLanzallamas) guiSetFont(lanzaLlamasLabel, "default-small") guiLabelSetColor(lanzaLlamasLabel, 243, 0, 0) Lanzallamas = guiCreateStaticImage(-12, 10, 129, 62, ":hud/Armas/37.png", false, buttonLanzallamas) buttonNoseCualEs = guiCreateStaticImage(518, 490, 116, 69, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(buttonNoseCualEs, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") Knife_label = guiCreateLabel(40, 10, 25, 15, "Knife", false, buttonNoseCualEs) guiSetFont(Knife_label, "default-small") Knife = guiCreateStaticImage(-30, -30, 177, 145, ":hud/Armas/4.png", false, buttonNoseCualEs) buttonTWHO = guiCreateStaticImage(634, 490, 116, 69, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(buttonTWHO, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") Katana_label = guiCreateLabel(40, 10, 31, 15, "Katana", false, buttonTWHO) guiSetFont(Katana_label, "default-small") Katana = guiCreateStaticImage(-13, -4, 150, 96, ":hud/Armas/8.png", false, buttonTWHO) desertEagleButton = guiCreateStaticImage(749, 490, 95, 69, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(desertEagleButton, "ImageColours", "tl:B4000000 tr:B4000000 bl:B4000000 br:B4000000") DesertEagle = guiCreateStaticImage(-21, 5, 133, 76, ":hud/Armas/24.png", false, desertEagleButton) labelDesert = guiCreateLabel(18, 10, 63, 15, "Desert Eagle", false, desertEagleButton) guiSetFont(labelDesert, "default-small") guiLabelSetColor(labelDesert, 196, 245, 0) labs2 = guiCreateLabel(579, 754, 15, 15, "", false, mainDXimage) tuDineroButton = guiCreateStaticImage(532, 51, 230, 57, ":spawn/imgShop/button.png", false, mainDXimage) guiSetProperty(tuDineroButton, "ImageColours", "tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000") tuDinero = guiCreateLabel( 20, 12, 247, 35, "Cerrar", false, tuDineroButton) guiSetFont(tuDinero, font6_fontmoney) clickInMinigun() end end addEventHandler("onClientMarkerHit", getRootElement(), mainWindowD) -Al dar click function clickInDesertIGEL() if source == DesertEagle then DeagleWep = guiCreateStaticImage(69, 50, 464, 291, ":hud/Armas/24.png", false, gray) guiSetVisible(NOMBRE_DE_LAS_ARMAS, false) DeagleNombre = guiCreateLabel(55, 51, 535, 32, "Desert Eagle", false, gray) botonComprarDeagle = guiCreateStaticImage(220, 325, 170, 60, ":spawn/imgShop/button.png", false, gray) guiSetProperty(botonComprarDeagle, "ImageColours", "tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000") labelComprarDeagle = guiCreateLabel(10, 31, 78, 23, "Comprar", false, botonComprarDeagle) precioDeagle = guiCreateLabel(10, 10, 150, 23, "$10.000 /Balas: 50", false, botonComprarDeagle) guiLabelSetColor(precioDeagle, 0, 255, 12) --Otra money otherDeagle = guiCreateStaticImage(400, 325, 200, 60, ":spawn/imgShop/button.png", false, gray) guiSetProperty(otherDeagle, "ImageColours", "tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000") lblDeagle = guiCreateLabel(10, 31, 140, 23, "Comprar con tokens", false, otherDeagle) precioDeagle2 = guiCreateLabel(10, 10, 150, 23, "$10.000 /Balas: 50", false, otherDeagle) guiLabelSetColor(precioDeagle2, 0, 255, 12) --Daño guiSetVisible(damageLabel, false) damageDeagle = guiCreateLabel(79, 75, 114, 42, "Daño: 30", false, grayInfos) --Precision guiSetVisible(AQUI_VA_LA_PRECISION,false) accuracyDeagle = guiCreateLabel(78, 189, 115, 21, "1", false, grayInfos) --Target_range guiSetVisible(RangTLabel,false) RangoDeagle = guiCreateLabel(85, 249, 118, 29, "Rango: ", false, grayInfos) --Range minigun guiSetVisible(AQUI_VA_EL_RANGO,false) rangoDeagle = guiCreateLabel(79, 328, 120, 22, "Rango (arma):", false, grayInfos) rangeMaxDeagle = guiCreateLabel(82, 354, 111, 29, "38", false, grayInfos) --Disable minigun guiSetVisible(minigunImagenMAIN,false) guiSetVisible(minigunNombre,false) guiSetVisible(botonComprarDX,false) guiSetVisible(botonComprarDX2,false) guiSetVisible(labelComprarDX,false) guiSetVisible(labelComprarDX2,false) guiSetVisible(precioDXLAB,false) guiSetVisible(precioDXLAB2,false) guiSetVisible(damageLabelMinigun,false) guiSetVisible(MINIGUNaccuracy,false) guiSetVisible(RangTMinigun,false) guiSetVisible(RangoMinigunLabel,false) guiSetVisible(minigunRangeMax,false) --Disable Rocket Launcher HS guiSetVisible(HSimageMain,false) guiSetVisible(HSNombre,false) guiSetVisible(botonCompraHS,false) guiSetVisible(labelCompraHS,false) guiSetVisible(precioHS,false) guiSetVisible(HS2,false) guiSetVisible(LblHS2,false) guiSetVisible(HSprecioT,false) guiSetVisible(damageHS,false) guiSetVisible(HSaccuracy,false) guiSetVisible(RangoHS,false) guiSetVisible(rangeMaxHS,false) guiSetVisible(rangoHSLabel,false) --Disable lanzallamas guiSetVisible(lanzallamasWeapn,false) guiSetVisible(lanzaNombre,false) guiSetVisible(botonComprarLanzallamas,false) guiSetVisible(labelComprarLanzallamas,false) guiSetVisible(precioLanzallamas,false) guiSetVisible(otherLanzallamas,false) guiSetVisible(precioLanzallamas,false) guiSetVisible(damageFuego,false) guiSetVisible(accuracyFuegos,false) guiSetVisible(RangoFuego,false) guiSetVisible(rangoNormalFuego,false) guiSetVisible(rangeMaxFuego,false) ---NORMAL guiSetVisible(NormalNombre,false) guiSetVisible(launcherNormal,false) guiSetVisible(botonComprarDX2,false) guiSetVisible(botonCompraNormal,false) guiSetVisible(labelCompraNormal,false) guiSetVisible(precioNormal,false) guiSetVisible(otherNormal,false) guiSetVisible(lblNormal,false) guiSetVisible(precioTNrmal,false) guiSetVisible(damageNormal,false) guiSetVisible(accuracyNormal,false) guiSetVisible(RangoNormal,false) guiSetVisible(rangeMaxNormal,false) --Knife disable guiSetVisible(KnifeWep,false) guiSetVisible(KnifeNombre,false) guiSetVisible(botonComprarKnife,false) guiSetVisible(labelComprarKnife,false) guiSetVisible(precioKnife,false) guiSetVisible(otherKnife,false) guiSetVisible(lblKnife,false) guiSetVisible(precioTNrmal,false) guiSetVisible(damageKnife,false) guiSetVisible(accuracyKnifes,false) guiSetVisible(RangoKnife,false) guiSetVisible(rangoKnife,false) guiSetVisible(rangeMaxKnife,false) --Katana disable guiSetVisible(KatanaWep,false) guiSetVisible(KatanaNombre,false) guiSetVisible(botonComprarKatana,false) guiSetVisible(labelComprarKatana,false) guiSetVisible(precioKatana,false) guiSetVisible(otherKatanas,false) guiSetVisible(lblKatanas,false) guiSetVisible(precioKatana2,false) guiSetVisible(damageKatana,false) guiSetVisible(accuracyKatana,false) guiSetVisible(RangoKatana,false) guiSetVisible(rangoKatana,false) guiSetVisible(rangeMaxKatanas,false) addEventHandler("onClientGUIClick", botonComprarDeagle, addWeaponDeagle) end end addEventHandler("onClientGUIClick", root, clickInDesertIGEL) --Este es el trigger para que me de el arma y me quite el dinero. function addWeaponDeagle() triggerServerEvent("DeagleTakeMoney",localPlayer,player) end Quizá sea un error (aunque no creo que sea un error, creo que está mal hecho ) tonto, pero antes nunca había tenido este problema con los botones, y no sé como solucionarlo. Bueno, espero entiendan lo que digo y el código para que me puedan ayudar
  13. wndItems is a window but not working...
  14. Not working. :[ Debug: ERROR: freeroam\gui.lua:376: attemp to index local 'currentData' (a nil value) Is best create a panel since 0? or there some solution?
  15. Not work: function disableControls(wndItems) for i,ctrlName in ipairs({ "Balas(Explosivas)" }) do guiSetEnabled(getControl(wndItems, ctrlName), false) end end addEventHandler("onClientResourceStart", root, disableControls) Debug: WARNING: freeroam\fr_client.lua:106:Bad argument @ 'guiSetEnabled' [Expected gui-element at argument 1, got resource-data
  16. getControls doesn't exist in freeroam panel. Someone knows what to do to make it work guiSetEnabled in freeroam panel?
  17. --Client tblCoches={ {445}, {481}, } for i,v in pairs (tblCoches) do local vehicle = getVehicleNameFromID(v[1]) local row = guiGridListAddRow (TUGRID) guiGridListSetItemText (TUGRID, row, 1, vehicle, false, true) end local player = getLocalPlayer() addEventHandler("onClientGUIDoubleClick", root, function() if source == TUGRID then --Puedes cambiarlo a un boton, pero recuerda cambiar el onClientDoubleClick por onClientGUIClick si vas a usar botones local row, column = guiGridListGetSelectedItem(TUGRID) if ( row ~= guiGridListGetRowCount ( TUGRID ) and column ~= 0 ) then local vehicleID = guiGridListGetItemText ( TUGRID, row, 1 ) triggerServerEvent("onVehicle", player, vehicleID) --outputChatBox("Vehiculo:"..vehicleID.."") end end end) --Server car = {} function vehicle(vehicle) if car[source] then destroyElement(car[source]) end local vehicleID = getVehicleIDFromName(vehicle) local x,y,z = getElementPosition( source ); x = x + 5 car[source] = createVehicle( vehicleID, x, y, z ); return true; end addEvent("onVehicle", true) addEventHandler("onVehicle", root,vehicle)
  18. Mhm, freeroam used getControl for obtain variables/windows/labels. (i think) Line when defined ''BalasExplosivas'' { "btn", width=100, x=20, id ="BalasExplosivas",text="Balas explosivas" },
  19. Hi everyone, i have a problem when used guiSetEnabled in freeroam resource, this is the problem: WARNING:freeroam/fr_client.lua:107 Bad argument @ 'guiSetEnabled'[expected gui element at argument 1, got bolean] guiSetEnabled(getControl("BalasExplosivas"), false)
  20. Si lo leí, pero no entendí eso de añadir un parent imaginario y añadir/quitar pixeles.
  21. No entendí mucho... en el x = y = hay que poner la posición del panel? y en el w,h tu resolución? Otra cosa, me descargue un radar y usa este metodo: local sx, sy = guiGetScreenSize() local rt = dxCreateRenderTarget(397, 210) local xFactor, yFactor = sx/1366, sy/768 local yFactor = xFactor --otherwise the radar looses it's 2:3 ratio. dxDrawRectangle((67)*xFactor, sy-((245+10))*yFactor, (344)*xFactor, (226)*yFactor, tocolor(0, 0, 0, 175)) dxDrawImage((67+5)*xFactor, sy-((245+5))*yFactor, (344-10)*xFactor, (226)*yFactor, rt, 0, 0, 0, tocolor(255, 255, 255,255)) Cuál es la diferencia con lo que yo hice?
×
×
  • Create New...