Jump to content

ممكن txd


Recommended Posts

function createLine ( )

x1, y1, z1 = getElementPosition ( testVehicle ) -- Get test vehicles position.

x2, y2, z2 = getElementPosition ( getLocalPlayer ()) -- Get local players position.

dxDrawLine3D ( x1, y1, z1, x2, y2, z2, tocolor ( 0, 255, 0, 230 ), 2) -- Create 3D Line between test vehicle and local player.

end

كيف

Link to comment

جرب

    function dxDrawCircle3D( x, y, z, radius, segments, color, width ) 
        segments = segments or 16; 
        color = color or tocolor( 255, 255, 0 ); 
        width = width or 1; 
        local segAngle = 360 / segments; 
        local fX, fY, tX, tY; -- drawing line: from - to 
        for i = 1, segments do 
        fX = x + math.cos( math.rad( segAngle * i ) ) * radius; 
        fY = y + math.sin( math.rad( segAngle * i ) ) * radius; 
        tX = x + math.cos( math.rad( segAngle * (i+1) ) ) * radius; 
        tY = y + math.sin( math.rad( segAngle * (i+1) ) ) * radius; 
        dxDrawLine3D( fX, fY, z, tX, tY, z, color, width ); 
        end 
    end 
      
    addEventHandler("onClientRender", root, 
        function() 
            dxDrawCircle3D( x, y, z, 3, 5) 
        end 
    ) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...