How to create a Left 4 Dead 2 server with SteamCMD and SourceMod

Ойындар

Script to install/update the L4D2 server, put this in the "C:\Steamcmd\" folder:
@echo off
title L4D2 Dedicated Server Update
color 4
echo ***********************************************************************************************************************
echo This script was created by Tegh.
echo This will install/update the L4D2 Server.
echo ***********************************************************************************************************************
pause
set STEAM_CMD_LOCATION="C:\steamcmd"
steamcmd.exe +force_install_dir C:\steamcmd\l4d2 +login anonymous +app_update 222860 +quit
pause
exit
Script to start the server, put this in the "C:\Steamcmd\l4d2\" folder:
@echo off
title Tegh's L4D2 Dedicated Server
color 2
:start
echo ***********************************************************************************************************************
echo This script was created by Tegh.
echo It will start and run the L4D2 Server
echo with the following start commands:
echo -console +login anonymous -game left4dead2 -insecure +maxplayers 4 +map c8m1_apartment -port 27015 +ip 10.0.0.7 +log on
echo ***********************************************************************************************************************
pause
srcds.exe -console +login anonymous -game left4dead2 -insecure +maxplayers 4 +map c8m1_apartment -port 27015 +ip 10.0.0.7 +log on
exit
Open notepad and save these as a .bat file, server.bat update.bat or whatever you want, as long as the file is a .bat
Server Config file:
hostname "Your server name here"
// # of rounds to play (versus)
mp_roundlimit 2
// CHEAT/CONFIG
sv_lan 0
sv_cheats 0
sv_consistency 1
sv_maxcmdrate 101
sv_maxrate 30000
//MOTD
motd_enabled 1
//GAME MODE
sv_gametypes "coop, versus, mutation"
sm_cvar mp_gamemode coop
//DIFFICULTY
z_difficulty Normal
//LOBBY CONNECT
sv_allow_lobby_connect_only 0
//Game Settings
mp_disable_autokick 1
sv_allow_wait_command 0
sv_alternateticks 0
sv_clearhinthistory 0
sv_consistency 0
sv_pausable 0
sv_forcepreload 1
sv_pure_kick_clients 0
sv_pure 0
// Communication
sv_voiceenable 1
sv_alltalk 1
// Logging
log on
sv_logecho 0
sv_logfile 1
sv_log_onefile 0
sv_logbans 1
sv_logflush 0
sv_logsdir logs
// Bans
// execute banned.cfgs at server start. Optimally at launch commandline.
exec banned_user.cfg
exec banned_ip.cfg
writeip
writeid
//Network Tweaks - Increase network performance
rate 10000 //default 10000; Max bytes/sec the host can recieve data
sv_minrate 15000 //default "5000"; Min bandwidth rate allowed on server, 0 = unlimited
sv_maxrate 30000 //default "0"; Max bandwidth rate allowed on server, 0 = unlimited
sv_mincmdrate 20 //default 0; This sets the minimum value for cl_cmdrate. 0 = unlimited [cevo=67]
sv_maxcmdrate 33

Пікірлер: 29

  • @khangphamthd-l4d241
    @khangphamthd-l4d24111 ай бұрын

    I did the same as the video I tried to create the server and it said STEAM validation rejected how to fix it ?

  • @MAustinP
    @MAustinP9 ай бұрын

    Where did this mysterious addons.zip on your desktop come from?

  • @JonatanFontanini
    @JonatanFontanini6 ай бұрын

    Is this suitable for playing with more than 9 players? Does it only work on left 4 dead no steam?

  • @Tegh1989

    @Tegh1989

    6 ай бұрын

    Hello, these serveres will connect to the valve network, and the server will be listed if you search for it in server browser on steam, as for more players, there was a sourcemod plugin called "l4dtoolz" it could host up to 32 players, dont think that one is still in development, but i see quite a few 32 player serveres up, so you will probably find something similar if you look for it 🙂

  • @morchelys5457
    @morchelys54576 ай бұрын

    I write - /admin in server and it says [SM] You dont have permission and how to make the server to versus mode

  • @Tegh1989

    @Tegh1989

    6 ай бұрын

    Hey did you add urself as admin to the server? I show this around 10:50 in the vid, if want to change game mode the command is: m_cvar mp_gamemode versus You can edit the server.cfg file if its a Copy-paste from the description to make the server start in mutation.

  • @DuaYT
    @DuaYT14 күн бұрын

    The players cannot join my server, it says Connection failed after 40 retries. How do I fix?

  • @MrSir-bo3zk

    @MrSir-bo3zk

    8 күн бұрын

    This happens to me too

  • @Switcher-Switcher
    @Switcher-Switcher4 ай бұрын

    your VAC says it's active/secure, while the one on mine says VAC is disable/not secure. how to enable my VAC on server?

  • @Tegh1989

    @Tegh1989

    4 ай бұрын

    If you use the startup script in the description, change the startup arguments from -insecure to -secure it should look something like this: -console +login anonymous -game left4dead2 -secure +maxplayers 4 +map c8m1_apartment -port 27015 +ip 10.0.0.7 +log on Now VAC should be activated.

  • @Switcher-Switcher

    @Switcher-Switcher

    4 ай бұрын

    @@Tegh1989 Thanks bro

  • @Lazy_Pot
    @Lazy_Pot11 ай бұрын

    Will this make a server that has reduced lag for everyone unlike local server?

  • @ryugaroxas

    @ryugaroxas

    10 ай бұрын

    Not really but it stop everyone from being kicked all together

  • @felixhartman1439
    @felixhartman1439 Жыл бұрын

    hi dude i was wondering now that i have the server how do i remove it cus i want it back to normal cus now when ever i start up a local server only i can be in it and no one can join me

  • @Tegh1989

    @Tegh1989

    Жыл бұрын

    Hello! 🙂 How to remove the server? simply just delete the steamcmd folder, it does not add anything to your steam folder where the games is located, so people should be able to join you when you host a local game within l4d2. If you think there is something wrong with your l4d2 install, you can right click it on steam > Properties... > Local Files > Verify integrity of game files... As for the steamcmd server you might have to open ports in your router to make people join, for l4d2 these ports is: TCP: 27015, 27036 UDP: 27015, 27031-27036 if you dont know how to open ports on your router, you can find a guide for it on portforward.com they have pretty much a guide for every router out there. now random people can join or send people the public IP to the server to make them join, which u can see at whatismyip.com for example then: connect IP:27015

  • @felixhartman1439

    @felixhartman1439

    Жыл бұрын

    @@Tegh1989 nice could u come online again and maybe help me cus i would love for my local server to work

  • @kh-mkh-m1076
    @kh-mkh-m1076 Жыл бұрын

    Hello ... Is it possible to create a dedicated server on Windows 10 - 32-bit? Thank you... 🌹

  • @Tegh1989

    @Tegh1989

    Жыл бұрын

    Hello! yes this will work for Windows 7 / 8 / 10 / 11 both 32-bit and 64-bit. Thanks for watching!

  • @kh-mkh-m1076

    @kh-mkh-m1076

    Жыл бұрын

    @@Tegh1989 Actually, I'm trying to make one for (Euro Truck Simulator2) But when it finishes installing and updating, everything seems to be fine, except that I can't find the executable file (.exe) for the game server. I hope to find a solution to this problem.... Thank you very much! 🌹🙂

  • @Tegh1989

    @Tegh1989

    Жыл бұрын

    @@kh-mkh-m1076 i see, i tried to install Euro Truck Simulator 2 server on my win 10 32-bit VM, and on a win 10 64-bit VM. There is something missing on the 32-bit version, and that is this folder: Steamcmd\gameservers\ets2server\bin\win_x64 it seems like for this game, it only support 64-bit, as steam_api64.dll and eurotrucks2_server.exe will not install or run on a 32-bit machine. Sorry about that :(

  • @kh-mkh-m1076

    @kh-mkh-m1076

    Жыл бұрын

    @@Tegh1989 Yes, this is exactly the problem It's frustrating, but I hope it can be resolved in the future Thank you, you are really cool brooo! :)

  • @MrSir-bo3zk
    @MrSir-bo3zk Жыл бұрын

    Hey can you help me, I did all the steps in the video but only I can connect to the server and none of my friends can join my server. It says failed after 10 retries. Please help me.

  • @birb9000

    @birb9000

    10 ай бұрын

    hey did you ever figure this out? having the same issue and can't find any info on how to fix it

  • @presistancelydeccer7338

    @presistancelydeccer7338

    6 ай бұрын

    @@birb9000 @MrSir-bo3zk after intensive trial and error. A lot of readings and such. I finally figured it out. It seems this video only show the private ip part. And that where we all get mistaken. We created a lobby with that said ip. Assumed that you did the same because thats what I did first. So, here is what you need to do. Start the server as normal. In server console. Type "status". You will see the server public ip. Now use that ip to create lobby or connect to the server and your friend now can join the server. Hope it helps as this comments got no replies not even from op himself.

  • @birb9000

    @birb9000

    6 ай бұрын

    @@presistancelydeccer7338 thank you!

  • @DuaYT

    @DuaYT

    14 күн бұрын

    @@presistancelydeccer7338 still doesn't work

  • @neto9217
    @neto92175 ай бұрын

    cool tutorial but dude, get off of Win7, yes it's a great OS but it's not supported with security updates anymore

  • @user-rb9ce6lr9p
    @user-rb9ce6lr9p2 ай бұрын

    Ужасно! потратил 2 часа времени. Просто у меня не появлися 1 из файлов в папке complied. УЖАСНО! не звука, еще к тому же качество такое, что буквы еле еле разглядеть можно. Мышка летает вечно хрен разберешься. Зря только время потратил

Келесі