Jump to content

طلب مساعده ب لوحة dx


Recommended Posts

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

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

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