HLDM Форум
https://forum.hldm.org/

Показ игроков в панели на CS:S v34
https://forum.hldm.org/viewtopic.php?f=36&t=519
Страница 1 из 1

Автор:  alex2131 [ 05 окт 2013, 15:16 ]
Заголовок сообщения:  Показ игроков в панели на CS:S v34

Данная тема актуальна ТОЛЬКО для тех, у кого стоит плагин: status_protect.
Данный плагин: http://hlmod.ru/forum/plaginy-dlya-sourcemod/10104-antispam-status-ping-cs-s-v-34-status_protect.html (НЕ РЕКЛАМА!)
Соответственно установка:
Идем и открываем файл: X:\xxx\gameap\application\libraries\Rcon\drivers\Rcon_source.php.
Ищем строчки:
function get_players()
{
if ($result = $this->command('status')) {
$return = array();

$pattern = '!#([\s]*)(\d*)([\s]*)"(.*?)"(\s*)([a-zA-Z0-9\_\:]*)(\s*)([0-9\:]*)(\s*)(\d*)(\s*)(\d*)(\s*)([a-zA-Z0-9\_\:]*)(\s*)(.*):(\d*)!si';
$matches = get_matches($pattern, $result);

$count = count($matches);
$a = 0;
while ($a < $count) {
$return[] = array(
'user_name' => $matches[$a]['4'],
'steam_id' => $matches[$a]['6'],
'user_id' => $matches[$a]['2'],
'user_ip' => $matches[$a]['16'],
'user_time' => $matches[$a]['8'],
);


Меняем на:

function get_players()
{
if ($result = $this->command('status')) {
$return = array();

$pattern = '!#([\s]*)(\d*)([\s]*)(.*?)([\s]*)(STEAM\_[a-zA-Z0-9\_\:]*)([\s]*)([0-9\.]*)\:(\d*)(\s*)(\d*)!si';
$matches = get_matches($pattern, $result);

$count = count($matches);
$a = 0;
while ($a < $count) {
$return[] = array(
'user_name' => $matches[$a]['4'],
'steam_id' => $matches[$a]['6'],
'user_id' => $matches[$a]['2'],
'user_ip' => $matches[$a]['8'],
'user_time' => '',
);

Все. Теперь проверяйте=)

Страница 1 из 1 Часовой пояс: UTC + 4 часа
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/