ilnaz

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ilnaz

  • Rank
    I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

Recent Profile Visitors

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

  1. ilnaz

    Create Diagram or Graph

    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
  2. ilnaz

    help table lua

    markerData = { location = '1', { [1] = { 1216, -1835, 13.4}, [2] = { 1227.7, -1854.6, 13.4}, }, location = '2', { [1] = { 0, 0, 0}, [2] = { 1227.7, -1854.6, 13.4}, }, location = '3', { [1] = { 1216, -1835, 13.4}, [2] = { 1227.7, -1854.6, 13.4}, }, } local selLocation = 2 for _,tab in pairs(markerData) do if tab['location'] == selLocation then local x, y, z = markerData[ID][1], markerData[ID][2], markerData[ID][3] -- Problem markerData[ID][1] end end