Jump to content

اذا ضغطت اف 1 dxDrawRectangle + dxDrawText اخفاء


Recommended Posts

function drawText() 
        dxDrawRectangle(406, 217, 471, 41, tocolor(255, 0, 0, 160), true) 
        dxDrawText(" My Text", 537, 227, 915, 241, tocolor(0, 0, 0, 255), 1, "default-bold", "left", "top", false, false, true, false, false) 
    end 
) 
    addEventHandler("onClientRender",root,drawText) 
    removeEventHandler("onClientRender",root,drawText) 

سويت كذا ولا ظبط

Link to comment

function drawText() 
        dxDrawRectangle(406, 217, 471, 41, tocolor(255, 0, 0, 160), true) 
        dxDrawText(' My Text', 537, 227, 915, 241, tocolor(0, 0, 0, 255), 1, 'default-bold', 'left', 'top', false, false, true, false, false) 
    end 
addEventHandler('onClientRender',root,drawText) 
  
bindKey('F1','down',function() 
    removeEventHandler('onClientRender',root,drawText) 
    end 
) 
Link to comment
function drawText() 
        dxDrawRectangle(406, 217, 471, 41, tocolor(255, 0, 0, 160), true) 
        dxDrawText(" My Text", 537, 227, 915, 241, tocolor(0, 0, 0, 255), 1, "default-bold", "left", "top", false, false, true, false, false) 
    end 
) 
    addEventHandler("onClientRender",root,drawText) 
    removeEventHandler("onClientRender",root,drawText) 

سويت كذا ولا ظبط

:lol::lol:

هذا بيحط حدث ويشيله اول مايحطه وش تستفيد منه مرح يطلع الدي اكس

Link to comment
function drawText() 
        dxDrawRectangle(406, 217, 471, 41, tocolor(255, 0, 0, 160), true) 
        dxDrawText(" My Text", 537, 227, 915, 241, tocolor(0, 0, 0, 255), 1, "default-bold", "left", "top", false, false, true, false, false) 
    end 
) 
    addEventHandler("onClientRender",root,drawText) 
  
addEventHandler ( "onClientGUIClick", myButton, function (  ) 
    removeEventHandler("onClientRender",root,drawText) 
end 
) 

Link to comment
function drawText() 
        dxDrawRectangle(406, 217, 471, 41, tocolor(255, 0, 0, 160), true) 
        dxDrawText(' My Text', 537, 227, 915, 241, tocolor(0, 0, 0, 255), 1, 'default-bold', 'left', 'top', false, false, true, false, false) 
    end 
addEventHandler('onClientRender',root,drawText) 
  
bindKey('F1','down',function() 
    removeEventHandler('onClientRender',root,drawText) 
    end 
) 
Link to comment
GUIEditor = { 
    window = {}, 
} 
GUIEditor.window[1] = guiCreateWindow(403, 257, 412, 275, "", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawRectangle(430, 298, 335, 52, tocolor(255, 0, 0, 130), true) 
        dxDrawText("My Text", 522, 308, 742, 344, tocolor(255, 255, 255, 255), 1, "default", "left", "top", false, false, true, false, false) 
    end 
) 

هذا كودي ابي اذا الاعب ضغط اف 1 نظهر الدي اكس + اللوحه واذا ضغط اف 1 مره ثانيه تختفي الدي اكس + اللوحه

Link to comment
GUIEditor = { 
    window = {}, 
} 
GUIEditor.window[1] = guiCreateWindow(403, 257, 412, 275, "", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible ( GUIEditor.window[1], false ) 
  
    function DrawText() 
        dxDrawRectangle(430, 298, 335, 52, tocolor(255, 0, 0, 130), true) 
        dxDrawText("My Text", 522, 308, 742, 344, tocolor(255, 255, 255, 255), 1, "default", "left", "top", false, false, true, false, false) 
    end 
  
local show = false 
  
bindKey ( "F1", "down", function (  ) 
      if ( show == false ) then 
        guiSetVisible ( GUIEditor.window[1], true ) 
        showCursor ( true ) 
        addEventHandler ( "onClientRender", root, DrawText ) 
        show = true 
      else 
        guiSetVisible ( GUIEditor.window[1], false ) 
        showCursor ( false ) 
        removeEventHandler ( "onClientRender", root, DrawText ) 
        show = false 
    end 
end 
)      

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