You are setting the string for the textdraw 500 times (MAX_PLAYERS).
TextDrawSetString(NoAtt, newtext);
TextDrawShowForAll(NoAtt);
format(newtext, sizeof(newtext),"%d", numberteam1);
TextDrawSetString(NoDeff, newtext);
TextDrawShowForAll(NoDeff);
format(newtext, sizeof(newtext),"%d", numberteam2);
Code above should only be done once, not for every player. Use the ++ counter in the loop, but only format the string once (just before the return 1
EDIT: Also remove the return 1; from the loops, otherwise as soon as it finds a player, it will stop the loop.