That's both wrong AND the most inefficient way to do it.
ply:Team() always returns an integer. Comparing it to a string will always return false.
hook.Add("OnPlayerChangedTeam", "RemoveMicrophones", function(ply, oldteam, newteam)
for k, v in pairs(player.GetAll()) do
if v:Team() == TEAM_RADIOOP then -- Assuming the team is TEAM_RADIOOP
for k,v in pairs(ents.FindByClass("microphone")) do
One of my favourite servers is running this mod. It still works, it's still good and therefore the thread for it is not dead.