Jump to content

3B00DG4MER

Members
  • Posts

    512
  • Joined

  • Last visited

Everything posted by 3B00DG4MER

  1. fetchRemote to download file and then you've to get local client file URL if in server then same just get local url where's the file going to download
  2. i make it but i have another problem when i drag there's a place only where to drag i made it only for Vertical ! addEventHandler("onClientClick",root,function(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld) for i,sb in ipairs(getElementsByType("dxScrollBar")) do if getElementData(sb,"hover") == true then triggerEvent("onClientDXSBClick",sb,button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld) end end end) addEvent("onClientDXSBClick",true) function dxScrollBarMove(element) if (isCursorShowing()) and getElementData(element,"isMoving") then local x,y = getCursorAbsolute() --setElementData(element,"x",x-getElementData(element,"Move:x")) dxScrollBarSetScroll(element,(y-getElementData(element,"Move:y"))) outputChatBox(y) end end function __scrollbar(button,state,absoluteX,absoluteY,worldX,worldY,worldZ,clickedWorld) local scrollbar = source if (button == "left" and state == "down") then setElementData(scrollbar,"isMoving",false) local x,y = dxGetPosition(scrollbar) local w,h = dxGetSize(scrollbar) local progress = dxScrollBarGetScroll(scrollbar) local type = getElementData(scrollbar,"type") if type == "Vertical" then if (intersect(x, y + dxScrollBarGetScroll(scrollbar), x + w, h ,absoluteX,absoluteY)) then outputChatBox(progress/100*(h-100)) setElementData(scrollbar,"isMoving",true) setElementData(scrollbar,"Move:y",absoluteY-y) end elseif type == "Horizontal" then if (intersect(x + progress/100*(w-100), y, 100, h)) then setElementData(scrollbar,"isMoving",true) end end end end addEventHandler("onClientClick",getRootElement(),function(button,state,absoluteX,absoluteY,worldX,worldY,worldZ,clickedWorld) if (button=="left" and state=="up") then for _,scrollbar in ipairs(getElementsByType("dxScrollBar")) do setElementData(scrollbar,"isMoving",false) end end end)
  3. I've a question about dragging mouse while it's click so i need to make a scrollbar goes up and down or left and right function __scrollbar(button,state,absoluteX,absoluteY,worldX,worldY,worldZ,clickedWorld) local scrollbar = source if (button == "left" and state == "down") then local x,y = dxGetPosition(scrollbar) local w,h = dxGetSize(scrollbar) local progress = dxScrollBarGetScroll(scrollbar) local type = getElementData(scrollbar,"type") if type == "Vertical" then if isMouseWithinRangeOf(x, y + progress/100*(h-100), w, 100) then -- Here check if is hold the mouse in scrollbar in (in Vert Only !!) end elseif type == "Horizontal" then if isMouseWithinRangeOf(x + progress/100*(w-100), y, 100, h) then -- Here check if is hold the mouse in scrollbar in (in Horizontal Only !!) end end end end Help !!
  4. There's no problem in debugscript i want to add all Upgrades of GTA in that table and set availability as false ["av"] = false, ["slotName"] = SlotName (here slot name of Upgrade) then remove upgrades that Compatible the current car and add it but set the availability as true ["av"] = true, ["slotName"] = slotName
  5. Hi Guys i wanted to create a table : it's make all upgrades of cars in the table and set them Available as False then get available Upgrades of current car and remove the upgrade same as the available upgrades and put it in the table and set them available as True Here is the function : function upgrade() local vehicle = getPedOccupiedVehicle(localPlayer) if not vehicle then return end local allUpgrades = {} local slotName for i=0, 16 do local upgrade = getVehicleUpgradeOnSlot ( vehicle, i ) local upgradeName = getVehicleUpgradeSlotName ( i ) local avFind = table.find(allUpgrades, "av", false ) local nameFind = table.find(allUpgrades, "slotName" ,upgradeName ) if nameFind == false then table.insert(allUpgrades, { [ "av" ] = false, [ "slotName" ] = upgradeName}) end end for i,upgrade in ipairs(getVehicleCompatibleUpgrades(vehicle)) do slotName = getVehicleUpgradeSlotName(upgrade) local nameFind = table.find(allUpgrades, "slotName" ,slotName ) local avFind = table.find(allUpgrades, "av", false ) if (nameFind == true) and (avFind == true) then table.remove(allUpgrades, i) table.insert(allUpgrades, {[ "av" ] = true, [ "slotName" ] = slotName} ) end end return allUpgrades end function table.find(t, ...) local args = { ... } if #args == 0 then for k,v in pairs(t) do if v then return k end end return false end local value = table.remove(args) if value == '[nil]' then value = nil end for k,v in pairs(t) do for i,index in ipairs(args) do if type(index) == 'function' then v = index(v) else if index == '[last]' then index = #v end v = v[index] end end if v == value then return k end end return false end
  6. Download it and take look on script (editbox)
  7. Next time, i've to Save wiki on my Brian Thanks
  8. Hi Guys, Today i making a new script dx GUI for my server BLAH Blah blah ..... what i want is How to trigger Event onClientRender and check if Left Mouse is Down without onClientClick Event cuz it will gives lagg on Event "OnClientRender" local sW, sH = guiGetScreenSize() function dxDrawButton(x, y, w, h, text, color, borderColor,font) local font = font or "pricedown" dxDrawRectangle(x ,y ,w ,h, color) dxDrawRectangle(x, y, w, 1, borderColor) dxDrawRectangle(x, y, 1, h, borderColor) dxDrawRectangle(x, y + h, w, 1, borderColor) dxDrawRectangle(x + w, y , 1, h, borderColor) if text then dxDrawText ( text, x, y, x + w, y + h, tocolor(31,31,31), 1, font, "center", "center") end if isMouseWithinRangeOf(x, y, w, h) then dxDrawRectangle(x ,y,w,h,tocolor(0,255,255)) -- I think here i put the event but i've to check first if Mouse Stat (if left Mouse is down) if text then dxDrawText ( text, x, y , x + w, y + h, tocolor(255,255,255), 1, font, "center", "center") end end end function isMouseWithinRangeOf(posX, posY, sizeX, sizeY) if isCursorShowing() == false then return false end local cx,cy = getCursorPosition() cx,cy = cx*sW,cy*sH if cx >= posX and cx <= posX+sizeX and cy >= posY and cy <= posY+sizeY then return true,cx,cy else return false end end
  9. IDK what's problem but it's work 100% i tested it in my bro comuter ! skype : themerzoug2020 or PM Me
  10. First: have u found the marker on CJ house ??!! Second : Dosen't matter where u put them
  11. There's a marker in grove street (CJ House) go there i created it You can change the place by editing on my resource ! Important !! : if it didn't work try to reconnect
  12. Next time use https://wiki.multitheftauto.com/wiki/Main_Page ! takePlayerMoney
  13. i think yea ! and now i'm made a resource for u https://community.multitheftauto.com/index.php?p= ... s&id=10660 Note: some vehicles only get armed with bomb (The vehicles are listed above ^^^)
  14. wait, i'll try to download dat script 'n test it
  15. This script you can use it to make your own script or you can go to Admin Panel Write this the field : call(getResourceFromName("bomber"), "regBombMarkers", getElementsByType("marker", getRootElement())) and press Client button it's will work
×
×
  • Create New...