Well it works for me, but when I check teams in TAB, it is showing all yellow. The teams still work, it just will not showing. I will post my uteams txt and lua files.
TXT
"Out"
{
"teams"
{
"1"
{
"name" "Owner"
"group" "superadmin"
"armor" "2000"
"hp" "2000"
"weapons"
{
"1" "weapon_physgun"
"2" "gmod_tool"
"3" "gmod_camera"
"4" "weapon_physcannon"
"5" "weapon_crowbar"
"6" "weapon_pistol"
"7" "weapon_shotgun"
"8" "weapon_smg1"
"9" "weapon_crossbow"
"10" "weapon_357"
"11" "weapon_ar2"
"12" "weapon_frag"
"13" "weapon_annabelle"
"14" "weapon_slam"
"15" "item_ar2_grenade"
"16" "item_ml_grenade"
}
"color"
{
"a" "255"
"B" "255"
"g" "255"
"r" "255"
}
"plytable"
{
"1" "SprintSpeed:1000"
"2" "WalkSpeed:500"
}
}
"2"
{
"name" "HIGHLY Respected"
"group" "admin"
"armor" "1000"
"hp" "1000"
"weapons"
{
"1" "weapon_physgun"
"2" "gmod_tool"
"3" "gmod_camera"
"4" "weapon_physcannon"
"5" "weapon_crowbar"
"6" "weapon_pistol"
"7" "weapon_shotgun"
"8" "weapon_smg1"
"9" "weapon_crossbow"
"10" "weapon_357"
"11" "weapon_ar2"
"12" "weapon_frag"
}
"color"
{
"a" "255"
"B" "0"
"g" "240"
"r" "222"
}
}
"3"
{
"name" "Moderator Member"
"group" "moderator"
"armor" "500"
"hp" "500"
"weapons"
{
"1" "weapon_physgun"
"2" "gmod_tool"
"3" "gmod_camera"
"4" "weapon_physcannon"
"5" "weapon_crowbar"
"6" "weapon_pistol"
"7" "weapon_shotgun"
"8" "weapon_smg1"
}
"color"
{
"a" "255"
"B" "50"
"g" "50"
"r" "255"
}
}
"4"
{
"name" "Members"
"group" "operator"
"armor" "0"
"hp" "150"
"weapons"
{
"1" "weapon_physgun"
"2" "gmod_tool"
"3" "gmod_camera"
"4" "weapon_physcannon"
"5" "weapon_crowbar"
"6" "weapon_pistol"
}
"color"
{
"a" "255"
"B" "254"
"g" "172"
"r" "61"
}
}
"5"
{
"name" "N00b"
"group" "n00b"
"armor" "0"
"hp" "50"
"color"
{
"a" "255"
"B" "127"
"g" "127"
"r" "127"
}
"weapons"
{
"1" "weapon_physcannon"
"2" "gmod_camera"
}
}
"6"
{
"name" "Guest"
"group" "user"
"weapons"
{
"1" "weapon_physgun"
"2" "gmod_tool"
"3" "gmod_camera"
}
"color"
{
"a" "255"
"B" "138"
"g" "0"
"r" "135"
}
}
}
"gamemodes"
{
"1" "Sandbox"
"2" "Spacebuild2"
}
}
I do not think it is this since the teams are working
Lua
if not SERVER then return end
UTeam = {}
UTeam.BASETEAMINDEX = 20
UTeam.CONFIG = "UTeam.txt"
if not file.Exists( UTeam.CONFIG ) then
Msg( "[UTeam Error] UTeam config file missing.\n" )
return
end
local t = util.KeyValuesToTable( file.Read( UTeam.CONFIG ) )
if not t.teams then
Msg( "[UTeam Error] UTeam config teams table missing.\n" )
return
end
UTeam.teams = {}
for k,v in pairs( t.teams ) do
UTeam.teams[tonumber(k)]=v
end
if not t.gamemodes then
Msg( "[UTeam Error] UTeam config gamemodes table missing.\n" )
return
end
UTeam.gamemodes = t.gamemodes
function UTeam.checkGamemode()
for _,v in pairs( UTeam.gamemodes ) do
if string.lower(GAMEMODE.Name) == string.lower(v) then return true end
end
hook.Remove( "PlayerSpawn", "UTeamSetTeam" )
hook.Remove( "PlayerInitialSpawn", "UTeamSetupTeams" )
return false
end
function UTeam.setTeam( ply )
if not UTeam.checkGamemode() then return end
for k,v in ipairs( UTeam.teams ) do
if ply:IsUserGroup( v.group ) then
ply:SetTeam( UTeam.BASETEAMINDEX + k )
if v.hp then ply:SetHealth( v.hp ) end
if v.armor then ply:SetArmor( v.armor ) end
if v.model then timer.Simple( 0.1, ply.SetModel, ply, player_manager.TranslatePlayerModel( v.model ) )end
if v.weapons then
timer.Simple( 0.1, function(ply, v)
ply:StripWeapons()
for _,v in pairs(v.weapons) do
ply:Give( v )
end
ply:SelectWeapon(v.weapons[1])
end, ply, v)
end
if v.plytable then
timer.Simple( 0.1, function(ply, v)
for _,v in pairs(v.plytable) do
k = string.sub( v, 1, string.find( v, ":" ) - 1 )
v = string.sub( v, string.find( v, ":" ) + 1 )
ply:GetTable()[k] = tonumber(v) or v
end
end, ply, v)
end
break
end
end
end
hook.Add( "PlayerSpawn", "UTeamSetTeam", UTeam.setTeam )
Thanks.
Edit: Ok well it will not let me do any admin things (like !menu), but the HP and things work.