/** set g_gametype command. Change the gamtype with reload * This function is bound to the !mode command. He set the gamtype and send reload command. * * \param $id The game ID of the player who executed the command. * \param $command The command parameters. * * \return Nothing. */ public function CommandMode($id, $command) { switch (strtolower($command[0])) { case 'ts': case 'team survivor': $gametype = 4; break; case 'ctf': case 'capture the flag': $gametype = 7; break; case 'tdm': case 'team deathmatch': $gametype = 3; break; case 'ffa': case 'free for all': $gametype = 0; break; case 'cah': case 'capture and hold': $gametype = 6; break; case 'bomb': case 'bomb mode': $gametype = 8; break; case 'ftl': case 'follow the leader': $gametype = 5; break; default: $gametype = FALSE; break; } if ($gametype !== FALSE) { Rcon::set('g_gametype ' . $gametype); Rcon::tell($id, 'New Gametype : ' . $command[0]); Rcon::reload(); } else { Rcon::tell($id, 'Gametype inconnu.'); } }