[TUTORIAL] Local KZTimer Server

Discussion in 'General Discussion' started by JWL, Oct 29, 2015.

  1. JWL

    JWL Climb Cove Programmer KZ Server Owner Mapper

    Joined:
    Aug 3, 2015
    Messages:
    732
    Likes Received:
    256
    How to setup a local KZTimer Server [Global Records Enabled]

    In this guide you will learn:

    1. How to setup a local CS:GO server
    2. How to let others join your CS:GO server [OPTIONAL]
    3. How to install Sourcemod/Metamod [and plugins]
    4. How to install KZTimer [Global Version]
    5. How to setup KZTimer Database [locally]
    6. How to run server at different tickrates
    7. How to add admins to your server
    8. How to set your server to wombo
    Required Materials [some attached near bottom]:
    1. KZTimer Global
    2. Sourcemod
    3. Metamod
    4. steamcmd GUI
    5. databases.cfg
    Required Knowledge:
    1. How to Copy/Paste Stuff
    2. How to Forward Ports on Router [OPTIONAL]
    First Step:
    -> Download and Installing a CS:GO Server using SteamCMD GUI

    1. Download and Unzip steamcmd gui anywhere you want using something like PeaZip.
    2. Start SteamCMD GUI.exe - You should see this:[​IMG]
    3. Create a path/folder for your SteamCMD installation. I suggest just putting it in your Local Disc (C: Drive. [​IMG]
    4. Download SteamCMD using the button towards the right of SteamCMD GUI. It will download steamcmd.zip to the your SteamCMD GUI folder. Unzip the file, and put steamcmd.exe in the steamcmd folder you created in #3.
      [​IMG]
    5. Next, configure the settings like so, and then click Update/Install.[​IMG]
    6. After Update/Install, it will come up with a simple command prompt looking interface. Don't touch anything, it's going to install a CS:GO server for you. Please be patient, it's going to take about a million years to download the ~8 GB of files unless you have 1GB internet like me. In the picture below, it's simply updating my local server. Remember this step, b/c it's how you update your local server every time a CS:GO Update rolls out to break the game. [​IMG]
    7. When it's done, it should say that the App was successfully installed. Feel free to close the window now. [​IMG]
    8. Check to make sure it installed the CS:GO server. If it installed correctly, you should be able to go to your server through the path: Computer -> Local Disc (C:) -> steamcmd -> steamapps -> common -> Counter-Strike Global Offensive Beta - Dedicated Server
    9. If you see this, then congrats! You've finished Step 1, and now have a local CS:GO server![​IMG]
    Second Step:
    -> Installing Sourcemod/Metamod

    1. Download Sourcemod/Metamod [linked above].
    2. Unzip Sourcemod and you should see this: [​IMG]
    3. I'm assuming you know where to find your local CS:GO server at this point. If you notice in steamapps/common/counter-strike global offensive beta - dedicated server/csgo, youll see this: [​IMG] Notice anything? You should, b/c I highlighted it. There's addons/cfg folders in your local CS:GO server installation and the sourcemod download you just unzipped. Simply highlight the addons/cfg folder from the sourcemod folder, and drag it to your csgo folder [of your server]. Make sure you're not dragging it in another folder. If it asks you to merge/overwrite anything, say yes. If it asks you if you want to delete system32, you probably downloaded sourcemod from the wrong link.
    4. Unzip metamod and you should see this:
      [​IMG]
    5. Starting to see how easy it is to install stuff to a server? Just like you did with the sourcemod installation, drag and drop that addons folder to your csgo folder [of your server]. If it asks you to merge folders/overwrite anything, say yes.
    6. Congratulations you just installed Sourcemod/Metamod!
    Step 3:
    -> Installing KZTimer and setting up your stats database

    1. Download and Unzip KZTimer Global [download link at top].[​IMG]
    2. As you might have guessed, all you gotta do is drag/drop all these folders/files into your csgo folder [of your server]. If it asks you to merge/overwrite any files, say yes.
    3. Yes, that was it. You just installed what took thousands of hours of work in thousands of lines of code in some offbeat language called SourcePawn that looks kinda like Java but doesn't really but tries to act like java but doesn't really. My god my grammar was bad in that last 'sentence.' Anyway, congrats! You now have KZTimer installed/enabled on your local CS:GO server. Don't go trying anything yet though, we're far from done.
    4. KZTimer will NOT work without a database setup. Fortunately, I've already setup for you, kind of. Attached below this post is CFG Files.zip. Time to download it/unzip it: [​IMG] All we're concerned about for now is the databases.cfg
    5. Usually, you would need to manually edit databases.cfg in your sourcemod folder and paste a bunch of lines in to setup your KZTimer database. However, for the sake of simplicity, I have already done so in the file you just downloaded. Drag that sucker over to csgo/addons/sourcemod/configs. It will ask you if you want to overwrite the existing databases.cfg. Say yes.
    6. Congrats, you've setup your KZTimer database [stats], and KZTimer Global is now completely installed and activated.
    Step 4:
    -> Some tiny server configurations. [totally necessary]

    1. Remember that CFG Files folder you downloaded? Like... 30 seconds ago? Yea, so in it are two files: admins_simple.ini and server.cfg. I've pasted a sort of copy of the server.cfg I use for my local kztimer server. Open it up: [​IMG] These are the 3 things you need to worry about. The rest of it is just a bunch of mumbo jumbo that's already there. hostname is the name of your server. rcon_password is the password that is used to do modify things within your server. Try to make it something better than 'asdf.' sv_password sets the password of your server. This is completely optional, and even unnecessary if you run your server on LAN mode/don't open ports on your router.
    2. Drag your configured server.cfg to csgo/cfg. Say yes to overwriting the existing one.
    3. admins_simple.ini is ONE way of adding admins to a server. I didn't need to attach the file, but it's easier than hunting it right? So, you obviously wanna be admin of your own server right? First, let's find your Steam ID. Copy/Paste your steamurl into steamidfinder. For example, my Steam ID is STEAM_0:0:19858331 [don't use this to ban me from more servers please], and I would write at the bottom of admins_simple.ini like so: [​IMG]
    4. If you're wondering what "99:z" is: 99 is your immunity level. It's your power level in the server. Don't write 9000, just go up to 99. Z is your 'admin flag.' It's basically the level of permissions you have in the server. Z is for root permissions. Only give yourself flag 'z'. Save the file, and drag the configured admins_simple.ini to addons/sourcemod/configs.
    5. Congratulations, you have now setup your server name, and made yourself admin (or maybe some lucky stranger)!
    NOTE:
    1. I am not going to go over how to install maps [.bsp and .nav files] or workshop maps. There are already plenty of guides written on this. If you would like to understand how to use the workshop maps system with KZTimer, click here.
    2. If you have no idea: maps go into csgo/maps folder and workshop maps go into csgo/maps/workshop folder. Simple as that.
     

    Attached Files:

    Last edited: Feb 16, 2016
    FrOzeN, Nthng, futuba and 12 others like this.
  2. JWL

    JWL Climb Cove Programmer KZ Server Owner Mapper

    Joined:
    Aug 3, 2015
    Messages:
    732
    Likes Received:
    256
    Step 5:
    -> Running your KZTimer Server


    1. If you are running your local server locally on another local computer, then you'll want to locally start CS:GO locally first. If you locally start a CS:GO Dedicated Server locally before starting your CS:GO game client locally, it will locally consider the game already running... locally. So yeah, start your game first.
    2. Start SteamCMD GUI back up, except click on the Run Server tab this time with these configuration settings:
      - [Srcds path] -> C:\steamcmd\steamapps\common\Counter-Strike Global Offensive Beta - Dedicated Server
      - [Server Name] doesn't matter b/c you set it in server.cfg
      - [Network] LAN for just you. Internet if you want your friends to be able to join (but you'll need to do some other steps too).
      - [UDP Port] Just leave it at 27015. Occasionally your server will randomly pick a port between 27015-27017. Don't ask me why.
      - [Max Players] I suggest 1. Then again, this setting doesn't seem to work. [​IMG]
    3. Now we're going to set your command line options of the server. To do so, press the '+' by the Run button.
      [​IMG]
      It will pop up with a 'Custom Commands' box: [​IMG]
      Here are some useful command line options. You can add multiple ones by separating them with a space.
      -tickrate 128
      -tickrate 102
      -tickrate 64
      -maxplayers_override
    4. After you have configured your command line options. Press Enter, and the 'Custom Commands' box will go away.
    5. In SteamCMD GUI, go to File -> Save. It'll ask you to save Config.xml. Do it. [​IMG]
      What you just did was save your settings for SteamCMD GUI. When you open SteamCMD GUI back up. Just go to File -> Load, then click on Config.xml, and it will load your settings.
    6. How to set up your 'game server login token.' [now required by Valve]
      1. Get your gameserver token: https://steamcommunity.com/dev/managegameservers
        CS:GO App ID: 730
      2. Put sv_setsteamaccount <token> in autoexec.cfg
    7. [OPTIONAL] I am not going to cover port forwarding in this guide as it's different for every router. However, I am going to give you a list of the ports you'll want to forward if you want other people to be able to join your server.
      UDP: 27005, 27020, 51840
      TCP: 27015-27017 [this is just incase your server randomly changes ports on you]
    8. Congratulations, you have completely setup your server, and you're now ready to press the Run button.
    9. Press the Run button. You should see this: [​IMG]
    10. To find/connect to your server easily. Right click on the Steam icon in your dash tray. Click on Servers, and go to the LAN tab.
      [​IMG]

    Enjoy :)
    hop.

    Updated 1/17/16
    Updated 1/28/16
    Updated 2/16/16
     
    Last edited: Feb 16, 2016
    FrOzeN, Nthng, Heinzelboss and 16 others like this.
  3. Fafnir

    Fafnir SKILLED

    Joined:
    Oct 29, 2015
    Messages:
    56
    Likes Received:
    121
    very well :D i suck in database long time,JWL well done
     
    solip likes this.
  4. pqqqp

    pqqqp CASUAL

    Joined:
    Jun 12, 2015
    Messages:
    73
    Likes Received:
    31
    holy hell this is insane, thanks so much
     
  5. smex

    smex gfyfgt Donor KZ Server Owner Mapper

    Joined:
    Sep 18, 2015
    Messages:
    178
    Likes Received:
    94
    if you get a error when trying to start the server check if you participate on steam beta stuff, for me it crashed the server on start (win7)
     
  6. skodna

    skodna SKILLED Donor

    Joined:
    Jun 5, 2015
    Messages:
    247
    Likes Received:
    132
    if this is working for me...
     
  7. skodna

    skodna SKILLED Donor

    Joined:
    Jun 5, 2015
    Messages:
    247
    Likes Received:
    132
    How can i let a server (wether if its bought from a website/hoster or locally hosted on my PC) run a whole steam workshop list e.g. the approved KZtimer list? :(
     
  8. smex

    smex gfyfgt Donor KZ Server Owner Mapper

    Joined:
    Sep 18, 2015
    Messages:
    178
    Likes Received:
    94
  9. AzaZPPL

    AzaZPPL Moderator KZ Server Owner

    Joined:
    Sep 16, 2015
    Messages:
    74
    Likes Received:
    37
    eww windows
     
  10. skodna

    skodna SKILLED Donor

    Joined:
    Jun 5, 2015
    Messages:
    247
    Likes Received:
    132
    for some reason it launched everything right with the launchcommand, tick and the map kz_dungeon but it has 9 bots which shoot eachother and such.. gg
     
  11. skodna

    skodna SKILLED Donor

    Joined:
    Jun 5, 2015
    Messages:
    247
    Likes Received:
    132
    ITS WORKING
     
  12. skodna

    skodna SKILLED Donor

    Joined:
    Jun 5, 2015
    Messages:
    247
    Likes Received:
    132
    is the only way to get people to join you by enabling the ports over the interface of your router? i cant seem to guess the pw or dunno what it is since my brother bought the internet bac kthen (tried "admin" "password") and default shit, but im pretty sure its a custom one, routers some huawei shit technically but under some big austrian ínternetprovider.. is there any workaround? any pw guesses ? :/
     
  13. smex

    smex gfyfgt Donor KZ Server Owner Mapper

    Joined:
    Sep 18, 2015
    Messages:
    178
    Likes Received:
    94
    google the standart login on the router model, welcome to the internetz
     
  14. skodna

    skodna SKILLED Donor

    Joined:
    Jun 5, 2015
    Messages:
    247
    Likes Received:
    132
    my point is its most likely not the standard login, i couldnt find the exact number of the router either, just previous models or so. and i tried trough endless pws :D
     
  15. pano

    pano www.GSA.gl Donor KZ Server Owner

    Joined:
    Feb 5, 2015
    Messages:
    520
    Likes Received:
    159
    Yes.

    workaround: some VPN shit like Hamachi could/should work
     
  16. OuTRuN

    OuTRuN NEW

    Joined:
    Nov 24, 2015
    Messages:
    1
    Likes Received:
    0
    VERY Nice :D Thanks for the info
     
  17. pano

    pano www.GSA.gl Donor KZ Server Owner

    Joined:
    Feb 5, 2015
    Messages:
    520
    Likes Received:
    159
    Sh3Rm4n likes this.
  18. Nirvana

    Nirvana NEW

    Joined:
    Nov 29, 2015
    Messages:
    5
    Likes Received:
    0
    I've been trying to configure my server to start maps with an mp_freezetime so that I can record demo's without them being all choppy (for some reason if you don't start recording a demo during freezetime it ends up with like 10 fps). I've changed every config file's mp_freezetime value to 60, yet there's still something overriding it to 0.00000 everytime I change maps, is this deeper than the config files and somewhere in the coding of the plugin?
     
  19. JWL

    JWL Climb Cove Programmer KZ Server Owner Mapper

    Joined:
    Aug 3, 2015
    Messages:
    732
    Likes Received:
    256
    Instead of doing that, take these steps to record a fluid demo in any KZTimer server.
    1. Start Recording your Demo
    2. At the end of the demo, instead of stopping it, switch teams a few times (making sure you die at least once)
    3. Type "retry" in console to reconnect to the server. This will also stop your demo.
    4. The demo should be smooth as any other.
     
  20. Nirvana

    Nirvana NEW

    Joined:
    Nov 29, 2015
    Messages:
    5
    Likes Received:
    0
    Ah, that fixes the client lag when playing the demo, but the demo itself still has a lot of jaggedness to it when slowed down a lot, which what I gather from some google searches, is not possible to fix with those POV demos. I was able to get a GOTV demo to work well though by just setting mp_freezetime in-game and then using mp_restartgame to be able to start recording during freezetime without having to change maps. This way I can get a super smooth, super high fps demo even if I slow it down to 1/10th of the speed, which is just what I was looking for =)
     
    Last edited: Nov 30, 2015

Share This Page