Присоединяем демку к вашему серверу, например +connect amxmodmenu.ru:27015
port
Порт HLTV сервера, по которому игроки смогут присоединиться для просмотра трансляции
maxclients
Количество слотов для просмотра трансляции. Максимально - 255
exec hltv.cfg
Подгружаем конфиг нашего HLTV сервера (если его нет, то создайте сами.).
Пример hltv.cfg
// HLTV Proxy configuration file
// HLTV proxy runs this file on start up // This file should only be edited if you want to broadcast a game
// set HLTV proxy name as shown in score board name "HLTV amxmodmenu.ru"
// set HLTV name, how it should appear in game server browsers // hostname "HLTV Proxy amxmodmenu.ru"
// set offline info text clients will see as reject reason if HLTV isn't broadcasting yet offlinetext "Sorry, game is delayed. Please try again later."
// delays broadcasting for 30 seconds delay 30.0
// allow 3.5 KByte/sec as client rate. This is good a value // for internet broadcasts. On LAN you may set this value to 10000 maxrate 3500
// log HLTV console in proxy.log // logfile 1
// local chatting for HLTV spectators enabled chatmode 1
// if game server is password protected, enable this line // serverpassword "mypassword"
// proxy's adim password for rcon, commentator etc. // adminpassword "mypassword"
// show message for 5 seconds each 60 seconds in center of X axis (-1) and // above help text bar (0.85). Color given as hexadecimal RGBA . loopcmd 1 60 localmsg "You're watching HLTV. Visit www.valvesoftware.com" 5 -1 0.85 FFA000FF
// hltv.tga will be shown instead of the default HLTV logo in spectator GUI // bannerfile "hltv.tga"
// these commands will be executed on connecting spectator client and may be used // to adjust settings for HLTV (for example voice parameters) signoncommands "voice_scale 2; voice_overdrive 16; volume 0.5; echo Voice adjusted for HLTV"
echo hltv.cfg loaded.
Сохраняем hltv_start.sh в директории вашего сервера, на примере это ./home/user/hlds_dir/ и даем ему права на выполнение:
chmod +x hltv_start.sh
Переходим в директорию с нашим сервером это ./home/user/hlds_dir/ и запускаем наш HLTV сервер с помощью скрипта, в фоновом режиме через screen
screen -d -m -S hltv ./hltv_start.sh
Для того чтобы войти в фоновый режим пишите
screen -r hltv
Для выхода из фонового режима Ctrl+A,D. Для закрытия скрина Ctrl+C.
Рассмотрим распространённые ошибки при запуске HLTV сервера на Linux
Ошибка libSteamValidateUserIDTickets
Error:libSteamValidateUserIDTickets_i386.so: cannot open shared object file: No such file or directory ***** FATAL ERROR *****
Выполните команду
cp libSteamValidateUserIDTickets_i386.so /usr/lib
Ошибка director
Error:director_i386.so: cannot open shared object file: No such file or directory