本文整理匯總了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';