Raised This Month: $32 Target: $400
 8% 

[CS:GO] Ban By VAC


Post New Thread Reply   
 
Thread Tools Display Modes
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-12-2018 , 10:25   Re: [CS:GO] Ban By VAC
Reply With Quote #11

Should've used StrContains, also:

if (StrContains(sReason, "VAC", false) != -1)
mug1wara is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-12-2018 , 16:34   Re: [CS:GO] Ban By VAC
Reply With Quote #12

hmmm. It was long time I had this kind plugin.
And I remember something that there is tiny differences with VAC message between windows and linux server...
I'm not 100% sure.

But last time I used this
*edit
And this works only when event player_disconnect happen. (VAC banned player try join in server or have been kicked by server.)

PHP Code:
if(StrEqual(reason"VAC banned from secure server\n"true)) 

Last edited by Bacardi; 07-13-2018 at 00:46.
Bacardi is offline
adska
Junior Member
Join Date: Jul 2018
Old 07-13-2018 , 02:40   Re: [CS:GO] Ban By VAC
Reply With Quote #13

Thanks all for solution
adska is offline
TheWhitesmith
Senior Member
Join Date: Oct 2017
Location: Morocco :c
Old 07-14-2018 , 16:19   Re: [CS:GO] Ban By VAC
Reply With Quote #14

Quote:
Originally Posted by Drixevel View Post
PHP Code:
#include <sourcemod> 

public void OnPluginStart() 

    
HookEvent("player_disconnect"Event_Disconnect); 


public 
void Event_Disconnect(Event event, const char[] namebool dontBroadcast

    
char sReason[256]; 
    
event.GetString("reason"sReasonsizeof(sReason)); 
     
    if (
StrContains(sReason"VAC") != -1)
    { 
        
//action
    


This makes more sense.
This is very wrong, people may get kicked by VAC but they aren't really VAC Banned.
Example: "Disconnect: VAC authentication error" (when you open Cheat Engine or Process Hacker 2 while playing on VAC-Protected server)
__________________
TheWhitesmith is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 07-14-2018 , 16:32   Re: [CS:GO] Ban By VAC
Reply With Quote #15

Quote:
Originally Posted by TheWhitesmith View Post
This is very wrong, people may get kicked by VAC but they aren't really VAC Banned.
Example: "Disconnect: VAC authentication error" (when you open Cheat Engine or Process Hacker 2 while playing on VAC-Protected server)
"Very wrong" might be an overreach but I see your point.
Drixevel is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 07-15-2018 , 02:04   Re: [CS:GO] Ban By VAC
Reply With Quote #16

Quote:
Originally Posted by Drixevel View Post
"Very wrong" might be an overreach but I see your point.
he's right about it being "very wrong". strequal should be used when the same word re-appears in different kick messages.

Last edited by Visual77; 07-15-2018 at 02:06.
Visual77 is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 07-15-2018 , 02:49   Re: [CS:GO] Ban By VAC
Reply With Quote #17

Quote:
Originally Posted by Visual77 View Post
he's right about it being "very wrong". strequal should be used when the same word re-appears in different kick messages.
Not exactly, he's still technically correct. it just requires more checks to work as intended. Just combined it with "StrContains" check for not containing "authentication" and other phrases associated with false VAC related disconnection issues.
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 07-15-2018 , 07:08   Re: [CS:GO] Ban By VAC
Reply With Quote #18

Quote:
Originally Posted by 1337norway View Post
Just combined it with "StrContains" check for not containing "authentication" and other phrases associated with false VAC related disconnection issues.
Sounds very lousy, when you have the option do it "properly" like shown in Bacardi's example in Post #12.

The least you can do when making plugins, is try to do them right.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 07-15-2018 , 07:32   Re: [CS:GO] Ban By VAC
Reply With Quote #19

Quote:
Originally Posted by arne1288 View Post
Sounds very lousy, when you have the option do it "properly" like shown in Bacardi's example in Post #12.

The least you can do when making plugins, is try to do them right.
I wouldn't say it's "lousy" as that method Bacardi posted would break easily if the message string was slightly changed in the future. The dynamic way (my suggestion) would be more appropriate for the long term. It's ignorant to believe there's a "proper" way when it comes to something as contrasted as programming.
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 07-15-2018 , 07:42   Re: [CS:GO] Ban By VAC
Reply With Quote #20

Quote:
Originally Posted by 1337norway View Post
I wouldn't say it's "lousy" as that method Bacardi posted would break easily if the message string was slightly changed in the future. The dynamic way (my suggestion) would be more appropriate for the long term. It's ignorant to believe there's a "proper" way when it comes to something as contrasted as programming.
Cutting corners and claiming to be "future proof", especially when you never know what happens in the future, and when it will lead to false positives; that is clearly "lousy".

The ignorant way, to take your word, would be check multiple StrEqual/StrContains, when you have the option right now to do it right and use one single, that wouldn't cause a single false positive.

You have some options and things available right now, those are the only things you can depend on at the time being. If things change in the future, you should adjust things at that time in the future.

A "Ban By VAC", to quote the title, is related to when a user is VAC banned, and NOT when there are anything else related to the VAC system, that isn't the exact ban.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].

Last edited by DarkDeviL; 07-15-2018 at 07:46.
DarkDeviL is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode