Question about lua api

I have a problem with the fact that either in the documentation there is no or no way to get the player’s team:

round_end
Name: round_end
Structure: byte winner winner team/user id

byte reason reason why team won
string message end round message
byte legacy server-generated legacy value
short player_count total number of players alive at the end of round, used for statistics gathering, computed on the server in the event client is in replay when receiving this message
byte nomusic if set, don’t play round end music, because action is still on-going

This int represents winner as a team(1 - ?, 2 - T, 3 - CT) BUT I did not find a way to get this data about the player either in the entity or anywhere else

I hardcoded this:

function team_won()
 plrs = entity.get_players(true, true)
 for i, player in pairs(plrs) do
 if player:is_alive() == true then
 return false
 end
 end
 return true
end

But there is a problem that it works 50/50 and I don’t know why, sometimes it gives true or false although I always win (with bots I just write bot_kill and it shows that I won)

Alright, i forgot about post but i found soultiob by using netprop values.

function team_won(team_won)
    local me = entity.get_local_player()
    local team = me.m_iTeamNum -- Spec: 1, t: 2, ct: 3
    if team_won == team then
        return true
    end
    return false
end