I get a team ID of -1 for objects. I've also noticed that a sentry actually has two IDs, because it consists of socket and mounted gun. A team name is not returned.
Code:
new tid, vtid
new team[8],vteam[8]
tid = get_user_team(id, team, 7)
vtid = get_user_team(victim, vteam, 7)
client_print(id, print_chat, "player team = %d, victim team = %d^n", tid, vtid)
// client_print(id, print_chat, "player team name = %s, victim team name = %s^n", team, vteam)