Jump to content

Search the Community

Showing results for tags 'диограма'.

  • 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. Author and editor of Ilnaz Isangulov DxCreateDiagram Client-only function Draws an diargam on the screen for a single frame. In order for the diagram to stay visible continuously, you need to call this function with the same parameters on each frame update (see onClientRender). Syntax bool dxCreateDiagram (float N, float posX, float posY, float cleanWidth, int color = tocolor(255,255,255,255), float scaleXY = 1, bool postGUI = false) Required Arguments N: changing parameter, for example speed posX: the absolute X coordinate of the top left corner of the image posY: the absolute Y coordinate of the top left corner of the image cleanWidth: the width at which it will be cleaned and updated Optional Arguments color: Tints the image with a value produced by tocolor or hexadecimal number in format: 0xAARRGGBB (RR = red, GG = green, BB = blue, AA = alpha). postGUI: A bool representing whether the image should be drawn on top of or behind any ingame GUI (rendered by CEGUI). Example Example of a pendulum swinging from the top of the screen, made using dxDrawImage. local screenWidth,screenHeight = guiGetScreenSize() -- Get screen resolution. function renderDisplay ( ) dxCreateDiagram ( math.random ( 0, 200 ), 0, screenHeight / , , tocolor ( 255, 0, 255, 255 ) , 1, false ) end addEventHandler("onClientRender", root, renderDisplay) -- Keep everything visible with onClientRender. Author and editor of Ilnaz Isangulov This is required in the code! local dataTable = {} local zOld = 0 function dxCreateDiagram(N,x,y,cleanSize,color,size,gui) local _,h = guiGetScreenSize() local x = x or 0 local y = y or h/2 local N = N or 0 local cleanSize = cleanSize or h/2 local color = color or tocolor(255, 255, 255, 255) local size = size or 1 local gui = gui or false local izmen = (N-zOld) table.insert( dataTable, izmen) for i, z in pairs(dataTable) do local x3 = dataTable[i+1] or 1 local x2 = dataTable[i] or 1 if i >= cleanSize then for f,_ in pairs(dataTable) do table.remove(dataTable, f) end end dxDrawLine(x+(i-1), y+1-x2, x+i, y+1-x3, color,size,gui) end end Author and editor of Ilnaz Isangulov
×
×
  • Create New...