Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 23/10/21 in all areas

  1. And guess what: I just fixed another tiny mistake that I made in my supposed fix to your code.. It happens to the best of us. ?
    1 point
  2. Hello BogdanRTB, I think that @IIYAMA has made a wonderful solution if you want the UI to blend in and out using alpha. If you want to simulate a beep-like appearing and disappearing then I think that you might be interested in instant animation instead. This can be solved by the use of a simple timer in connection with the "beep"-duration. -- The beep duration basically how long a visibility or non-visibility phase -- is supposed to last. local beepDuration = 1000; -- This is the variable that you should use in your DX UI to determine whether -- to draw it or not. You should reset it to true when you "call" your DX UI. local is_dx_ui_beep_visible = true; -- This variable should store the timer. It should be reset if the DX UI is "called". local uiBeepTimer = false; -- Call this function whenever you "call" or show your DX GUI. local call_dx_gui() is_dx_ui_beep_visible = true; uiBeepTimer = setTimer( function() is_dx_ui_beep_visible = not is_dx_ui_beep_visible; end, beepDuration, 0 ); end -- Call this function whenever you hide your DX GUI. local hide_dx_gui() is_dx_ui_beep_visible = false; killTimer(uiBeepTimer); end -- Example drawing code. local show_dx_gui = true; call_dx_gui(); addEventHandler("onClientRender", root, function() if (show_dx_gui) and (is_dx_ui_beep_visible) then dxDrawRectangle(100, 100, 400, 400, tocolor(255, 0, 0, 255)); end end );
    1 point
  3. Hid a few posts above. If you feel someone is violating the forum rules, please click Report in the bottom left of their post, or click the 3 dots on the right. If evidence is required for us to act on it, we ask that you submit it with the report.
    1 point
×
×
  • Create New...