Jump to content

DXbutton


Recommended Posts

Posted

السلام عليكم

شباب ابي احد يعلمني كيف اسوي زر DX

وشكرا

BACK!

هؤلاء الواقفون على قمة الجبل لم يهبطوا من السماء هناك

Posted

gui في المود ذا انا عمل ازرار

لكن شفافة يعني ماتستطيع انا تراها زي كذا

  
Button = guiCreateButton(0.3936, 0.5833, 0.1182, 0.0586, "", true) 
  guiSetAlpha(Button , 0.00) 
  

Posted

طيب سؤال ثاني لو سمحت

اذا ابي اغير لون يDX

يمدي؟

BACK!

هؤلاء الواقفون على قمة الجبل لم يهبطوا من السماء هناك

Posted
  
  
dxDrawRectangle -- مربع  
  
guiCreateButton -- ضع الزر امام المربع 
  
guiSetAlpha -- اخف الزر 
  
-- مثال 
  
button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "", true ) -- ماخوذ من الويكي اي انه ليس بشغال بل لفهم  
guiSetAlpha (button , 0.00 ) 
  
  
local x,y = guiGetScreenSize()  
  
function DX() 
  
dxDrawRectangle ( x/3.8, y/3.8, x/2.02, y/2, tocolor ( 0, 0, 0, 150 ) ) 
  
addEventHandler("onClientRender", root, DX) 
  
  

المثال مهو مرتب بس افهم منه

Dx وبنسبه لسؤالك يمدي تغير اللون بس وش تبي تغير الزر

No Thing &*

Posted

شكرا شباب ما قصرتم جزاكم الله خير

BACK!

هؤلاء الواقفون على قمة الجبل لم يهبطوا من السماء هناك

Posted

GUi اذا تبي الزر دي اكس كامل من دون

function isMouseInPosition ( x, y, width, height ) 
    if ( not isCursorShowing ( ) ) then 
        return false 
    end 
  
    local sx, sy = guiGetScreenSize ( ) 
    local cx, cy = getCursorPosition ( ) 
    local cx, cy = ( cx * sx ), ( cy * sy ) 
    if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then 
        return true 
    else 
        return false 
    end 
end 
  

(isMouseInPosition ذا كود اساسي حطه في كل سكربت ( لــ فنكشن

تسوي زر بــ

dxDrawRectangle 

مثلآ

   dxDrawRectangle(770, 133, 315, 95, tocolor(255, 255, 255, 150), false) 

اذا تبي تسوي وظيفه لــ زر معين مثلا اخفاء الشات يوم يضغط الزر

            addEventHandler("onClientClick",getRootElement() , 
    function (button , state) 
    if (button == "left" and state == "up") then 
    if (isMouseInPosition (770, 133, 315, 95)) then ---- هنا تحط موقع الزر  
 showChat(false) 
    end end end )    

اتمنى اني افدتك بشكل افضل ..

Posted (edited)
GUi اذا تبي الزر دي اكس كامل من دون

function isMouseInPosition ( x, y, width, height ) 
    if ( not isCursorShowing ( ) ) then 
        return false 
    end 
  
    local sx, sy = guiGetScreenSize ( ) 
    local cx, cy = getCursorPosition ( ) 
    local cx, cy = ( cx * sx ), ( cy * sy ) 
    if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then 
        return true 
    else 
        return false 
    end 
end 
  

(isMouseInPosition ذا كود اساسي حطه في كل سكربت ( لــ فنكشن

تسوي زر بــ

dxDrawRectangle 

مثلآ

   dxDrawRectangle(770, 133, 315, 95, tocolor(255, 255, 255, 150), false) 

اذا تبي تسوي وظيفه لــ زر معين مثلا اخفاء الشات يوم يضغط الزر

            addEventHandler("onClientClick",getRootElement() , 
    function (button , state) 
    if (button == "left" and state == "up") then 
    if (isMouseInPosition (770, 133, 315, 95)) then ---- هنا تحط موقع الزر  
 showChat(false) 
    end end end )    

اتمنى اني افدتك بشكل افضل ..

هذي اكواد شرحها

@ProGamer

في قناته , يشوف الشرح ويفهم كل شيء

Edited by Guest

* There is no God but Allah, Mohammed is the Messenger Of Allah

Posted

X

عندكـ غلط

addEventHandler ( "onClient[color=#000000][size=6]GUI[/size][/color]Click", root, function ( button, state ) -- يصير كذا 

بعدين هذي اكواد شرحها

@ProGamer

في قناته , يشوف الشرح ويفهم كل شيء

الشرح حقه بدون زر gui

يعني الايفنت

onClientClick not onClientGUIClick

Posted

X

عندكـ غلط

addEventHandler ( "onClient[color=#000000][size=6]GUI[/size][/color]Click", root, function ( button, state ) -- يصير كذا 

بعدين هذي اكواد شرحها

@ProGamer

في قناته , يشوف الشرح ويفهم كل شيء

الشرح حقه بدون زر gui

يعني الايفنت

onClientClick not onClientGUIClick

اها , مشكور على المعلومه

ثابت "onClientGUIClick" كنت احسب ايفنت

وعدلت كلامي الي فوق :mrgreen:

* There is no God but Allah, Mohammed is the Messenger Of Allah

Posted
شكرا شباب ما قصرتوا

.. :mrgreen:حياك الله

* There is no God but Allah, Mohammed is the Messenger Of Allah

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