Jump to content

Search the Community

Showing results for tags 'dx'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. local x,y = guiGetScreenSize() local px,py = 1280,720 local x,y = (sx/px), (sy/py) function hud () dxDrawImage(x*918, y*0, x*362, y*58, ":br_hud/shruk.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("$", x*955, y*19, x*1089, x*68, tocolor(0, 177, 142, 255), 1.30, "default-bold", "left", "top", false, false, false, false, false) end addEventHandler("onClientRender", root, hud)
  2. Olá como faço para tirar os pixels ruins estou fazendo um circulo progresivo de acordo com o life do jogador, por isso optei por essa função. imagem : https://imgur.com/a/8p3A6Gk
  3. local redcircle = dxCreateTexture("teszt.png") addEventHandler("onClientRender", root, function() dxDrawMaterialLine3D(-1989.73804, 214.91431, 50,-1989.73804, 214.91431,43.1096496582031, redcircle, 6, tocolor(255,255,255),0,5,6) end) I change numbers, but i cannot rotate the image... how to rotate the image? sorry for my bad english..
  4. سلام عليكم ورحمه الله وبركاته بدون مقدمات ندخل في الموضوع دايركت فيديو يوضح آلية عمل المود : المود بأختصار تحفظ الشخصية الي معك بأسم واذا كان سي جي تقدر تلبسه وتحفظ الملابس الي لبسته عليه وتقدر تحذف وتختار الشخصية من الجريد ليست وقابل ان يكون اكثر من مليون صفحة اعتماداً على الاكوانت داتا openSkins المود يفتح بأمر المود مافيه حقوق ولا هو مشفر سويته للي يبي يتعلم ماحلل الي يحط حقوقه ويقول انه مسويه ((: رابط التحميل: https://up.top4top.net/downloadf-8640t4o01-zip.html واتمنى من كل واحد يشوف الموضوع يدعي لي بالخير :)) الاهداء للكل دون استثناء @oscarhrb وتم عمل المود لأن فيه واحد طلبه معليش في الفيديو كنت شوي مفهي
  5. Estou com um poble,a não faço ideia do que usar para fzr a DX Sumir Junto com os button de login depois que logar.
  6. Alguem que saiba mexer com dx pode me ajudar a fazer as coisas igual do guiCreateEdit só que em dx? guiCreateEdit Exemplo:Botar para escrever algo no retangle do dx.
  7. I want create a dxdraw rectangle and text on the map. But how to make this possible?
  8. Hi, is there already a way to make the default gui editboxes transparent? It seems to always have a white background, which doesn't look so good if they are used within a dx environment. If not, then this might be a good way to make the default editboxes usable outside of an actual gui window. @ccw Bonsai
  9. dxلوسمحت عايز كود اخفاء لوحة مش لاقيه في الويكي وعايز معني ده dxGetVisible
  10. Hola, estoy tratando de crear una 'dxList' en donde automáticamente se agreguen 'ROWS', usualmente usaba Dx combinado con GUI pero me dieron ganas de crear una especie de gridListDx sin usar DGS, por el momento solo he agregado jugadores a un solo row, como logro que se detecte que ya existe un jugador en esa row y se cree otra un poco mas abajo ? Y = 336 function DX() dxDrawRectangle(561, 326, 223, 320, tocolor(0, 0, 0, 180), false) dxDrawRectangle(561, 336, 223, 30, tocolor(42, 42, 42, 180), false) dxDrawRectangle(561, 296, 223, 30, tocolor(42, 42, 42, 180), false) for k, v in ipairs( getElementsByType( "player" ) ) do JUGADOR = getPlayerName( v ) if getPlayerName( v ) == JUGADOR then dxDrawText( JUGADOR, 561, Y, 784, 365, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) else end end end addEventHandler( "onClientRender", root, DX )
  11. I would apperciate it very much if you could give some advice on DGS.
  12. I want create this effect: Effect with a dx image. But i don't know, how to make this possible.. Anyone can help?
  13. Personally, I'm posting in this category, in case this post can not be here I remove. Well, I'm putting together a "Vip Panel" for my server. The problem I'm having is that when I set up the position with the DX for example: Skin 1 - Skin 2 Vehicle 1 - Vehicle 2 Life / Armor - Weapons Destroy vehicle Skins 1 and 2 work perfectly when you click Vehicles 1 and 2 are also working properly But when I click either on Life / Armor or on Guns he gives me the cars I set for the buttons on vehicles Can someone help me? Below are the codes server.lua function showPanel(thePlayer) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("hawk")) then triggerClientEvent(thePlayer, "STOP", getRootElement()) else end end function onResStart() for index, player in ipairs(getElementsByType("player")) do bindKey(player, "o", "down", showPanel) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onResStart) function onPlayerJoin() bindKey(source, "o", "down", showPanel) end addEventHandler("onPlayerJoin", getRootElement(), onPlayerJoin) function cleanAll(player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player, "o", "down", showPanel) end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), cleanAll) function skin1 () setPedSkin ( source, 1 ) end addEvent("skinns1",true) addEventHandler ( "skinns1", getRootElement(), skin1 ) function skin2 () setPedSkin ( source, 303 ) end addEvent("skinns2",true) addEventHandler ( "skinns2", getRootElement(), skin2 ) veh = {} function criarxx() if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] ) veh[source] = nil end local x,y,z = getElementPosition(source) veh[source] = createVehicle(562, x,y,z + 2) warpPedIntoVehicle (source,veh[source]) end addEvent("carro1",true) addEventHandler("carro1",root,criarxx) veh = {} function criarxx() if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] ) veh[source] = nil end local x,y,z = getElementPosition(source) veh[source] = createVehicle(413, x,y,z + 2) warpPedIntoVehicle (source,veh[source]) end addEvent("carro2",true) addEventHandler("carro2",root,criarxx) function vida() setElementHealth(source, 100) setPedArmor(source, 100) end addEvent("vida", true) addEventHandler("vida", root, vidas) function arms () giveWeapon ( source, 31, 9999 ) giveWeapon ( source, 34, 9999 ) giveWeapon ( source, 28, 9999 ) giveWeapon ( source, 27, 9999 ) giveWeapon ( source, 24, 9999 ) giveWeapon ( source, 23, 9999 ) end addEvent("arms",true) addEventHandler ( "arms", getRootElement(), arms ) function destruircarro () destroyElement ( veh[source] ) end addEvent ("destroy", true) addEventHandler ("destroy", getRootElement(), destruircarro) client.lua painel = false function abrir () dxDrawRectangle(24, 230, 450, 280, tocolor(0, 0, 0, 190), false) dxDrawRectangle(34, 245, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 245, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 305, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 305, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 365, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 365, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 425, 430, 50, tocolor(181, 15, 19, 169), false) dxDrawRectangle(24, 172, 450, 48, tocolor(0, 0, 0, 190), false) dxDrawText("PAINEL EXCLUSIVO [Hawk]", 24, 172, 474, 220, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("SKIN 1", 34, 245, 244, 295, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("SKIN 2", 254, 245, 464, 295, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VEÍCULO 1", 34, 305, 244, 355, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VEÍCULO 2", 254, 305, 464, 355, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VIDA/COLETE", 34, 365, 244, 415, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("ARMAS", 254, 365, 464, 415, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("DESTRUIR VEÍCULO", 34, 425, 464, 475, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Créditos: KingBC | Role Play Brasil", 24, 485, 474, 505, tocolor(255, 255, 255, 255), 1.00, "clear", "center", "center", false, false, false, false, false) end function abrirbind() if painel == false then showCursor (true) addEventHandler ("onClientRender", root,abrir) painel = true else if painel == true then showCursor(false) removeEventHandler("onClientRender",root,abrir) painel = false end end end addEvent("STOP", true) addEventHandler("STOP", getRootElement(), abrirbind) function isCursorOnElement(x,y,w,h) local mx,my = getCursorPosition () local fullx,fully = guiGetScreenSize() cursorx,cursory = mx*fullx,my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end function skin1 (_,state) if painel == true then if state == "down" then if isCursorOnElement(34, 245, 244, 295 ) then triggerServerEvent ("skinns1", localPlayer) end end end end addEventHandler ("onClientClick", root, skin1) function skin2 (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 245, 464, 295 ) then triggerServerEvent ("skinns2", localPlayer) end end end end addEventHandler ("onClientClick", root, skin2) function veiculo1 (_,state) if painel == true then if state == "down" then if isCursorOnElement(34, 305, 244, 355 ) then triggerServerEvent ("carro1", localPlayer) end end end end addEventHandler ("onClientClick", root, veiculo1) function veiculo2 (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 305, 464, 355 ) then triggerServerEvent ("carro2", localPlayer) end end end end addEventHandler ("onClientClick", root, veiculo2) function vidas(_,state) if painel == true then if state == "down" then if isCursorOnElement (34, 365, 244, 415) then triggerServerEvent ("vida", getLocalPlayer()) end end end end addEventHandler ("onClientClick", root, vidas) function arms (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 365, 464, 415 ) then triggerServerEvent ("arms", localPlayer) end end end end addEventHandler ("onClientClick", root, arms) function destroy (_,state) if painel == true then if ( isCursorOnElement (34, 425, 464, 475) ) then --- destruir triggerServerEvent ("destroy", localPlayer) end end end addEventHandler ("onClientClick", root, destroy)
  14. http://prntscr.com/iaz934 Queria saber como faz um texto assim em cima das coisas, EX:Em cima de markers, e nos pickup.
  15. ShayF2

    Round Robin

    Hello. I'm a scripter for MTA:SA, many of you have seen me on the forums, posting helpful things on your threads. Today I need some help. This code below is code to create dx gridlists. I use arrow keys to control what I select. However when the gridlist can show 5 items at a time and I only put 3 in, it seems to overlap, thinking that there is an extra index. So long as the gridlist has at least 5 items it'll work perfectly fine. Could someone please help me fix this round robin effect? function dxCreateGridlist(x,y,w,h) local self = dx('gridlist','default',x,y,w,h) if self then self.itemHeight = 25 self.maxItems = math.floor(self.h/self.itemHeight) self.bgColor = tocolor(0,0,0,180) self.selectedColor = tocolor(80,80,80,180) self.textColor = tocolor(255,255,255,200) self.startPos = 1 self.endPos = 20 self.currentItem = 1 self.itemSpacing = 2 self.selected = 1 self.items = {} self.draw = function() self.endPos = self.startPos+self.maxItems local yOff = 0 for i=self.startPos,self.endPos do if self.items[i] then if i == self.selected then dxRect(self.x,self.y+yOff,self.w,self.itemHeight-self.itemSpacing,self.selectedColor) dxText(self.items[i].text,self.x,self.y+yOff,self.w,self.itemHeight-self.itemSpacing,self.textColor) else dxRect(self.x,self.y+yOff,self.w,self.itemHeight-self.itemSpacing,self.bgColor) dxText(self.items[i].text,self.x,self.y+yOff,self.w,self.itemHeight-self.itemSpacing,self.textColor) end yOff = yOff+((self.itemHeight))+self.itemSpacing end end end self.addItem = function(text) local item = {} item.text = text table.insert(self.items,item) end self.itemsClear = function() for k=1,#self.items do table.remove(self.items,k) end end self.onKey = function(key,state) if state then if key == 'num_8' then if self.selected < self.startPos then if self.selected <= 1 then self.startPos = #self.items-self.maxItems self.selected = #self.items else self.startPos = self.startPos-1 end else self.selected = self.selected-1 end elseif key == 'num_2' then if self.selected > self.endPos then if self.selected >= #self.items then self.selected = 1 self.startPos = 1 else self.startPos = self.startPos+1 end else self.selected = self.selected+1 end elseif key == 'num_enter' then outputChatBox(self.items[self.selected].text) end end end table.insert(draw,self) return self end end
  16. i want change the needle color if speed >= 240, but does not working how to fix this? what wrong? no error(s)/warning(s)
  17. i created a dx panel, and i created some onClientClick event for this panel. but when i hide the panel, the onClientClick events are working.. how to fix this?
  18. Bom pessoal, fiz recentemente um painel de recrutamento, no qual o jogador pode criar um recrutamento em determinado local, dimensão, e teletransporte. O sistema funcionou corretamente, porém, preciso duplicar esse recurso para que duas gangs possam usa-lo, e quando dupliquei os dois mods eles bugaram, como se eu estivesse usando dois painéis, por exemplo: quando crio um recrutamento através do painel do resource painelrecrutar_w ele cria o recrutamento nesse recurso e no outro(painelrecrutar), como criando dois teletransportes. Já tive esse mesmo problema ao duplicar painéis, quando uso um parece que estou usando dois(o duplicado e original). Alguém sabe como resolver esse problema? Grato.
  19. السلام عليكم شباب انا بجرب اعمل زر بيتغير لونه فى لوحه دى اكس عوز لما اشاور على الكلمه اللونه يتغير دلوقتى انا لما بشاور على الكلمه اللون بيتغير تمام .. بس دلوقتى لما بشاور فى ايه حته ف اللوحه لون الكلمه بيتغير انا عاوز لما اشاور على الكلمه بس لونو يتغير مش لما اشاور ف كل حته وشكرا function cursorPosition(x, y, w, h) if (not isCursorShowing()) then return false end local mx, my = getCursorPosition() local fullx, fully = guiGetScreenSize() cursorx, cursory = mx*fullx, my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end ------ function pro() dxDrawRectangle(382, 327, 492, 230, tocolor(0, 0, 0, 126), true) if(cursorPosition(587, 428, 681, 454))then----عند لمس الزر dxDrawText("Kill", 587, 428, 681, 454, tocolor(255, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, true, true, true, true) else dxDrawText("Kill", 587, 428, 681, 454, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", true, true, true, true, true) end end
  20. Hi! I have a problem with my DX script. I made a DX screen that gets the items in a table and display it on the rectangle The problem is, it's multiplying everything that is related with the text. This is how the issue looks in game, look at the rectangle with the texts, it's multiplying everything! And here is my code: ------------------------------------------------------- local itemList = { {"Wooden Wall"}, {"Wooden Doorway"}, {"Wooden Window"}, {"Wooden Floor"}, {"Wooden Floorport"}, {"Wooden Stairs"}, {"Wooden Fence"}, {"Wooden Door"}, {"Wooden Gate"}, {"Metal Wall"}, {"Metal Doorway"}, {"Metal Window"}, {"Metal Floor"}, {"Metal Floorport"}, {"Metal Stairs"}, {"Metal Fence"}, {"Metal Door"}, {"Metal Gate"}, {"Concrete Wall"}, {"Concrete Doorway"}, {"Concrete Window"}, {"Concrete Floor"}, {"Concrete Floorport"}, {"Concrete Stairs"}, {"Concrete Fence"}, {"Reinforced Door"}, {"Reinforced Gate"}, } ------------------------------------------------------- function returnTableCount (tab) count = 1 if ( getLocalPlayer() ) then for i,item in ipairs(tab) do if ( item ) then count = count + 1 end end return count end return false end ------------------------------------------------------- local totalRows = returnTableCount(itemList) local iRows = totalRows local iVisibleRows = 20 local iCurrentCell = 0 ------------------------------------------------------- local screenWidth,screenHeight = guiGetScreenSize() local screenW, screenH = guiGetScreenSize() local sx,sy = guiGetScreenSize() local px,py = 1366,768 local x,y = (sx/px), (sy/py) ------------------------------------------------------- function isCursorOverRectangle(x,y,w,h) if isCursorShowing() then local mx,my = getCursorPosition() cursorx,cursory = mx*px,my*py if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true end end return false end function drawInventory () if ( getElementData(getLocalPlayer(),"viewingInv") ) then titleTable = dxDrawRectangle(x*050, y*040, x*350, y*45, tocolor(0, 77, 126, 170), false) titleText = dxDrawText("Building",x*060, y*055, x*250, y*30,tocolor(255,255,255, 255)) mainTable = dxDrawRectangle(x*050, y*090, x*350, y*640, tocolor(0, 0, 0, 170), false) for i,item in ipairs(itemList) do for ki = iCurrentCell, iVisibleRows+iCurrentCell-1 do visibleI = ki - iCurrentCell dxDrawRectangle(x*050+x*350, y*090+y*640/iRows*iCurrentCell, 5, y*640/iRows*iVisibleRows) itemBackground = dxDrawRectangle(x*060, y*100+visibleI*31, x*200, y*30, tocolor(0, 0, 0, 200), false) itemText = dxDrawText(item[1],x*070, y*107+visibleI*31, x*250, y*30,tocolor(255,255,255, 255)) --Problem is here :C useBackground = dxDrawRectangle(x*265, y*100+visibleI*31, x*60, y*30, tocolor(0, 0, 0, 200), false) useText = dxDrawText("Text",x*282, y*107+visibleI*31, x*250, y*30,tocolor(255,255,255, 255)) dropBackground = dxDrawRectangle(x*330, y*100+visibleI*31, x*60, y*30, tocolor(0, 0, 0, 200), false) dropText = dxDrawText("Text",x*347, y*107+visibleI*31, x*250, y*30,tocolor(255,255,255, 255)) if isCursorOverRectangle(x*060, y*100+visibleI*31, x*200, y*30) or isCursorOverRectangle(x*265, y*100+visibleI*31, x*60, y*30) or isCursorOverRectangle(x*330, y*100+visibleI*31, x*60, y*30) then dxDrawRectangle(x*060, y*100+visibleI*31, x*200, y*30, tocolor(0, 77, 126,20)) dxDrawRectangle(x*265, y*100+visibleI*31, x*60, y*30, tocolor(0, 77, 126,20)) dxDrawRectangle(x*330, y*100+visibleI*31, x*60, y*30, tocolor(0, 77, 126,20)) end end end end end addEventHandler("onClientRender",getRootElement(),drawInventory) function rustCraftScrollUp () if ( getElementData(getLocalPlayer(),"viewingInv") ) then if isCursorOverRectangle(x*050, y*090, x*350, y*640) then iCurrentCell = iCurrentCell - 1 if iCurrentCell < 0 then iCurrentCell = 0 end end end end bindKey("mouse_wheel_up","down",rustCraftScrollUp) function rustCraftScrollDown () if ( getElementData(getLocalPlayer(),"viewingInv") ) then if isCursorOverRectangle(x*050, y*090, x*350, y*640) then iCurrentCell = iCurrentCell + 1 if iCurrentCell > iRows-iVisibleRows then iCurrentCell = iRows-iVisibleRows end end end end bindKey("mouse_wheel_down","down",rustCraftScrollDown) function showInventory () if ( getElementData(getLocalPlayer(),"viewingInv") ) then setElementData(getLocalPlayer(),"viewingInv",false) showCursor(false) showChat(true) else setElementData(getLocalPlayer(),"viewingInv",true) showCursor(true) showChat(false) end end bindKey("k","down",showInventory) How can I get the items in that table 'itemList' and put it in the screen that the dxGridList works without multiplying those stuff? I hope you guys undestand my problem :v pls help
  21. i am looking for example of dx button (rectangle/text). I tried to find info at forum/wiki but nothing understood(( Example (some code show/hide dx window+img+rectangle+text using key "i") --have it (code that spawns car/changes skin on clicked dx rectangle/text --Nothing of it(( local rectangleData = { x = 0, y = 0, width = 100, height = 20 } addEventHandler ( "onClientRender", root, function ( ) dxDrawRectangle ( rectangleData.x, rectangleData.y, rectangleData.width, rectangleData.height, tocolor ( 0, 0, 0, 120 ) ) end ) addEventHandler ( "onClientClick", root, function ( _, _, x, y ) if ( x >= rectangleData.x and x <= rectangleData.x + rectangleData.width and y >= rectangleData.y and y <= rectangleData.y + rectangleData.height ) then outputChatBox ( "On rectangle click!" ) end end ) I found this code but it is long and execute twice in game (noob lvl of lua + russian=poor english+stupid questions sry :3 )
  22. Hello everyone. I need some help here. I wan't to create a DX Inventory for my server, with some buttons. I created a script that creates the inventory but only 1 button is working. local newInvItems = { {"Assault Rifle"}, {"AK-47"}, {"Sniper"}, {"Pump Shotgun"}, {"Crossbow"}, {"Custom SMG"}, {"Shotgun"}, {"Semi-Automatic Pistol"}, {"Machete"}, {"5.56 Rifle Ammo"}, {"Sniper Rifle Ammo"}, {"12 Gauge"}, {"Pistol Bullet"}, {"Wooden Arrow"}, {"SMG Ammo"}, {"Apple"}, {"Banana"}, {"Orange"}, {"Tomato"}, {"Cereal Box"}, {"Juice Box"}, {"Milk Bottle"}, {"Water Bottle"}, {"Raw Meat"}, {"Cooked Meat"}, {"Battery"}, {"Gallon (Fuel)"}, {"Gallon (Empty)"}, {"Bottle (Empty)"}, {"Medical Satchel"}, {"Rags"}, {"Cloth"}, {"Gun Powder"}, {"Alcohol Bottle"}, {"Wood"}, {"Metal"}, {"Stone"}, {"Building Tool"}, {"Fishing Rod"}, {"Cannabis Seed"}, {"Cannabis Medicinal"}, {"Sulphur"}, {"Charcoal"}, {"Axe"}, {"Pickaxe"}, {"C4"}, {"Lock"}, {"Map"}, {"GPS"}, {"Watch"}, {"Toolbox"}, {"Medium Backpack"}, {"Large Backpack"}, {"Top Hat"}, {"Witch Hat"}, {"Horn Hat"}, {"Pizza Hat"}, {"Police Hat"}, {"SWAT Hat"}, {"SWAT Armour"}, {"Chicken Head"}, {"Gas Mask"}, {"Eyepatch"}, {"Motorcycle Helmet"}, } local screenW, screenH = guiGetScreenSize() local inventoryLimit = 28 showCursor(true) function renderInventory () mainTable = dxDrawRectangle(10, (screenH - 583) / 2, 260, 598, tocolor(0, 0, 0, 170), false) lootTable = dxDrawRectangle(10, (screenH - 670) / 2, 260, 38, tocolor(0, 77, 126, 150), false) rowNumber = 0 for i,item in ipairs(newInvItems) do if ( getElementData(getLocalPlayer(),item[1]) >= 1 ) then if not ( rowNumber > inventoryLimit ) then rowNumber = rowNumber + 1 itemBackground = dxDrawRectangle(20, 85+rowNumber*20, 185, 15, tocolor(0, 77, 126, 150), false) takeBackground = dxDrawRectangle(210, 85+rowNumber*20, 50, 15, tocolor(0, 77, 126, 150), false) itemText = dxDrawText(item[1].." ("..getElementData(getLocalPlayer(),item[1]).."x)",25,85+rowNumber*20,tocolor(255,255,255, 255)) takeText = dxDrawText("Take",221,85+rowNumber*20,tocolor(255,255,255, 255)) end end end end addEventHandler("onClientRender", root, renderInventory) function inventoryClickDetect (button,state,x,y) if ( button == "left" ) then if ( state == "down" ) then if ( x >= 210 and x <= 210 + 50 and y >= 85+rowNumber*20 and y <= 85+rowNumber*20 + 15 ) then outputChatBox("Test!") end end end end addEventHandler("onClientClick",root,inventoryClickDetect) It creates all buttons and all things, but only the last button created is working. How can I make for every button to work? sorry for my bad english, I'm brazilian
  23. local start = getTickCount() local one, one1 = -300, 604 local two, two1 = 0, 604 local screenW, screenH = guiGetScreenSize() local text = "" local pic = "j" function draw() local x,y = interpolateBetween(one, one1, 0, two, two1, 0, (now - start) / ((start + 1500) - start), "Linear") local now = getTickCount() dxDrawRectangle(x,y, screenW * 0.2306, screenH * 0.0356, tocolor(0, 0, 0, 130), false) dxDrawText(" * "..text, x, y, screenW * 0.2340, screenH * 0.7044, tocolor(255, 255, 255, 255), 1.00, "default", "left", "center", false, false, false, true, false) end addEventHandler("onClientPlayerChangeNick", root, function(oldName, newName) addEventHandler("onClientRender", root,draw) text = string.format("#%02X%02X%02X", getPlayerNametagColor(source)) .. oldName .. " #FFffFFneve mostantól " .. string.format("#%02X%02X%02X", getPlayerNametagColor(source)) .. newName .. "" pic = "c" setTimer ( function() removeEventHandler("onClientRender", root, draw) end, 5000, 1 ) end ) this is my code. the dx things are working, just the animation does not working how to fix? sorry for my very bad english :C
  24. I think the Title says it all. What dxSetRenderTarget() is used for?And could you give me some example other than on the wiki?
  25. NeXuS™

    [DEV] dxLib

    NeXuS™ presents dxLib Introduction You want to work with dx functions, but you don't understand them? This is a script for you. You can create panels created by dx functions just like with GUI functions. Status IN DEVELOPMENT Sorry guys, its not finished yet, so I'm not publishing it. This is just a show off, that you'll get this in weeks. Whats done already Screenshots Syntax
×
×
  • Create New...