Ders Sahibi


BARİSERDOGAN

Oluşturma Tarihi: 22.09.2019

Bu ders size yardımcı oldumu?

Evet (0) (0) Hayır

DxDrawLine

  • Söz Dizimi
bool dxDrawLine ( int startX, int startY, int endX, int endY, int color [, float width = 1.0, bool postGUI = false ] )

 

  • Client Kod
function drawCircle( x,y, radius, color )
    local numPoints = math.floor( math.pow( radius, 0.4 ) * 5 )  
    local step = math.pi * 2 / numPoints
    local sx,sy
    for p=0,numPoints do
        local ex = math.cos ( p * step ) * radius
        local ey = math.sin ( p * step ) * radius
        if sx then
            dxDrawLine( x+sx, y+sy, x+ex, y+ey, color )
        end
        sx,sy = ex,ey
    end
end

addEventHandler( "onClientRender", root,
    function()
        drawCircle( 350, 350, 10, tocolor(255,0,255) );
        drawCircle( 350, 350, 50, tocolor(255,0,255) );
    end
)

 

  • Meta XML
<meta>
  <info author="BarisErdogan" type="script" version="1.0.0" />
  
  <script src="client.lua" type="client" />
      
</meta>

 

Not* Küçük Büyük Olarak 2 Tane Daire Çizimi.