Allowing ULX groups to view ttt_print_damagelog

I have three groups I want to be able to view the damagelogs midround.

The groups names: superadmin,admin,divlead

Where or how do I add this? Thanks!

Bump

well the super admin and admin part is easy go to you admin.lua scroll down to the print damage log part change isSuperAdmin to Admin it will allow both like this


if (not IsValid(ply)) or ply:IsAdmin() or GetRoundState() != ROUND_ACTIVE then
      ServerLog(Format("%s used ttt_print_damagelog
", IsValid(ply) and ply:Nick() or "console"))
      pr("*** Damage log:
")

This is my code for the group “divlead” it doesn’t seem to work and breaks ttt_print_damagelog, for other users other than SuperAdmin
I don’t know what I am doing wrong


local function PrintDamageLog(ply)
   local pr = GetPrintFn(ply)

   if (not IsValid(ply)) or ply:IsSuperAdmin() or ply:IsDivLead() or GetRoundState() != ROUND_ACTIVE then
      ServerLog(Format("%s used ttt_print_damagelog
", IsValid(ply) and ply:Nick() or "console"))
      pr("*** Damage log:
")

      if not dmglog_console:GetBool() then
         pr("Damage logging for console disabled. Enable with ttt_log_damage_for_console 1.")
      end

      for k, txt in ipairs(GAMEMODE.DamageLog) do
         pr(txt)
      end

      pr("*** Damage log end.")
   else
      if IsValid(ply) then
         pr("You do not appear to be RCON or a superadmin, nor are we in the post-round phase!")
      end
   end
end

Have you tried using IsUserGroup for DivLead?


if (not IsValid(ply)) or ply:IsSuperAdmin() or ply:IsUserGroup("DivLead") or GetRoundState() != ROUND_ACTIVE then


Didn’t work

Doesnt work

Thanks Sikvibration. This helped me change it so that my admins can use all the TTT commands.