AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [CS:GO] Ban By VAC (https://forums.alliedmods.net/showthread.php?t=309029)

adska 07-11-2018 02:20

[CS:GO] Ban By VAC
 
Hello, is it possible to catch an event when player on server is being banned by VAC? :roll:

Facksy 07-11-2018 04:51

Re: [CS:GO] Ban By VAC
 
Lel, I dont think so, what do you want to do?

Neuro Toxin 07-11-2018 05:18

Re: [CS:GO] Ban By VAC
 
I use a cookie system to track computers. So when an account becomes VACd all the other accounts with the same tracking cookie are banned.

Ilusion9 07-11-2018 13:15

Re: [CS:GO] Ban By VAC
 
Hook player_disconnect event and check the reason

PHP Code:


event
.GetString("reason"reasonsizeof(reason); 


midnight9 07-11-2018 16:15

Re: [CS:GO] Ban By VAC
 
Quote:

Originally Posted by Neuro Toxin (Post 2602870)
I use a cookie system to track computers. So when an account becomes VACd all the other accounts with the same tracking cookie are banned.

How exactly does it work?

Neuro Toxin 07-11-2018 19:15

Re: [CS:GO] Ban By VAC
 
Using the HTML MOTD. Use PHP to insert a tracking cookie.

adska 07-12-2018 04:52

Re: [CS:GO] Ban By VAC
 
Quote:

Originally Posted by Facksy (Post 2602866)
Lel, I dont think so, what do you want to do?

I want to do if player is banned by VAC then his account on my web would be frozen and he would not be able to do several actions.

Quote:

Originally Posted by Ilusion9 (Post 2602985)
Hook player_disconnect event and check the reason

PHP Code:


event
.GetString("reason"reasonsizeof(reason); 


It is a good idea, but what exactly should I check in that string?

mug1wara 07-12-2018 08:13

Re: [CS:GO] Ban By VAC
 
I don't understand why, but here you go

PHP Code:

#include <sourcemod>

public void OnPluginStart()
{
    
HookEvent("player_disconnect"Event_Disconnect);
}

public 
Action Event_Disconnect(Event hEvent, const char[] sNamebool bDontBroadcast)
{
    
char sReason[256];
    
    
GetEventString(hEvent"reason"sReasonsizeof(sReason));
    
    if (
StrEqual(sReason"VAC")) /* "VAC" is just an example, I don't know how it looks like while getting vac banned */
    
{
        
/* Do something here */
    
}



shavit 07-12-2018 09:05

Re: [CS:GO] Ban By VAC
 
iirc the message is "VAC banned from secure server"

Drixevel 07-12-2018 10:05

Re: [CS:GO] Ban By VAC
 
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.


All times are GMT -4. The time now is 15:45.

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