Skip to content

Commit b19c1ca

Browse files
committed
First Commit
0 parents  commit b19c1ca

3,997 files changed

Lines changed: 992725 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
7+
# Standard to msysgit
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG]"
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Screenshots/Video**
21+
If applicable, add screenshots and/or video to help explain your problem.
22+
23+
**Server Operating System (if applicable):**
24+
- Linux/Windows
25+
26+
**Additional context**
27+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this repository
4+
title: "[Request]"
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Check all plugins
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'addons/sourcemod/scripting/**/*.sp'
7+
- 'addons/sourcemod/scripting/**/*.inc'
8+
branches:
9+
- master
10+
push:
11+
paths:
12+
- 'addons/sourcemod/scripting/**/*.sp'
13+
- 'addons/sourcemod/scripting/**/*.inc'
14+
branches:
15+
- master
16+
workflow_dispatch:
17+
paths:
18+
- 'addons/sourcemod/scripting/**/*.sp'
19+
- 'addons/sourcemod/scripting/**/*.inc'
20+
branches:
21+
- master
22+
23+
jobs:
24+
build:
25+
name: build with sm${{ matrix.sm_version }}
26+
runs-on: ubuntu-latest
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
sm_version:
31+
#- "1.9"
32+
#- "1.10"
33+
- "1.11"
34+
- "1.12"
35+
36+
steps:
37+
- uses: actions/checkout@v3
38+
- name: Set environment variables
39+
run: |
40+
echo "SCRIPTS_PATH=$GITHUB_WORKSPACE/addons/sourcemod/scripting" >> $GITHUB_ENV
41+
42+
- name: Setup SourcePawn Compiler ${{ matrix.SM_VERSION }}
43+
uses: rumblefrog/setup-sp@master
44+
with:
45+
version: ${{ matrix.SM_VERSION }}
46+
47+
- name: Compile plugins
48+
run: |
49+
for file in *.sp
50+
do
51+
echo -e "\nCompiling $file..."
52+
<<<<<<< HEAD
53+
spcomp -E -w234 -O2 -v2 -i $SCRIPTS_PATH/include $file
54+
=======
55+
spcomp -E -w234 -w217 -O2 -v2 -i $SCRIPTS_PATH/include $file
56+
>>>>>>> master
57+
done
58+
working-directory: ${{ env.SCRIPTS_PATH }}/

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Windows thumbnail cache files
2+
Thumbs.db
3+
ehthumbs.db
4+
ehthumbs_vista.db
5+
6+
# Folder config file
7+
Desktop.ini
8+
9+
# Recycle Bin used on file shares
10+
$RECYCLE.BIN/
11+
12+
# Windows Installer files
13+
*.cab
14+
*.msi
15+
*.msm
16+
*.msp
17+
18+
# Windows shortcuts
19+
*.lnk
20+
21+
# =========================
22+
# Operating System Files
23+
# =========================
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# < 0 > | **Dedicated Server Fresh Start Guide**
2+
3+
<== IMPORTANT NOTICE DON'T IGNORE THIS OKAY?! ===>
4+
<------------------ **LINUX SUPPORT ONLY** ------------------>
5+
< This means Windows is not Supported, so don't ask~ :smile: >
6+
> **Document's Purpose:**
7+
8+
This purpose of this document is to make it very easy to get Optimized Servers ready for people interested in hosting their own servers for L4D2. Most (if not all) server hosts will refuse to assist with the installation of 3rd party software so this document aims to help you do everything from start to finish without needing outside assistance.
9+
10+
> **Recommended Server Specifications:**
11+
* **OS:** Ubuntu **18.04 or earlier**. Newer versions of Ubuntu appear to have blood splatter on your screen if you shoot a zombie that is far away.
12+
* A Dedicated Server Space, do not use shared resources. (A proper VDS will work just fine)
13+
* 1 core per server, 1GB Memory per server
14+
* Gameservers are usually hosted in a Shared Environment, thus not recommended.
15+
* A modern CPU, if you're planning on increasing the tickrate I would aim for a solid 3GHz CPU at minimum.
16+
* DDoS Protection to absorb volume attacks and to filter out malicious traffic.
17+
18+
> **Solid Server Hosts (In My Experience):**
19+
* NFOServers (**for US**, mostly)
20+
* OVH (**for EU**, mostly)
21+
22+
23+
- - - -
24+
# | **Dedicated Server: Fresh Start**
25+
> **Initial Server Install/Connection:**
26+
> This part of the Project will focus on preparing your dedicated Server/VDS for L4D2.
27+
28+
Login to your webhosts admin panel and ensure you are using Ubuntu **18.04 or earlier**. You should have had an option to do this during the order process, but if not most hosts will have an intuitive admin panel to allow you to do this. I used GCoreLabs to set up a server whilst writing this guide, and they have a 'reinstall' option under "[Management > Virtual Machines](https://imgur.com/A7kRTyO)".
29+
30+
For the next part, you will need to make use of an SSH Client such as [Putty](http://www.putty.org/).
31+
32+
Once Putty is installed and launched, you only need to enter the IP address of your server into the Hostname field. The port should default to 22 and the connection type to SSH which is correct. Once you've input the IP address select 'open'. If you get a security warning select yes.
33+
34+
After this you should get a black screen which says "login as:". You should enter the username provided by your hosting provider (likely 'root'). After this you'll be prompted for the password. NB: With the username or password in your clipboard you can simply right click to paste it into putty. The password will not display on screen but it will paste as long as it's in your clipboard.
35+
36+
> **L4D2 Prerequisites:**
37+
> Before you can install L4D2, there are a number of items you must install first. Simply copy and paste each of these commands one by one into the putty terminal. You won't get any feedback on the first command, but the next 4 will visibily install something, and potentially ask you give permission. You just need to type 'y' and enter when prompted.
38+
39+
**dpkg --add-architecture i386 # enable multi-arch
40+
apt-get update && apt-get upgrade
41+
apt-get install libc6:i386 # install base 32bit libraries
42+
apt-get install lib32z1
43+
apt-get install screen**
44+
45+
> **Creating a User to run the Servers on**
46+
> You don't want to be running these services on root, do you?!
47+
> We'll call the account Steam and allow it to run certain Root commands so that you won't have to log into Root all the time.
48+
> After that, we'll login to the user. (when you enter the login comamnd it will ask you which user to log in to, simply log in with the new username (steam) and password you just created seconds ago).
49+
50+
**adduser steam**
51+
**adduser steam sudo**
52+
**login**
53+
54+
> **Installing Steam and L4D2 Files**
55+
> We're no longer logged in to our Root user, we'll be logged in to our user "Steam".
56+
> By entering these commands one by one in order you'll have all the required files for a L4D2 vanilla server installed in "**/home/steam/Steam/steamapps/common/l4d2**"
57+
58+
**wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz
59+
tar -xvzf steamcmd_linux.tar.gz
60+
./steamcmd.sh
61+
login anonymous
62+
force_install_dir ./Steam/steamapps/common/l4d2
63+
app_update 222860 validate
64+
quit**
65+
66+
> **Setup the Server Start/Restart/Stop Files**
67+
> Next you'll need to download the srcds1 file provided within this directory. You can [click here](https://github.com/SirPlease/L4D2-Competitive-Rework/blob/master/Dedicated%20Server%20Install%20Guide/srcds1), select raw, then right click and save.
68+
> I recommend having [Notepad++](https://notepad-plus-plus.org/download/v7.5.1.html) in order to make this as smooth as possible but the notepad within windows works fine.
69+
70+
The srcds1 file provided has all the information you need inside it. Realistically, if you are hosting one server and you have followed every step in this guide you will only need to change the IP address of your server from 1.3.3.7 to your actual IP. After this save the file as srcds1. If it saves as srcds1.txt you should rename it to remove the .txt extension.
71+
72+
When this file has been edited and correctly saved as srcds1, you need to put it into your **/etc/init.d** folder.
73+
74+
To do this you will need to use of an FTP Client such as [FileZilla](https://filezilla-project.org/).
75+
76+
When Filezilla is installed, launch it and select the site manager option at the top left. Select 'New Site' and give it a name. Change the Protocol to 'SFTP' and leave the port blank. Enter the same username/password combination you used for Putty and click on 'Connect'. If the server puts you in the 'root' folder by default, you can use the ".." at the top to go back and help you find the **/etc/init.d** folder. Once you are in the **/etc/init.d** folder you just need to drag and drop the srcds1 from your computer into this directory on the server.
77+
78+
> **Install the addons/server configuration files**
79+
> Before starting the server we can install the addons/cfg files and ensure they are configured correctly. Keep filezilla handy as we will be making use of this again.
80+
81+
Go to the [Competitive Rework](https://github.com/SirPlease/L4D2-Competitive-Rework) github page. Select the green 'code' option at the top right and choose the 'Download Zip' option from the dropdown. Unzip the files to somewhere handy on your computer and open up the folder. Edit 'myhost.txt' and 'mymotd.txt' to whatever you want to display to users who join your server. Open the 'cfg' folder and rename 'server.cfg' to 'server1.cfg'. We call it server1 as we already defined it as server1 in the srcds1 file. Once the file is renamed open it up and edit the options in here as you please. Everything should be clearly defined but you should probably only touch the hostname, password, and steamgroup options. After this you can navigate to home/steam/Steam/steamapps/common/l4d2/left4dead2/ on your server through filezilla and upload all the files (including the ones we just edited) from the competitive rework download on top of what is currently there. With everything uploaded we are now ready to start the server!
82+
83+
> **Starting, Restarting or Stopping your Servers**
84+
> First we'll have to allow the system to actually run the files, which we'll do by entering the following command into the Terminal. If you opt to run multiple servers (see the FAQ) you will need to run this command for each server.
85+
86+
**sudo chmod +x /etc/init.d/srcds1**
87+
88+
> **All set!**
89+
>Now you can simply Start/Restart/Stop servers individually with simple commands.
90+
>Start your command with the file location and then the action.
91+
92+
Example: **/etc/init.d/srcds1 restart
93+
/etc/init.d/srcds1 start
94+
/etc/init.d/srcds1 stop**
95+
96+
>If you receive "-bash: /etc/init.d/srcds1: /bin/sh^M: bad interpreter: No such file or directory" error, it means you have dos line ending file
97+
>You can use dos2unix command on srcds1 file, or use any other method to have this file in unix format
98+
99+
- - - -
100+
# < 2 > | **F.A.Q.**
101+
102+
> **My VDS has multiple cores and lots of RAM, can I run multiple servers simultaneously?!**
103+
104+
Yes. You just need to not lose the motivation to complete this FAQ.
105+
106+
> **How do I get that super cool mix plugin the SirPlease servers have?!**
107+
108+
You can't as he hasn't made it public. You can use the one created by LuckyLock though which serves the same purpose with minor differences. To install this you will need to download the [plugin file](https://github.com/LuckyServ/sourcemod-plugins/raw/master/compiled/l4d2_mix.smx). Upload the file using filezilla to the addons/sourcemod/plugins/optional/ folder. Open the cfg/cfgogl/zonemod/confogl_plugins.cfg file and add "sm plugins load optional/l4d2_mix.smx" to the bottom of the file without quotes. Upload the confogl_plugins.cfg over the top of your current server file using filezilla and restart your server.
109+
110+
> **Left 4 Dead 2 just had an update and I can't connect to my server anymore?!**
111+
112+
You will need to update your server.
113+
114+
./steamcmd.sh
115+
login anonymous
116+
force_install_dir ./Steam/steamapps/common/l4d2
117+
app_update 222860 validate
118+
quit
119+
120+
> **I've installed the Tickrate Enabler and set my tickrate to 128 or higher, but on the net_graph the bottom value will still be 100!**
121+
122+
This is because it's a hardcoded limit in the client, but don't worry, it's only a visual thing.
123+
The two middle values on net_graph show you what you're actually getting from the Server.
124+
125+
> **I've installed the Tickrate Enabler, but one or both the middle values aren't reaching the Tickrate set**.
126+
127+
First, make sure that you've properly adjusted your rates in the server.cfg as well.
128+
If everything is set correctly check if the "**sv**" (check the net_graph) isn't struggling to stay above the Tickrate's value, as this will decrease the amount of updates clients are getting from the Server.
129+
Regarding updaterate, this will only be a client problem if the client has a laggy connection to the Server and is dropping packets.
130+
131+
The amount of commands a client can send to the Server is limited to the client framerate.
132+
If you're only getting 60fps, you'll never have an actual cmdrate of above 60.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#!/bin/sh
2+
3+
# replace "steam" with the user you created, leave it alone if you've actually called your user "steam"
4+
SRCDS_USER="steam"
5+
6+
# Do not change this path
7+
PATH=/bin:/usr/bin:/sbin:/usr/sbin
8+
9+
# The path to the game, only change this if you have a different installation path than in the guide.
10+
DIR=/home/$SRCDS_USER/Steam/steamapps/common/l4d2
11+
DAEMON="$DIR/srcds_run"
12+
13+
# Change all Parameters to your needs.
14+
15+
############################################## TICKRATE INFO ########################################################
16+
#
17+
# Only 128 Tickrate and up will need modifications to the frametime and frametime_override, 100 tick and below do not need these parameters.
18+
# 128 Tickrate needs the follows params added: -frametime 0.037 -frametime_override 0.037
19+
#
20+
#####################################################################################################################
21+
22+
23+
############################################# PARAMETERS & SERVER.CFG ###############################################
24+
#
25+
# SVNUM will come in handy for when you're hosting multiple Servers on the same Dedicated Machine.
26+
# Replace "1.3.3.7" with your Dedicated's Server IP.
27+
# Replace 27015 with the Port this L4D2 Server will be hosted on.
28+
#
29+
# Rename your Server.cfg files accordingly, if you're hosting just one server, you'll only need server1.cfg
30+
# If you're hosting multiple Servers, simply copy server1.cfg, change the hostname inside and rename it to server2.cfg and so on.
31+
# Don't forget to copy and edit the file as well, the SVNUM has to match the server#.cfg and the Port has to be available.
32+
#
33+
#####################################################################################################################
34+
35+
# The current settings will start the Server on 100 Tick on Dead Center 1.
36+
SVNUM=1
37+
#IP=120.53.14.57
38+
IP=0.0.0.0
39+
PORT=27015
40+
NAME=L4D2_Server$SVNUM
41+
PARAMS="-game left4dead2 -ip $IP -port $PORT -timeout 10 -tickrate 100 +map c2m1_highway +exec server.cfg"
42+
DESC="L4D2 Dedicated Server #$SVNUM on port $PORT"
43+
44+
45+
###########################################
46+
# #
47+
# DON'T TOUCH THESE #
48+
# #
49+
###########################################
50+
51+
case "$1" in
52+
start)
53+
if su $SRCDS_USER -l -c "screen -ls" |grep $NAME; then
54+
echo -n "$DESC: $NAME already started!"
55+
else
56+
echo "Starting $DESC: $NAME"
57+
cd $DIR
58+
su $SRCDS_USER -l -c "screen -d -m -S $NAME $DAEMON $PARAMS"
59+
fi
60+
;;
61+
62+
stop)
63+
if su $SRCDS_USER -l -c "screen -ls" |grep $NAME; then
64+
echo -n "Stopping $DESC: $NAME"
65+
kill `su $SRCDS_USER -l -c "screen -ls" |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'`
66+
echo " ... done."
67+
else
68+
echo "Couldn't find a running $DESC"
69+
fi
70+
;;
71+
72+
restart)
73+
if su $SRCDS_USER -l -c "screen -ls" |grep $NAME; then
74+
echo -n "Stopping $DESC: $NAME"
75+
kill `su $SRCDS_USER -l -c "screen -ls" |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'`
76+
echo " ... done."
77+
else
78+
echo "Couldn't find a running $DESC"
79+
fi
80+
echo -n "Starting $DESC: $NAME"
81+
cd $DIR
82+
su $SRCDS_USER -l -c "screen -d -m -S $NAME $DAEMON $PARAMS"
83+
echo " ... done."
84+
;;
85+
86+
status)
87+
# Check whether there's a "srcds" process
88+
ps aux | grep -v grep | grep srcds_r > /dev/null
89+
CHECK=$?
90+
[ $CHECK -eq 0 ] && echo "SRCDS is UP" || echo "SRCDS is DOWN"
91+
;;
92+
93+
*)
94+
echo "Usage: $0 {start|stop|status|restart}"
95+
exit 1
96+
;;
97+
esac
98+
99+
exit 0

0 commit comments

Comments
 (0)