So, I saw in
this post that allegedly this bug is fixed, but when I tested it with latest 1.8.2 (stable) version of amx mod x today, that native (get_user_team) returns wrong team id in few cases. So I reported that in bugs section ->
https://bugs.alliedmods.net/show_bug.cgi?id=6635 and I hope it will be fixed soon.
The only solution I found so far is that
this plugin can fix that problem (I tested it - I put plugin name below admin.amxx in plugins.ini) but it would be great if amxx dev team make a small update and fix this.