#Mr.alkmasha Posted November 22, 2014 Share Posted November 22, 2014 اسلام عليكم انا عندي لوحة dx ابي يوم اضغط على ال Rectangle مثلا يعطني فلوس او ينقلني ل مكان Link to comment
فاّرس Posted November 22, 2014 Share Posted November 22, 2014 local w,h = guiGetScreenSize ( ) function text() dxDrawText ( "alkmasha", w/1.45, h/2.5, w/20, h/20, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" ) end addEventHandler ( "onClientRender", root, text ) addEventHandler ( 'onClientClick', root, function ( ) local cx , cy = getCursorPosition( ) if ( cx*w >= ( w/1.45 ) + 10 and cx*w <= ( w/1.45 ) + 50 and cy*h >= ( h/2.5 ) + 20 and cy*h <= ( h/2.5 ) + 10 ) then outputChatBox ( 'تم الضغط' ) end end ) طبعا ما راح يضبط %100, عدل في سطر 12 , علامه الزائد بعدها رقم عدل فيه لين يضبط معك ذذ Link to comment
فاّرس Posted November 22, 2014 Share Posted November 22, 2014 if ( cx*w >= ( x ) + 10 and cx*w <= ( y ) + 50 and cy*h >= ( width ) + 20 and cy*h <= ( height ) + 10 ) then x,y,width,height = تحط الاحداثيات حق الدي اكس ... وبالنسبه ل علامه الزائد بعد الاحداثيات يكون رقم تحطه انت بحيث تكون حددت المكان الي يصغط عليه كامل . Link to comment
#Mr.alkmasha Posted November 22, 2014 Author Share Posted November 22, 2014 مشكور فهمته 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