Fix bug in XGUI where changing groups around occasionally throws an error on certain gamemodes.

This commit is contained in:
SticklyMan 2015-11-07 18:12:44 -07:00
parent a9f61ec2d0
commit 92c8ee10e3

View File

@ -239,6 +239,7 @@ function groups.init()
--Remove all UTeam values from a player (used when they change teams)
function groups.resetAllPlayerValues( ply )
for _, team in ipairs( ulx.teams ) do --Loop through each team
if team.groups == nil then break end
for _, group in ipairs( team.groups ) do --Loop through each group per team
if group == ply:GetUserGroup() then --Have we found our team associated with this players group?
local resettable = {}