Sorry for posting a 2nd post so quickly but I wanted to know how do you add something that says you’re a T/D/T (Traitor,Detective,Inno) in TTT?
Kind of new to coding sowwy
Sorry for posting a 2nd post so quickly but I wanted to know how do you add something that says you’re a T/D/T (Traitor,Detective,Inno) in TTT?
Kind of new to coding sowwy
Read through TTT’s cl_hud file.
#Luahelper
The default HUD does this:
[LUA]
local col = bg_colors.innocent
if GAMEMODE.round_state != ROUND_ACTIVE then
col = bg_colors.noround
elseif client:GetTraitor() then
col = bg_colors.traitor
elseif client:GetDetective() then
col = bg_colors.detective
end
[/LUA]
So you could do something like this:
[LUA]
local col = “Innocent”
if GAMEMODE.round_state != ROUND_ACTIVE then
col = “Waiting…”
elseif client:GetTraitor() then
col = “Traitor”
elseif client:GetDetective() then
col = “Detective”
end
[/LUA]
And then set a label to col.
I could also use this
player:GetRole()?
-snip-