Files

> > CS2D > Lua Scripts > VACheck - Check VAC Records
Files overviewCS2D overviewLua Scripts overview

English VACheck - Check VAC Records >

31 comments2 kb, 572 Downloads

old VACheck - Check VAC Records

Talented Doge
User Off Offline

> Introduction
The addition of cs2d lua cmd reqhttp has made this easy thanks to user SQ, so I wrote this to help you in recognizing VAC banned players.

This simple lua script will request data from steam web page. If player has ever been VAC banned, they will not be able to participate in the game.(Can be set in settings)

This script also includes the function to identify the previously distinguished VAC banned players, so as to reduce the network usage of the server.

> Settings
1
2
3
4
5
logdir = "sys/lua/vaclog.txt"
vaclistdir = "sys/lua/vaclist.lua"
logusgn = true
allow_play = false
kick_player = true
logdir
: USGN log directory
vaclistdir
: VAC recognized SteamID list directory
logusgn
: Log VAC banned players' USGN if they have it.
allow_play
: Allow VAC banned players to play?
kick_player
: Kick VAC banned players?

> Note
To ensure that VAC banned players do not evade by simply logging out of steam, I forced them to log in to steam in order to play. DO NOT REMOVE THIS LINE OF CODE OR THEY MAY EVADE THE CHECK.

This script has its limits that if a player is so dedicated to ruin the game, he may join with an entirely new account without VAC record. So manual moderation is always the best choice if possible.

> Updates
Added
kick_player
option, changed
allow_watch
to
allow_play
.

> Issues
Frequent requests seem to make steam ignore the request, looking for a work around.

> License
This content is published under WTFPL 3.0.
edited 14×, last 11.08.18 11:24:41 pm
Approved by SQ

Download Download

2 kb, 572 Downloads

Comments

31 comments
Page
To the start Previous 1 2 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Talented Doge
User Off Offline

@user mrc:
The players must log in to Steam, USGN login is optional for them. If the players do not log in to Steam, they stays as spectators.

old

mrc
User Off Offline

This is what I was looking for? If players are logged in to steam and usgn they can join teams, if not they keep as spectators?
edited 1×, last 15.03.18 07:23:18 pm

old

Talented Doge
User Off Offline

Fixed a minor bug where it will report non-banned users.

old best vac check since SourceMod one

Chucko Kokos
User Off Offline

>uh muh vac checks xd
its like everytime someone codes a vac check i feel like its just same person did someone with vac really hurt you mentally or something? kek
I like it!

old

SQ
Moderator Off Offline

Player player is kicked... Just remove additional "player" and keep it [player name] has been kicked.
I like it!

old

Nekomata
User Off Offline

Good job! Regarding the issue, you may be hitting the rate limiting. It would be excellent if this hook returns HTTP status.
I like it!

old

Talented Doge
User Off Offline

Yes I understand what you say @user SQ, but I'm busy atm. Will do it later. It works now anyway.

old :D

Ice_Wolf
User Off Offline

GOOD job
I like it!
edited 1×, last 06.03.19 09:44:46 pm

old

SQ
Moderator Off Offline

You should do something like this at least:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mystuff = {}

table.insert(mystuff,"a")

for key, value in pairs(mystuff) do
   print("value: "..value)
   table.remove(mystuff, key)
end

local count = 0
for k, v in pairs(mystuff) do
   count = count + 1
end

print("count: ".. count)
I like it!

old

Yates
Reviewer Off Offline

Simonas is talking about this I presume:

1
2
3
4
5
players = {1, 15}

for i = 1, #players do
    print(i)
end

Output:
1
2
1
2

NOT:
1
2
1
15

old

SQ
Moderator Off Offline

@user Talented Doge: I see the flaw in the code, it's not how it should be done though.
rec list doesn't seem to be cleared up as well. It is just being added all the time.
I like it!

old

Talented Doge
User Off Offline

The ID I used is the exact same to the player's ID, I don't understand why that would not work though.

That is why I used req[i][1] to store player's ID. Because even the index of the table move up or whatever, the ID still remains the same.

The table now should look like this:
req = {{1, 1}, {2, 2}, {21, 3}}


Using for loop:
for i = 1, #req
This loops the content(tables) and find the matching special ID assigned by cs2d lua cmd reqhttp
Then the first data(player ID) is used to kick/warn whatever.

old

SQ
Moderator Off Offline

@user Talented Doge: You still does not understand that your script won't work if 2 players joins with id's 2 and 31 for example.

Change "#req" use into table.insert and foreach loop.
I like it!

old

Talented Doge
User Off Offline

Now I added an option for server owners to choose whether to kick or just warn of the VAC record.

And yes you can always evade a ban by registering another account, IP and name. I am just trying my best to help keeping cheaters at bay for CS2D.

old

VADemon
User Off Offline

Also the script is indifferent to VAC Ban time.
Would you still regard someone with 2100 days old VAC Ban as a cheater? Calculate the years yourself.
Not to mention that you can 1) register another Steam Account 2) Register USGN as user Chingy implied.

old

Chingy
User Off Offline

@user Gaios: I do. People make mistakes, they're supposed to learn out of them. That's the reason also why a VAC ban doesn't affect every game.

The idea behind this is understandable. But if someone has no VAC on record, it won't stop them from cheating. Since you don't get sent to VACation in CS2D it's quite ineffective. Someone might also have a verified alternative account (which is a way to outplay this script).

old

SQ
Moderator Off Offline

Change that
1
for i = 1, #req do

Into foreach and use table.add for requests.
I like it!

old

Yates
Reviewer Off Offline

Noo it's a .txt file uughh *dies inside*

.txt is slow, just convert it to a Lua table (string) then save it in a .lua file and
dofile()
it.

10/10

old

Talented Doge
User Off Offline

Definitely , I am extremely lazy to go through a single text file and search for strings.

Edit: I tried my best while being lazy, adding the function of "already exists". Trim it for me if you would like it. I will appreciate that.
edited 1×, last 04.12.17 04:41:35 pm

old

Gaios
Reviewer Off Offline

Better to save it to variable array lol.
I like it!
To the start Previous 1 2 Next To the start