diff --git a/setteam.php b/setteam.php new file mode 100644 index 0000000..69df887 --- /dev/null +++ b/setteam.php @@ -0,0 +1,14 @@ + 6) { + sendError("Invalid team ID.", true); +} +$currentteam = $database->select('players', 'teamid', ['uuid' => $_SESSION['uuid']])[0]; +if ($currentteam > 0 && $currentteam < 7) { + sendError("You have already chosen a team. Contact support for problems.", true); +} +$database->update('players', ['teamid' => $VARS['teamid']], ['uuid' => $_SESSION['uuid']]); +sendOK(); \ No newline at end of file