Above example is correct, but there are optimizations (dont re-index players array) that can be made. Also, cs_get_user_team() is more reliable than get_user_team() in certain cases.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!