Jump to content

Search the Community

Showing results for tags 'loop 8'.

  • 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

Found 1 result

  1. hey i have a little problem here when converting a screen from 1600x900 to 800x600 i used some scaling tutorial @IIYAMA so i did loop and had some problem with screen sizes my screen screen user's 800x600: code: local devScreenX = 1920 local devScreenY = 1080 local screenX, screenY = guiGetScreenSize() local scaleValue = screenY / devScreenY scaleValue = math.max(scaleValue, 0.65) -- < here add the limit addEventHandler("onClientResourceStart",resourceRoot, function() setPlayerHudComponentVisible("all", false) end) local dash = { menu = {"Hello There","Hello There2","Hello There3","Hello There4","Hello There5","Hello There6"}, } addEventHandler("onClientRender", root, function () -- create a scaled size local sizeX = scaleValue * 180 local sizeY = scaleValue * 40 -- get the center of the screen local centerX = screenX - screenX local centerY = screenY / 2 -- calculate the starting point of the rectangle local startRectangleX = centerX local startRectangleY = centerY - (sizeY / 0.5) local offsetY = 0 dxDrawRectangle ( startRectangleX, startRectangleY, sizeX, sizeY, tocolor ( 0, 0, 0, 180 ) ) offsetY = offsetY + startRectangleY*0.15 dxDrawRectangle ( startRectangleX, startRectangleY+offsetY, sizeX, sizeY, tocolor ( 0, 0, 0, 180 ) ) offsetY = offsetY + startRectangleY*0.15 dxDrawRectangle ( startRectangleX, startRectangleY+offsetY, sizeX, sizeY, tocolor ( 0, 0, 0, 180 ) ) offsetY = offsetY + startRectangleY*0.15 dxDrawRectangle ( startRectangleX, startRectangleY+offsetY, sizeX, sizeY, tocolor ( 0, 0, 0, 180 ) ) offsetY = offsetY + startRectangleY*0.15 dxDrawRectangle ( startRectangleX, startRectangleY+offsetY, sizeX, sizeY, tocolor ( 0, 0, 0, 180 ) ) offsetY = offsetY + startRectangleY*0.15 dxDrawRectangle ( startRectangleX, startRectangleY+offsetY, sizeX, sizeY, tocolor ( 0, 0, 0, 180 ) ) --[[local offsetY = 0 local posY = startRectangleY * 0.022 dxDrawText("Hello There!", startRectangleX, startRectangleY+posY, sizeX, sizeY,tocolor(255,255,255,255),1,"default-bold","right","top") offsetY = offsetY + startRectangleY * 0.17 dxDrawText("Hello There!", startRectangleX, startRectangleY+offsetY, sizeX, sizeY,tocolor(255,255,255,255),1,"default-bold","right","top") offsetY = offsetY + startRectangleY * 0.15 dxDrawText("Hello There!", startRectangleX, startRectangleY+offsetY, sizeX, sizeY,tocolor(255,255,255,255),1,"default-bold","right","top") offsetY = offsetY + startRectangleY * 0.155 dxDrawText("Hello There!", startRectangleX, startRectangleY+offsetY, sizeX, sizeY,tocolor(255,255,255,255),1,"default-bold","right","top") offsetY = offsetY + startRectangleY * 0.145 dxDrawText("Hello There!", startRectangleX, startRectangleY+offsetY, sizeX, sizeY,tocolor(255,255,255,255),1,"default-bold","right","top") offsetY = offsetY + startRectangleY * 0.15 dxDrawText("Hello There!", startRectangleX, startRectangleY+offsetY, sizeX, sizeY,tocolor(255,255,255,255),1,"default-bold","right","top")]] -- THIS WORK WITHOUT LOOP local posY = startRectangleY * 1.88 for i,v in ipairs(dash.menu) do dxDrawText(v, startRectangleX, posY-startRectangleY+i*57, sizeX, sizeY,tocolor(255,255,255,255),1,"default-bold","right","top") end end)
×
×
  • Create New...