HI,
If I understand well you want to create a new column "team" and update it when a player change his team.
The idea that come to my mind is to create a custom event "onPlayerChangeTeam" by overriding the setPlayerTeam function.
addEvent("onPlayerChangeTeam", false)
_setPlayerTeam = setPlayerTeam -- we save the original function
-- override
setPlayerTeam = function(thePlayer, theTeam)
_setPlayerTeam(thePlayer, theTeam)
triggerEvent("onPlayerChangeTeam", thePlayer, theTeam) -- a new event "onPlayerChangeTeam"
end
addEventHandler("onPlayerChangeTeam", root, function(theTeam)
-- function to update the column
setElementData(source,"status", "theTeam")
end)
Untested code
But it depends on what you are trying to do. This idea is that, when the setPlayerTeam function is used in your code, the scoreboard is updated but I maybe missunderstand what you want
Cya,