Add S_RoundsPerMap to Champion gamemode & fix //matchsetpoints command with login
This commit is contained in:
parent
e9c2b40023
commit
ff850c58fe
@ -235,7 +235,7 @@ class MatchManagerCore implements ManialinkPageAnswerListener, CallbackListener,
|
||||
'default' => 6,
|
||||
'description' => 'Number of rounds to play before finding a winner of the step' ],
|
||||
self::SETTING_MATCH_S_ROUNDSPERMAP => [
|
||||
'gamemode' => ['Cup', 'Knockout', 'Teams', 'Rounds'],
|
||||
'gamemode' => ['Champion', 'Cup', 'Knockout', 'Teams', 'Rounds'],
|
||||
'type' => 'integer',
|
||||
'default' => 5,
|
||||
'description' => 'Number of rounds par map (0 = unlimited) (multiple maps doesn\'t work in KO)' ],
|
||||
@ -1181,7 +1181,6 @@ class MatchManagerCore implements ManialinkPageAnswerListener, CallbackListener,
|
||||
if ($current) {
|
||||
$current = false;
|
||||
} elseif (($this->nbmaps + $i) <= ($this->settings_nbmapsbymatch)) {
|
||||
Logger::log("i: " . $i);
|
||||
if ($i > 0) {
|
||||
if ($i == 1) {
|
||||
$message = $this->chatprefix . '$<$o$iNext Maps:$>';
|
||||
@ -1228,7 +1227,6 @@ class MatchManagerCore implements ManialinkPageAnswerListener, CallbackListener,
|
||||
// Depending of the load of the server and the match gamemode, the script could be not loaded, this is a workaround to reload thhe script
|
||||
$this->maniaControl->getClient()->restartMap();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1612,8 +1610,8 @@ class MatchManagerCore implements ManialinkPageAnswerListener, CallbackListener,
|
||||
|
||||
if (isset($array[0])) {
|
||||
$login = $array[0];
|
||||
} elseif (strlen($peopletoadd) == 22) {
|
||||
$login = $peopletoadd ;
|
||||
} elseif (strlen($text[1]) == 22) {
|
||||
$login = $text[1] ;
|
||||
}
|
||||
if ($mysqli->error) {
|
||||
trigger_error($mysqli->error, E_USER_ERROR);
|
||||
@ -1625,7 +1623,8 @@ class MatchManagerCore implements ManialinkPageAnswerListener, CallbackListener,
|
||||
$this->maniaControl->getModeScriptEventManager()->setTrackmaniaPlayerPoints($player, "", "", $text[2]);
|
||||
$this->maniaControl->getChat()->sendSuccess($this->chatprefix . 'Player $<$ff0' . $player->nickname . '$> now has ' . $text[2] . ' points!');
|
||||
} else {
|
||||
$this->maniaControl->getChat()->sendError($this->chatprefix . 'Player ' . $text[1] . " doesn't exist", $adminplayer);
|
||||
$this->maniaControl->getModeScriptEventManager()->setTrackmaniaPlayerPoints($player, "", "", $text[2]);
|
||||
$this->maniaControl->getChat()->sendError($this->chatprefix . 'Player ' . $text[1] . " isn't connected", $adminplayer);
|
||||
}
|
||||
} else {
|
||||
$this->maniaControl->getChat()->sendError($this->chatprefix . 'Player ' . $text[1] . " doesn't exist", $adminplayer);
|
||||
@ -1673,4 +1672,3 @@ class MatchManagerCore implements ManialinkPageAnswerListener, CallbackListener,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user