dxDrawRectangleWithLines
فائدتها تقوم بعمل لوحة دي اكس وحولينها خطوط بيضاء
dxDrawRectangleWithLines(float startX, float startY, float width, float height, int color window, int color lines, false)
Required Arguments
---startX: An float representing the absolute origin X position of the rectangle, represented by pixels on the screen.
---startY: An float representing the absolute origin Y position of the rectangle, represented by pixels on the screen.
---width: An float representing the width of the rectangle, drawn in a right direction from the origin.
---height: An float representing the height of the rectangle, drawn in a downwards direction from the origin.
Optional Arguments
---color: the hex color of the rectangle, produced using tocolor window (AA = alpha, RR = red, GG = green, BB = blue). --وهذا الارقمنت هو للون اللوحة
---color: the hex color of the rectangle, produced using tocolor lines (AA = alpha, RR = red, GG = green, BB = blue). --وهذا الارقمت هو للون الخطوط
Code :
function dxDrawRectangleWithLines(x,y,x1,y1,color,lineColor,state)
if type(x) == "number" and type(y) == "number" and type(x1) == "number" and type(state) == "boolean" then
dxDrawRectangle(x,y,x1,y1, color,state)
dxDrawLine(x,y, x+x1, y, lineColor,2,false)
dxDrawLine(x,y+y1, x+x1, y+y1, lineColor,2,false)
dxDrawLine(x, y, x, y+y1+1,lineColor,2,false)
dxDrawLine(x+x1, y, x+x1, y+y1+1, lineColor,2,false)
end
end
Example :
addEventHandler("onClientRender",root,
function()
dxDrawRectangleWithLines(398, 220, 500, 400, tocolor(0, 0, 0, 181),tocolor(255, 255, 255, 225), false)
end)
--للتوضيح
--tocolor(0, 0, 0, 181) هذا لون اللوحة خليته اسود
--tocolor(255, 255, 255, 225) هذا لون الخطوط خليته ابيض
صورة ..
اتمني ان يكون الكود مفيد لكم
والسلام عليكم ورحمة الله وبركاته