Author Topic: CS:S Installation Checker  (Read 6680 times)

0 Members and 3 Guests are viewing this topic.

Offline Luk | twitch.tv/doctorluk

  • Newbie
  • *
  • Posts: 40
  • Karma: 12
CS:S Installation Checker
« on: July 10, 2016, 02:40:08 AM »
ULX Counter-Strike: Source Installation Checker

Plugin Description
This plugin checks whether a player has installed CS:S. This is especially useful when you run a server that runs maps and other content that require CS:S to be installed. In TTT, players can ruin a Traitor's round if they disconnect right after seeing they can't play because they can't see anything.

Installation
1. Download the plugin here: https://github.com/doctorluk/ULX-CSS-Checker
2. Unzip the file
3. Upload the folder cs_resource_check into your garrysmod\addons folder

Configuration
All configuration options can be found at cs_resource_check\lua\autorun\server\sv_cs_config.lua and every line is documented.


I don't have much experience with GMod's Lua and if you have any suggestions to improve the plugin, don't hesitate to tell me!

My other plugins: TTT Role Announcer, ULX Age Verificator, Karma Betting for TTT
« Last Edit: October 15, 2016, 05:22:24 PM by Luk | twitch.tv/doctorluk »
Host of Spielwiese der Erwachsenen, a German TTT Server for adults only.

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: CS:S Installation Checker
« Reply #1 on: July 10, 2016, 06:45:03 AM »
I created a pull request on the GitHub repo. The gist of it is that net.Receive's callback function is passed a second argument serverside: the player who sent the net message. This means you don't need to send the player's SteamID in the net message, as the player is already included in the net message.

Feel free to ask any questions (here or on the pull request itself).
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline Luk | twitch.tv/doctorluk

  • Newbie
  • *
  • Posts: 40
  • Karma: 12
Re: CS:S Installation Checker
« Reply #2 on: July 10, 2016, 07:19:46 AM »
Thank you very much for the quick suggestions. I've been assembling the code by just copying code examples. I understand what they do, but some stuff is just omitted or requires quite the amount of time to read.

This is the reason I've not (really) advertised my Age Verification addon here since I bet that there is some stuff that is edgy.

Again, very appreciated!
Host of Spielwiese der Erwachsenen, a German TTT Server for adults only.

Offline Undercover Orange

  • Full Member
  • ***
  • Posts: 139
  • Karma: -14
  • Leader of Undercover Gaming Community
Re: CS:S Installation Checker
« Reply #3 on: August 28, 2016, 06:45:02 PM »
does this addon also see if you installed textures for http://kajar9.wix.com/cscheater2#!downloads/chgd (textures are put in the addons folder all together) Reason I ask is cause I know a lot of people who use this method (including myself)
~ Undercover Orange

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: CS:S Installation Checker
« Reply #4 on: August 31, 2016, 09:37:18 PM »
does this addon also see if you installed textures for http://kajar9.wix.com/cscheater2#!downloads/chgd (textures are put in the addons folder all together) Reason I ask is cause I know a lot of people who use this method (including myself)

According to what I read here: https://github.com/doctorluk/ULX-CSS-Checker/blob/master/cs_resource_check/lua/autorun/server/sv_cs_content_check.lua it looks like it checks to see if CSS is mounted. If CSS is not mounted, then it checks a generic list of textures/models (https://github.com/doctorluk/ULX-CSS-Checker/blob/master/cs_resource_check/lua/autorun/server/sv_cs_filelist.lua), which at the moment only checks 15 files by default and checks to see if they exist on the clients PC. If all 15 checkout, then it gives the green light, if one of those files is missing, then it kicks the player.

So to answer your question, if you were stealing/borrowing/cheating for CSS, and all the files were in the correct location, then this program would be okay with you.

- - -

Not dissing your addon, but in my opinion, people should have freaking Counter Strike Source by now. It's been on sale like thousands of times, pretty much free at this point. A lot of addons require to use it, so not having it by this day and age is just stupid. People shouldn't be allowed to buy garry's mod without having counter strike source.
« Last Edit: August 31, 2016, 09:45:30 PM by Bite That Apple »
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Undercover Orange

  • Full Member
  • ***
  • Posts: 139
  • Karma: -14
  • Leader of Undercover Gaming Community
Re: CS:S Installation Checker
« Reply #5 on: September 01, 2016, 01:37:53 PM »
Not dissing your addon, but in my opinion, people should have freaking Counter Strike Source by now. It's been on sale like thousands of times, pretty much free at this point. A lot of addons require to use it, so not having it by this day and age is just stupid. People shouldn't be allowed to buy garry's mod without having counter strike source.

The only reason I don't have it is cause every cent I make goes towards my server, and also cause there is no point in me downloading the full game if I'm never going to play it. The only things I have are the textures. I dont even have the maps.
~ Undercover Orange

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: CS:S Installation Checker
« Reply #6 on: September 01, 2016, 04:07:15 PM »
The only reason I don't have it is cause every cent I make goes towards my server, and also cause there is no point in me downloading the full game if I'm never going to play it. The only things I have are the textures. I dont even have the maps.

I don't play it either


Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Undercover Orange

  • Full Member
  • ***
  • Posts: 139
  • Karma: -14
  • Leader of Undercover Gaming Community
Re: CS:S Installation Checker
« Reply #7 on: September 01, 2016, 07:54:36 PM »
I don't play it either




the full game takes up 3 or 4 times the amount of space these files take and again (but in a more layed out way of saying it) im broke.
~ Undercover Orange

Offline Luk | twitch.tv/doctorluk

  • Newbie
  • *
  • Posts: 40
  • Karma: 12
Re: CS:S Installation Checker
« Reply #8 on: October 15, 2016, 05:21:44 PM »
Sorry for the late reply. As Bite That Apple said, we first check for mounted CS:S and if that fails, we send 15 random filenames from a full list of all files there are in a fresh Steam CS:S installation.
Host of Spielwiese der Erwachsenen, a German TTT Server for adults only.