Counter-Strike 2

Counter-Strike 2

Zbyt mało ocen
CS2 SERVER WITH EASY SETUP. Alternative for the currently not working workshop/practice lobbies
Autorstwa: ?
THIS IS A QUICK AND EASY GUIDE ON HOW TO PLAY WITH YOUR FRIENDS OR EVEN MAKE A PUBLIC SERVER. IF YOU WANT TO MAKE A COMMUNITY SERVER WITH MANY MODS AND STUFF, THIS GUIDE MIGHT NOT BE FOR YOU! ALL THE CODE IS OPEN SOURCE ON GITHUB.
   
Przyznaj nagrodę
Ulubione
Ulubione
Usuń z ulubionych
Introduction
FIRST OF ALL, THIS IS A QUICK AND EASY GUIDE ON HOW TO PLAY WITH YOUR FRIENDS OR EVEN MAKE A PUBLIC SERVER. IF YOU WANT TO MAKE A COMMUNITY SERVER WITH MANY MODS AND STUFF, THIS GUIDE MIGHT NOT BE FOR YOU! ALL THE CODE IS OPEN SOURCE ON GITHUB.

GO TO THIS LINK AND DOWNLOAD THE LATEST RELEASE Server.rar ARCHIVE: https://github.com/flcristian/cs2-server
Configuration
How to use:

Configure these 3 files before trying to open the cs2-server.exe:

variables.json
REQUIRED FOR THE SERVER TO WORK

instances.json
IN CASE YOU WANT TO OPEN SERVERS DIRECTLY AND SWAP EASILY BETWEEN WORKSHOP MAPS BY JUST REOPENING THE SERVER

arguments.json
IN CASE YOU WANT YOUR SERVER TO START WITH SPECIFIC ARGUMENTS AUTOMATICALLY

=-=-=-=-=-=-=-=-=-=-=-=-=-=
How to configure variables.json:

CS2Path
Open steam, right click on CS2, click browse local files and paste the path of the game inside the quotes.

SteamGameserverApiCode
Open this link: https://steamcommunity.com/dev/managegameservers
Log in. At the bottom of the page, enter code 730 for CS2 at "App ID of the base game" and press Create.
YOU NEED TO HAVE A LINKED PHONE NUMBER TO YOUR STEAM ACCOUNT

Port
Make sure you port forward for the port you have selected and also add it to your firewall. If you don't know how, use ChatGPT and ask it how.
I ALSO MADE A GUIDE IN CASE YOU DID ALL THIS AND YOU GET THE ERROR "Unable To Establish a Connection With the Gameserver" IN THE OTHER "How to play with friends" .md FILE!
ITS THE ONLY SOLUTION I FOUND SO FAR.
IF YOU CAN'T MANAGE TO PORT FORWARD, YOU CAN ALSO CHECK OUT THE GUIDE ABOVE.

VacEnabled
If you want VAC to be enables (true / false)

UseWorkshopMap
If you want to use one of the instances you created in instances.json (true / false)\

=-=-=-=-=-=-=-=-=-=-=-=-=-=
How to configure instances.json:

Name
Give your workshop map instance whatever name you want. Make it suggestive so you remember what map it is.

MapID
Go to the workshop map on steam and copy only the last digits of the link
Example : https://steamcommunity.com/sharedfiles/filedetails/?id=3124567099
ONLY COPY 3124567099

Arguments
If you want to start the server with some specific arguments, like this "+sv_cheats 1 +sv_autobunnyhopping 1" - this would enable bunnyhopping on the server automatically when it starts.
IF YOU DONT WANT ANY LEAVE EMPTY LIKE THIS : ""

=-=-=-=-=-=-=-=-=-=-=-=-=-=
How to configure arguments.json:

THIS MIGHT OVERRIDE ANY ARGUMENTS YOU HAVE SET IN YOUR instances.json INSTANCES:
ISSUE EXAMPLES:
You have these arguments in your instances.json instance : +sv_cheats 1 +sv_autobunnyhopping, 1 and these arguments in your arguments.json: +sv_cheats 0 +mp_roundtime_defuse 60.
THIS WOULD RESULT IN HAVING sv_cheats = 0 AND NO BUNNYHOPPING, BUT THE ROUND TIME OF YOUR DEFUSE MATCH EQUAL TO 60 minutes.

Arguments
If you want to start the server with some specific arguments, like this "+sv_cheats 1 +sv_autobunnyhopping 1" - this would enable bunnyhopping on the server automatically when it starts.
IF YOU DONT WANT ANY LEAVE EMPTY LIKE THIS : ""
Common Issues
=-=-=-=-=-=-=-=-=-=-=-=-=-=
COMMON ISSUES: If nothing happens after starting cs2-server.exe and you modified the variables.json
IT MEANS YOU HAVE ENTERED THE WRONG PATH
PLEASE VERIFY THE VALUES YOU ENTERED.

FOR ANY ISSUES ADD ME ON DISCORD AND I'LL TRY TO HELP: ruskizeu
How to play with friends
If you're getting the "Unable To Establish a Connection With the Gameserver" error, I found a way to play with friends since workshop map lobbies also don't work so far.
This entire guide was mainly made for this purpose.
It also doesn't require any port forwarding if you don't know how to do it or can't for some reason.

First of all, you all need to install an Hamachi-like app called ZeroTier One. It's used to make virtual lan connections between you and your friends.
https://www.zerotier.com

You all need to install it from here: https://www.zerotier.com/download/

Only the one who is hosting the server needs to register and create a network on it.
The first thing you'll see is you have a network id, remember it exists.

You now have two options, make it private (you need to manually add your friends) or make it public (they can join by having the network id).
I honestly recommend using public because it's much faster, and noone is going to guess your network id anyway.

After you all installed it, if you try to open it, there won't appear any windows on your screen.
That's not because it's a virus, but because it's opened in the background, go to your background apps
(next to the language selector in windows there is an arrow) and click on it from there.
Press join new network and paste the network id.
Now you have successfully joined the network id.

How do you connect to the server after this?
The one who is hosting the server, open the app from the background apps thing, now you should see your own address,
example : a91amb71ka (10 letters and numbers)

Now go on the network configuration on the browser.
Scroll to the bottom and you'll see everyone who joined the network.
Recognize your own address and look at Managed IPs, that is the IP everyone needs to connect to after the server is open.
Example: 172.28.189.181\
!!!!!THIS ISN'T YOUR PHYSICAL IP!!!!!