Jump to content

OfficialLive

Members
  • Posts

    13
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

OfficialLive's Achievements

Square

Square (6/54)

0

Reputation

  1. https://community.multitheftauto.com/in ... s&id=13508
  2. https://community.multitheftauto.com/in ... s&id=12594
  3. Thanks, but I have already been solved. if (doesCollide(Bigmap.PosX, Bigmap.PosY, Bigmap.Width, Bigmap.Height, areaX, areaY, areaWidth, areaHeight)) then if (areaX < Bigmap.PosX) then areaWidth = areaWidth - math.abs((Bigmap.PosX) - (areaX)); areaX = areaX + math.abs((Bigmap.PosX) - (areaX)); elseif (areaX + areaWidth > Bigmap.PosX + Bigmap.Width) then areaWidth = areaWidth - math.abs((Bigmap.PosX + Bigmap.Width) - (areaX + areaWidth)); end if (areaY < Bigmap.PosY) then areaHeight = areaHeight - math.abs((Bigmap.PosY) - (areaY)); areaY = areaY + math.abs((Bigmap.PosY) - (areaY)); elseif (areaY + areaHeight > Bigmap.PosY + Bigmap.Height) then areaHeight = areaHeight - math.abs((Bigmap.PosY + Bigmap.Height) - (areaY + areaHeight)); end dxDrawRectangle(areaX, areaY, areaWidth, areaHeight, tocolor(areaR, areaG, areaB, areaA), false); end E: math.abs fixed
  4. The problem still exists. The rectangle going out the map.
  5. Hello. I have a problem with custom f11 map radar areas. The rectangle perfectly working, but going out of the map dx frame. How to clip the rectangles, or what? Currently (bad): And the perfect illustration (how to?): Code: for _, area in ipairs(getElementsByType('radararea')) do local areaX, areaY = getElementPosition(area); local areaWidth, areaHeight = getRadarAreaSize(area); local areaR, areaG, areaB, areaA = getRadarAreaColor(area); if (isRadarAreaFlashing(area)) then local flashTick = getTickCount() % 1500; areaR, areaG, areaB = flashTick <= 750 and 255 or areaR, flashTick <= 750 and 0 or areaG, flashTick <= 750 and 0 or areaB; end local areaX, areaY = getMapFromWorldPosition(areaX, areaY + areaHeight); local areaWidth, areaHeight = areaWidth / Bigmap.CurrentZoom * Minimap.MapUnit, areaHeight / Bigmap.CurrentZoom * Minimap.MapUnit; -- how to clip the rectangles? dxDrawRectangle(areaX, areaY, areaWidth, areaHeight, tocolor(areaR, areaG, areaB, areaA), false); end function getMapFromWorldPosition(worldX, worldY) local playerX, playerY, playerZ = getElementPosition(localPlayer); local centerX, centerY = (Bigmap.PosX + (Bigmap.Width / 2)), (Bigmap.PosY + (Bigmap.Height / 2)); local areaLeftFrame = centerX - ((playerX - worldX) / Bigmap.CurrentZoom * Minimap.MapUnit); local areaRightFrame = centerX + ((worldX - playerX) / Bigmap.CurrentZoom * Minimap.MapUnit); local areaTopFrame = centerY - ((worldY - playerY) / Bigmap.CurrentZoom * Minimap.MapUnit); local areaBottomFrame = centerY + ((playerY - worldY) / Bigmap.CurrentZoom * Minimap.MapUnit); centerX = math.max(areaLeftFrame, math.min(areaRightFrame, centerX)); centerY = math.max(areaTopFrame, math.min(areaBottomFrame, centerY)); return centerX, centerY; end
  6. local screenX, screenY = guiGetScreenSize(); addEventHandler("onClientRender", root, function() if enabled == true then local height = 15 local lenght2 = dxGetTextWidth("Buy weapon", 1, "bankgothic") button = dxDrawOutlinedRectangle(1, tocolor(255, 165, 0, 170), x/2-200, y/2+150, 400, 30, tocolor(255, 255, 255, 130), false) dxDrawOutlinedText(tocolor(255, 165, 0, 255), "Buy weapon", x/2-lenght2/2, y/2+150, 200, 20, tocolor(0, 0, 0, 255), 1, "bankgothic", nil, nil, nil, nil, true) sx, sy = getCursorPosition() sx, sy = sx * screenX, sy * screenY; if (sx >=x/2-200 and sx <=x/2+200) and (sy >=y/2+150 and sy <=y/2+180) then dxDrawRectangle(x/2-200, y/2+150, 400, 30, tocolor(255, 255, 255, 80), true) end end end )
  7. Hello guys! I ask for your help in It can change it to a separate the handling flags, so that the old flag is maintained. Example: Front wheel = very narrow | Rear wheel = very wide I tried already, but still moves them both. How do you divide up the handling flags, after work as well. Thanks for help.
  8. https://community.multitheftauto.com/index.php?p= ... s&id=12364 CPU Usage script By Xenius
  9. Unfortunately, this is not enough because it does not work as I would like: / Sort of I like to know what's in the SeeMTA Tuning system / SAS-Network tuning system vehicle camera
  10. OfficialLive

    Camera

    How can it be resolved that the camera (currently viewing direction) can be moved with arrows (up, down, left, right), for example, a vehicle component around.
  11. Use keys, left - right - up down to move camera. How?
  12. Thanks, work. And how to move camera around the car and component with current camera position? Thanks.
  13. Hello everywhere! I need help How to set camera matrix to vehicle component? (I make tuning system for public) I used getPositionFromElementOffset, but don't work all cars Sorry my english
×
×
  • Create New...