Add a chat message when a new round starts

Discussion in 'TTT Suggestions' started by Rauno, Jul 14, 2019.

  1. Rauno

    Rauno   VIP

    got removed in some update and makes you have to use console to check what koses are valid for current round
     
    • Agree Agree x 9
    • Like Like x 1
  2. Hashira

    Hashira VIP

    Isnt there one right now? I could swear on east it shows you when round starts in chat. forgive me if im wrong, if i am

    +1
     
  3. Sticky Bandit

    Sticky Bandit Never fall below your standard VIP Bronze

    Yeah, this would be very helpful, especially for staff members. It's honestly difficult sometimes to guess when a new round has actually started when looking at situations where a KOS was called pre-round then followed during the round.
     
    • Agree Agree x 3
  4. BorkWoof

    BorkWoof VIP

    it got removed gidabgndsgsdfchbdv bv
     
  5. Sticky Bandit

    Sticky Bandit Never fall below your standard VIP Bronze

    Some shit I whipped up real quick.
    Code:
    if CLIENT then
      hook.Add("TTTBeginRound", "RoundStartMessage", function()
        local currentRoundNumber = tostring( 7 - GetGlobalInt("ttt_rounds_left", 6) )
        chat.AddText(Color(255, 255, 255), "A new round has begun.", Color(0,255,0), " (", currentRoundNumber, "/6)")
      end)
    end
    
    [​IMG]


    If I really wanted to, this could even be toggled by a button in the settings menu, it's as simple as....

    Code:
    if CLIENT then
      CreateClientConVar("sgm_newroundmessage", "1", true, true)
      hook.Add("TTTBeginRound", "RoundStartMessage", function()
        if LocalPlayer():GetInfoNum("sgm_newroundmessage", 1) == 1 then
          local currentRoundNumber = tostring( 7 - GetGlobalInt("ttt_rounds_left", 6) )
          chat.AddText(Color(255, 255, 255), "A new round has begun.", Color(0,255,0), " (", currentRoundNumber, "/6)")
        end
      end)
    end
    
    Where dsettings is defined earlier to be the settings menu, which inherits from dtabs from the TTTSettingsTabs hook.
    Code:
      local dgui = vgui.Create("DForm", dsettings)
      dgui:SetName("New Round Information")
    
      dgui:CheckBox("Enable New Round Message", "sgm_newroundmessage")
    
      dsettings:AddItem(dgui)
    EDIT: yes, I know I should use ttt_roundlimit instead of the number 6. Thing is, that takes more effort to type when I know the roundlimit will always be 6 and saves like 0.0002% processing power OK
    It's as easy as pie, simple as cake, Dre get on the mic and make 'em tremble and shake.
     
    Last edited: Jul 16, 2019
    • Winner Winner x 2
  6. 8BitF0x

    8BitF0x a pixelated fox that loves rdm VIP

    Code:
    cool
     
  7. Fiz

    Fiz local jihad pro VIP Bronze

    i think a chat message is not needed since it shows in console.
    [​IMG] "traitors defeated" end round
    you are [role] start of round
     
  8. ThatAintFalco

    ThatAintFalco You should’ve followed the damn train CJ VIP

    I believe you can’t call out KOSes pre-round, they were disabled like a couple years ago to prevent this exact situation probably.
     
  9. BorkWoof

    BorkWoof VIP

    y
    kos [insert name]
    enter
     
    • Funny Funny x 1
  10. Fiz

    Fiz local jihad pro VIP Bronze

    you can still type KOS [name] you can't do the radio command pre-round/post-round though.
     
  11. ThatAintFalco

    ThatAintFalco You should’ve followed the damn train CJ VIP

    Ya that’s what I meant to say
     
    • Confusing Confusing x 1
  12. Pacifist

    Pacifist Cynically Insane VIP Bronze

    If it was included in a previous update, maybe @Highwon can add it back if he wants to. Otherwise, this is a minor thing that may be useful. I'd support it +1.
     
    • Like Like x 1