本文整理汇总了PHP中Lobby::lobbyserver方法的典型用法代码示例。如果您正苦于以下问题:PHP Lobby::lobbyserver方法的具体用法?PHP Lobby::lobbyserver怎么用?PHP Lobby::lobbyserver使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lobby
的用法示例。
在下文中一共展示了Lobby::lobbyserver方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: joinTeam
if (isset($team) && freeslots($lid, $team) > 0) {
joinTeam($id, $team);
}
break;
case "switchClass":
if (isset($class)) {
switchClass($id, $class);
}
break;
case "readystatus":
if (isset($ready)) {
readystatus($id, false, $ready);
}
break;
case "startGame":
$server = new Server($lobby->lobbyserver($lid));
if ($server->id == 1) {
$location = getPlayersLocation($lid);
$servers = getOnlineServers();
$server = new Server(bestServer($location, $servers));
updateLobbyServer($lid, $server->id);
}
startLobby($lid);
$players = teamplayers($lobby->type) * 2;
$server->loadConfig($players, etf2l, $lobby->map);
break;
case "joinGame":
if (!isPlayerInLobby($uid) && countPlayers($lid) != 2 * teamplayers($lobby->type)) {
joinLobby($uid, $lid);
}
if (isPlayerInLobby($uid) != $lid) {
示例2: getLPid
<?php
require_once 'includes/header.php';
$css = 'style.css';
$pid = $_SESSION['id'];
$lid = $_REQUEST['id'];
if ($pid) {
$id = getLPid($pid, $lid);
$lobby = new Lobby($lid);
$user = new User($pid);
$sid = $lobby->lobbyserver($lid);
$mid = $lobby->mid;
$server = new Server($sid);
$mumble = new Mumble($mid);
switch ($lobby->status) {
case "open":
$js = 'lobby.js';
$ready = false;
include_once 'includes/header.inc';
include_once 'includes/pages/lobby.inc';
break;
case "ready":
$js = 'lobby.js';
$ready = true;
include_once 'includes/header.inc';
include_once 'includes/pages/lobby.inc';
break;
case "ingame":
case "finished":
case "closed":
$js = 'lobby_start.js';