Vac ban system.

Ok guys, So I’d like to make a system that detects if someone has a vac ban, then disconnects them on initialize.

function GM:Initialize()
    If player has a vac ban --I know, not real code.
      print("Go away, you failed.")
      Print ("Account Verified.")

I know this might be dumb, but please if anyone knows a way, let me know, thanks!

Don’t run this stuff clientside, they can cheat this. The general rule is “never trust clients”.
You should make this script serverside; and use playerauth or playerconnect hook, instead.

Just because someone has a vac ban, doesn’t mean they should not be allowed in your server. What if someone got banned falsely? I know, they may have hacked in the past but they’d be stupid to do it again.

Can I ask why? Being banned for cheating in different games (and probably a long time ago) shouldn’t affect how they play GMod. I know it doesn’t reflect well but the last ban could’ve been six years ago.

I’m in total agreement with everyone else who posted in this thread, but it’s not a reason to deny him access to the information.

Using GSAPI you can get most of the information about a player from Steam servers, including Community bans and VAC Bans.

Like everyone else has said though, there’s a reason VAC works the way it does.

A hacker is a hacker, I don’t care if it was their older brother or their account was hacked. The account has been used for malicous activity, VAC bans should be permanent, for 1. you hacked 2. you’re friend did, or 3. You’re stupid enough to make your password “password”
They should go get a life after they get banned for using hacks, every hacker on my server has been vac banned.

VAC is permanent. I know few people who are older than 13 year olds, who cheated about a 5 years ago when they were young. Now, they absolutely hate hacking. Stop generalizing those kids that joined your server with an aimbot, and get a decent anti cheat instead.

Except, you know, for the fact that VAC doesn’t detect Lua scripts. It’s been disputed if VAC is even “enabled” on Garry’s mod.

I didn’t say VAC banned, “They should go get a life after they get banned for using hacks”
I meant off of a server, but then they go to rust and hack or some other shit game. I do have Anti Hacks, but every ten days a new hack comes out for these little skids to go on servers (with their vac ban ) and aim/speed hack, so I would like for them to be eliminated from the server before they turn on their hacks.

I won’t drag this conversation out any longer since you’re pretty dead set on generalizing all people who have VAC bans, but if you do plan on implementing a system like this, at least check the days since their last ban. There are some people who have over two and a half years since their last VAC ban, and you’d be blindly denying them access to the server.

this solves nothing because most people who actually like to cheat just make alts and do it that way, so you’d be putting up a barrier of false trust.

As I’ve stated, on this topic: A hacker is a hacker. It doesn’t matter if it was 2 years ago, they still did it.
“Yes judge, I murdered this man, but, but it was 15 years ago! Come onnnnnnn.”

You just compared hacking with murder. :v:

I think that says everything that needs to be said. The coding resources have been provided to you. Do what you must.

Metaphorical situations make for a good eye opener for narrow minded people as yourselves.

I don’t know where you get that hacking is comparable to murder.

Metaphorical situations make for a good eye opener for narrow minded people as yourselves.

Here’s a metaphor for you: You’re treating people with VAC bans like Hitler treated the jews.

I hope that was an eye-opening look at wildly-inappropriate comparisons.

I have two vac bans. Please tell me how much of a bad person I am.

That’s a simile.

-that’s me in the spotlight, losing my religion-