Solved Refreshing CUI elements?

Discussion in 'Rust Development' started by ZeusGOD, Sep 11, 2017.

  1. I do not work well as I thought I was making plug-ins that show time in real time.

    GUI is destroyed and addui does not think it will be refreshed!
     
  2. You destroy it and create it again
     
  3. But the text that comes out does not change.
     
  4. Wulf

    Wulf Community Admin

    It would be if you are properly destroying it and then sending it again with whatever new text you want.
     
  5. Code:
    CuiHelper.DestroyUi(player, "Mute");
                                            PrintToChat(player, "d");
                                            CuiHelper.AddUi(player, elements1);
                                            PrintToChat(player, "a");
    not working T^T
     
  6. Wulf

    Wulf Community Admin

    What exactly doesn't work about it? What do you see change? I'd try testing that the old UI is destroyed fully before making it add more on top of that.
     
  7. Data.cooldown text show but same text
     
  8. Solved!