Won't say this is better, just easier to understand.
Code:
new max_players = get_maxplayers();
for(new id = 1; id <= max_players; id++)
{
if(is_user_alive(id) && get_user_team(id) == 1) //1 T, 2 CT
//slay the noob.
}
Edit: Code updated, somehow forgot what this thread was about, lol. Thanks, hleV.