Jump to content

Event ( onClientGUIDoubleClick ) طلب تصحيح كود دبل كلك


Recommended Posts

السلام عليكم ورحمة الله وبركاته *

وين الخطاء هنا *

فنكشن

function onExit ( ) 
    guiSetVisible ( Abo3abd.window[1],false ) 
    showCursor ( false ) 
end 

1فنكشن

function onClickButtons1 ( ) 
    if source == Abo3abd.button[6] then 
        onExit ( ) 
    elseif source == Abo3abd.button[7] then 
        onExit ( ) 
    elseif source == Abo3abd.button[8] then 
        onExit ( ) 
    elseif source == Abo3abd.button[9] then 
        onExit ( ) 
    end 
end 

الحدث

addEventHandler ( "onClientGUIDoubleClick", root, onClickButtons1 ) 

Edited by Guest
Link to comment
function onClickButtons1 ( ) 
    if source == Abo3abd.button[6] then 
        onExit() 
    elseif source == Abo3abd.button[7] then 
        onExit() 
    elseif source == Abo3abd.button[8] then 
        onExit() 
    elseif source == Abo3abd.button[9] then 
        onExit() 
    end 
end 
addEventHandler ("onClientGUIDoubleClick", root, onClickButtons1 ) 
  
function onExit ( ) 
    guiSetVisible ( Abo3abd.window[1],false ) 
    showCursor ( false ) 
end 

Link to comment

ردك ماله اي فايده . لانك بس رتبت الكود انا مسويه كذا عشان يوضح للناس*

اتوقع لايوجد كود دبل كلك لزر يرجاء اغلاق الموضوع فوراً

:( وإسف اني سويت موضوع

Edited by Guest
Link to comment

طيب جرب هالكود *

-- test  
  
GUIEditor = { 
    button = {}, 
    window = {}, 
} 
  
GUIEditor.window[1] = guiCreateWindow(432, 228, 242, 360, "----------", false) 
GUIEditor.button[1] = guiCreateButton(58, 169, 140, 46, "دبل ككلك للاغلاق", false, GUIEditor.window[1]) 
  
function onClickButtons1 ( ) 
    if source == GUIEditor.button[1] then 
        onExit() 
    end 
end 
addEventHandler ("onClientDoubleClick", root, onClickButtons1 ) 
  
function onExit ( ) 
    guiSetVisible ( GUIEditor.window[1],false ) 
    showCursor ( false ) 
end 

Meta.xml

<meta> 
    <script src="Client.lua" type="client" /> 
</meta> 

Link to comment

-- test 
  
GUIEditor = { 
    button = {}, 
    window = {}, 
} 
  
GUIEditor.window[1] = guiCreateWindow(432, 228, 242, 360, "----------", false) 
GUIEditor.button[1] = guiCreateButton(58, 169, 140, 46, "دبل ككلك للاغلاق", false, GUIEditor.window[1]) 
  
function onExit ( ) 
    guiSetVisible ( GUIEditor.window[1],false ) 
    showCursor ( false ) 
end 
  
function onClickButtons1 ( ) 
    if source == GUIEditor.button[1] then 
        onExit() 
    end 
end 
addEventHandler ("onClientDoubleClick", root, onClickButtons1 ) 
  
  
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...