I've tried this, but it's not returning the info I need?
If I aim at a player, I *will* get the team number.
If I aim at an object (SG, disp etc), team number is 0.
The owner of such an object is also 0.
Code:
new player_team
new victim_team
new owner
new owner_team
player_team = entity_get_int(id, EV_INT_team)
victim_team = (victim==0) ? 0 : entity_get_int(victim, EV_INT_team)
owner = (victim==0) ? 0 : entity_get_edict(victim, EV_ENT_owner)
owner_team = (owner==0) ? 0 : entity_get_int(owner, EV_INT_team)
client_print(id, print_chat, "player team = %d, victim team = %d, owner = %d, owner_team = %d^n", player_team, victim_team, owner, owner_team)