AncienT Posted August 25, 2018 Share Posted August 25, 2018 The function dxDrawCircle is bug? https://wiki.multitheftauto.com/wiki/DxDrawCircle Link to comment
horus1337 Posted August 25, 2018 Share Posted August 25, 2018 Don't use dxDrawCircle. Make the circle in photoshop and use dxDrawImage. Link to comment
SycroX Posted August 25, 2018 Share Posted August 25, 2018 7 hours ago, AncienT said: The function dxDrawCircle is bug? https://wiki.multitheftauto.com/wiki/DxDrawCircle that's not the real function , someone changed it , the real function is : function dxDrawCircle( posX, posY, radius, width, angleAmount, startAngle, stopAngle, color, postGUI ) if ( type( posX ) ~= "number" ) or ( type( posY ) ~= "number" ) then return false end local function clamp( val, lower, upper ) if ( lower > upper ) then lower, upper = upper, lower end return math.max( lower, math.min( upper, val ) ) end radius = type( radius ) == "number" and radius or 50 width = type( width ) == "number" and width or 5 angleAmount = type( angleAmount ) == "number" and angleAmount or 1 startAngle = clamp( type( startAngle ) == "number" and startAngle or 0, 0, 360 ) stopAngle = clamp( type( stopAngle ) == "number" and stopAngle or 360, 0, 360 ) color = color or tocolor( 255, 255, 255, 200 ) postGUI = type( postGUI ) == "boolean" and postGUI or false if ( stopAngle < startAngle ) then local tempAngle = stopAngle stopAngle = startAngle startAngle = tempAngle end for i = startAngle, stopAngle, angleAmount do local startX = math.cos( math.rad( i ) ) * ( radius - width ) local startY = math.sin( math.rad( i ) ) * ( radius - width ) local endX = math.cos( math.rad( i ) ) * ( radius + width ) local endY = math.sin( math.rad( i ) ) * ( radius + width ) dxDrawLine( startX + posX, startY + posY, endX + posX, endY + posY, color, width, postGUI ) end return true end Link to comment
Jayceon Posted August 25, 2018 Share Posted August 25, 2018 Real function but only FROM VERSION 1.5.5 r13977 ONWARDS Link to comment
AncienT Posted August 26, 2018 Author Share Posted August 26, 2018 Not available yet? Link to comment
SycroX Posted August 26, 2018 Share Posted August 26, 2018 40 minutes ago, AncienT said: Not available yet? use this useful function 15 hours ago, #َxLysandeR said: that's not the real function , someone changed it , the real function is : function dxDrawCircle( posX, posY, radius, width, angleAmount, startAngle, stopAngle, color, postGUI ) if ( type( posX ) ~= "number" ) or ( type( posY ) ~= "number" ) then return false end local function clamp( val, lower, upper ) if ( lower > upper ) then lower, upper = upper, lower end return math.max( lower, math.min( upper, val ) ) end radius = type( radius ) == "number" and radius or 50 width = type( width ) == "number" and width or 5 angleAmount = type( angleAmount ) == "number" and angleAmount or 1 startAngle = clamp( type( startAngle ) == "number" and startAngle or 0, 0, 360 ) stopAngle = clamp( type( stopAngle ) == "number" and stopAngle or 360, 0, 360 ) color = color or tocolor( 255, 255, 255, 200 ) postGUI = type( postGUI ) == "boolean" and postGUI or false if ( stopAngle < startAngle ) then local tempAngle = stopAngle stopAngle = startAngle startAngle = tempAngle end for i = startAngle, stopAngle, angleAmount do local startX = math.cos( math.rad( i ) ) * ( radius - width ) local startY = math.sin( math.rad( i ) ) * ( radius - width ) local endX = math.cos( math.rad( i ) ) * ( radius + width ) local endY = math.sin( math.rad( i ) ) * ( radius + width ) dxDrawLine( startX + posX, startY + posY, endX + posX, endY + posY, color, width, postGUI ) end return true end Link to comment
Saml1er Posted August 26, 2018 Share Posted August 26, 2018 7 hours ago, AncienT said: Not available yet? you can access it if you download the latest nightly from nightly.multitheftauto.com Link to comment
AncienT Posted August 26, 2018 Author Share Posted August 26, 2018 5 hours ago, Saml1er said: you can access it if you download the latest nightly from nightly.multitheftauto.com Oh thanks you 12 hours ago, #َxLysandeR said: use this useful function Thanks you Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now