function Msg_OnCommand(player, command, payload, recipient, msg_type) if (command == "*setteam") then local target = g_arena:getPlayer(recipient) local found = false for x = 1, table.getn(g_referee) do if (g_referee[x] == player.m_name) then -- FOUND HIM! found = true end end if (found == true) then if (target:exists() == true) then target:team_change("" .. payload .. "","") else player:message("Error: You did not correctly specify a player to team change") end else player:message("Error: You're not in the referee table!") end elseif (command == "*referee") then local target = g_arena:getPlayer(payload) -- local target = g_arena:getPlayer(recipient) -- You don't mean this? if (target:exists() == true) then if (player == "HellSpawn") then table.insert(g_referee, target.m_name) else end player:message("You're not the league admin!") else player:message("Error: That player does not exist!") end end end