PHP game server for TerranQuest (version 1) https://terranquest.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

14 lines
428 B

<?php
require 'required.php';
require 'onlyloggedin.php';
if ($VARS['teamid'] < 1 || $VARS['teamid'] > 6) {
sendError(INVALID_TEAM_ID, true);
}
$currentteam = $database->select('players', 'teamid', ['uuid' => $_SESSION['uuid']])[0];
if ($currentteam > 0 && $currentteam < 7) {
sendError(TEAM_ALREADY_CHOSEN, true);
}
$database->update('players', ['teamid' => $VARS['teamid']], ['uuid' => $_SESSION['uuid']]);
sendOK();