本文整理汇总了PHP中game::init_player方法的典型用法代码示例。如果您正苦于以下问题:PHP game::init_player方法的具体用法?PHP game::init_player怎么用?PHP game::init_player使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类game
的用法示例。
在下文中一共展示了game::init_player方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: game
// Game-Object
$game = new game();
// #############################################################################
// Config load and evaluate
$game->load_config();
$ACTUAL_TICK = $NEXT_TICK = 0;
$ACTUAL_TICK = $game->config['tick_id'];
$NEXT_TICK = $game->config['tick_time'] - $game->TIME;
$LAST_TICK_TIME = $game->config['tick_time'] - 5 * 60;
// #############################################################################
// Session-System
include 'include/session.php';
if ($game->config['game_stopped'] == 1 && $game->player['user_auth_level'] != STGC_DEVELOPER) {
message(GENERAL, $game->config['stop_message']);
}
$game->init_player();
if (isset($_POST['user_notepad'])) {
$sql = 'UPDATE user
SET user_notepad = "' . $db->escape_string($_POST['user_notepad']) . '"
WHERE user_id = ' . $game->player['user_id'];
if (!$db->query($sql)) {
message(DATABASE_ERROR, 'Could not update notepad data');
}
switch ($game->player['language']) {
case 'GER':
$title = 'Submitted new notepad data:';
$button = 'Fenster schlieβen';
break;
case 'ENG':
$title = 'Submitted new notepad data:';
$button = 'Close window';