Forum Thread
  Posts  
CSGO: VScript Question (Forums : Coding & Scripting : CSGO: VScript Question) Locked
Thread Options
Jun 7 2018 Anchor

Hey All,

I am wanting to build a ranking system into my map. It only has to be very simple (not SQL-based) and I figure the best way to do this is as follows:

  1. When the player joins the server for the first time their Steam ID is appended to a .txt or .csv file on the server (if this file does not exist, the .nut script will create it). The format of this file would be steamid | kills | deaths | points. Each user should start with 1,000 points. For every kill the player gets, 5 points would be added to their to this total. For every death, 5 points would be deducted.
  2. When the user joins the server (every time, including the first time) the server should send a welcome message. This message would change depending on how many points the player has (i.e. if the player has between 0 - 999 points the server might say 'hi there' and if the player has between 1000 - 1999 points the server might say 'hello big boy').
  3. As the user plays the file is updated to track the number of kills / deaths / points.
  4. When a user types !stats it should report back the users total points and kill death ratio (obviously calculated by kills divided by deaths).

Now... the issues I am having:

  1. I have absolutely no idea if this is possible.
  2. I have absolutely no idea where to start.

As such, I have come here in the hope that someone far smarter than me can offer some advice on how to get started (if this is indeed possible) and maybe even give me a helping hand. That said, I would like to follow along with you so I learn what you are doing step-by-step. I would be willing to pay you for the time.

Really just looking to learn. The best way I do this is to see it done once and then repeat it a million times until I get it perfect. Any kind person willing to help me with this will be well compensated.

Cheers!

P.S. I have also posted this over at Gamebanana in the hopes of accessing the combined talents of both sites. I thought I would state this now so that anyone who has seen both threads won't think I am just a spammer. Most certainly looking to learn how to build the above :)

Nightshade
Nightshade Senior Technical Artist
Jun 17 2018 Anchor

I have no idea what the CSGO API looks like but something tells me that this has already been done before, no? There were server ranking systems up when I started playing Counter-Strike some 18 years ago after all.

Also, why are you stuck on the idea of not using a database? You talk about having a text file on the server instead. Well that is exactly what a database is: just text (ordered in tables, rows, columns - often encrypted so you can't tamper with it). SQL is very human-readable and setting up a database is piece of cake nowadays with all the database apps around (that has GUI's).

If you are not going to use a database (if it's even possible to omit that part in VScript) then you are probably going to have to write your own CSV-parser in that script language (which isn't hard but it's extra work for you).

Edited by: Nightshade

--

Senior Technical Artist @ Massive - a Ubisoft studio
Portfolio | LinkedIn

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.