Created
April 14, 2017 22:23
-
-
Save pulecp/d7c6cbc252cc18618edd1f7226525e84 to your computer and use it in GitHub Desktop.
Counter Strike 1.6 Server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get install unzip -y | |
apt-get install expect -y | |
# Counter strike | |
mkdir server ; mkdir steamcmd ; cd steamcmd | |
wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz | |
tar -xvzf steamcmd_linux.tar.gz | |
expect -c 'set timeout 9999; \ | |
spawn ~/steamcmd/steamcmd.sh; \ | |
expect "Steam>" { send "login anonymous\r" }; \ | |
expect "Steam>" { send "force_install_dir /root/server\r" }; \ | |
expect "Steam>" { send "app_update 90 validate\r" }; \ | |
expect "Steam>" { send "app_update 90 validate\r" }; \ | |
expect "Steam>" { send "exit" }' | |
# Metamod | |
cd /root/server/cstrike | |
mkdir addons ; cd addons ; mkdir metamod ; cd metamod ; mkdir dlls ; cd dlls | |
wget https://files.nscodes.com/cs16/metamod-p-1.21p37-linux_i686.tar.gz | |
tar -zxvf metamod-p-1.21p37-linux_i686.tar.gz | |
touch /root/server/cstrike/addons/metamod/plugins.ini | |
cd /root/server/cstrike | |
echo 'gamedll_linux "addons/metamod/dlls/metamod.so"' >> liblist.gam | |
# AMMmodx | |
wget https://files.nscodes.com/cs16/amxmodx-1.8.2-base-linux.tar.gz | |
tar xzvf amxmodx-1.8.2-base-linux.tar.gz | |
wget https://files.nscodes.com/cs16/amxmodx-1.8.2-cstrike-linux.tar.gz | |
tar xzvf amxmodx-1.8.2-cstrike-linux.tar.gz | |
echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" >> /root/server/cstrike/addons/metamod/plugins.ini | |
# dProto | |
cd /root/server/cstrike/addons/ | |
mkdir dproto ; cd dproto | |
wget https://files.nscodes.com/cs16/dproto_i386.zip | |
unzip -o dproto_i386.zip | |
cd /root/server/cstrike | |
wget https://files.nscodes.com/cs16/dproto.zip | |
unzip -o dproto.zip | |
echo "linux addons/dproto/dproto_i386.so" >> /root/server/cstrike/addons/metamod/plugins.ini | |
# GunGame | |
cd /root/server/cstrike | |
wget https://files.nscodes.com/cs16/gg_213c_full.zip | |
unzip -o gg_213c_full.zip | |
sed -i'' '/gg_map_setup/s/mp_c4timer 25/mp_freezetime 0/; /gg_kills_per_lvl/s/2/1/; /gg_warmup_timer_setting/s/60/0/' /root/server/cstrike/addons/amxmodx/configs/gungame.cfg | |
sed -i'' '/gg_weapon_order/s/hegrenade//' /root/server/cstrike/addons/amxmodx/configs/gungame.cfg | |
echo "gungame.amxx" >> /root/server/cstrike/addons/amxmodx/configs/plugins.ini | |
# Setup play script | |
echo -e "cd /root/server && ./hlds_run -console -game cstrike -ip $(curl icanhazip.com) -port 27015 +maxplayers 32 +map \${1-de_dust2}" > ~/play.sh | |
chmod +x ~/play.sh | |
# Helpers | |
ln -s /root/server/cstrike/maps /maps | |
# Start game to overcome THE BUG | |
timeout 5 ~/play.sh | |
echo -e "\n----------------------------\nStart by running `~/play.sh [map]`\n----------------------------\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment