Why do you need a for-loop?
function onClientChangeHisNick()
if isPlayerMuted ( source ) then
outputChatBox ( "#FF0000You're not allowed to change you're nick , while you're muted!", source, 255, 255, 255, true )
cancelEvent()
else
outputChatBox ( "#99FF00Nick successfully changed!", source, 255, 255, 255, true )
end
end
addEventHandler ( "onPlayerChangeNick", getRootElement(), onClientChangeHisNick )