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

[L4D2] Anti-Wallhack Simple Idea


Post New Thread Reply   
 
Thread Tools Display Modes
SilentBr
Veteran Member
Join Date: Jan 2009
Old 12-24-2017 , 13:54   Re: [L4D2] Anti-Wallhack Simple Idea
Reply With Quote #11

Quote:
Originally Posted by cravenge View Post
That command is for turning his teammates invisible, one of his requests.

Btw, I updated the code to include those teammates to have no sounds emitted.
I thought that only me as the invisible-nosound zombie is the best. I will start recording my gameplay and change my nickname (before join)... 3 times the same player kills me far away, and the opposite way they are going, I'm pretty sure he is using something. So I will ban and ask him to go to my forum and explain why he killed me.

I don't want any in my server know that this plugin is installed. So, I don't want to give any player the invisble and nosound effects.

I'm confused, how I turn me into an invisible-nosound infected. Is there a command? I don't want be all the time. Only when I think there is a wallhacker.

EDIT: When I said "+ maybe is possible to be also invisible for teammates;"
I meant that root admin will be insible to everyone, even the teammates will not see , and will not know that you are alive.

I think the way I've said was not clear enough. Sorry.

Last edited by SilentBr; 12-24-2017 at 14:06.
SilentBr is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 12-24-2017 , 21:51   Re: [L4D2] Anti-Wallhack Simple Idea
Reply With Quote #12

Quote:
Originally Posted by SilentBr View Post
[...]
Thanks for the clarification, SilentBr.

One thing I have to say about your killer, though, it's obvious he/she's using aimbot, an addon which provides that cheat, or a script that he/she can run in client side.

My suggestions:
  1. Install latest version of SMAC aimbot and spinhack detectors, taking out hypothesis no. 1.
  2. If you're using Left 4 Downtown 2 extension, prevent clients from using addons with the Server Addons Disabler function (included in the latest version provided by Accelerator or Spirit with the convar "l4d_addons_eclipse") which takes out hypothesis no. 2.
  3. Temporarily ban that client from your servers, which is the best solution in taking out all the hypotheses and once it is confirmed that he/she is using 3PP/Illegal Hack program, make that ban permanent.
cravenge is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 12-24-2017 , 22:26   Re: [L4D2] Anti-Wallhack Simple Idea
Reply With Quote #13

Okay, I've corrected the code to your liking. You might want to take a look at it.
cravenge is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 12-25-2017 , 08:06   Re: [L4D2] Anti-Wallhack Simple Idea
Reply With Quote #14

Quote:
Originally Posted by cravenge View Post
Okay, I've corrected the code to your liking. You might want to take a look at it.
I'm looking at your current code and I don't see where you've defined IsSurvivor and OnCDCVarChanged, and that's why it can't compile.
__________________

Last edited by Psyk0tik; 12-25-2017 at 08:06.
Psyk0tik is offline
SilentBr
Veteran Member
Join Date: Jan 2009
Old 01-11-2018 , 14:13   Re: [L4D2] Anti-Wallhack Simple Idea
Reply With Quote #15

Quote:
Originally Posted by cravenge View Post
Okay, I've corrected the code to your liking. You might want to take a look at it.
Hello cravenge

Sorry the dealy, I was on vacation. Happy new year!!!

Ok, so I understand to become an invisible-nosound zombie you shout type sm_cd_team, is that right?

By the way, it is not compiling.

Quote:
/groups/sourcemod/upload_tmp/textDKTMON.sp(24) : error 017: undefined symbol "OnCDCVarChanged"
/groups/sourcemod/upload_tmp/textDKTMON.sp(29) : error 100: function prototypes do not match
/groups/sourcemod/upload_tmp/textDKTMON.sp(114) : error 017: undefined symbol "OnCDCVarChanged"
/groups/sourcemod/upload_tmp/textDKTMON.sp(120) : error 100: function prototypes do not match
/groups/sourcemod/upload_tmp/textDKTMON.sp(18 : warning 213: tag mismatch
SilentBr is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 01-11-2018 , 17:22   Re: [L4D2] Anti-Wallhack Simple Idea
Reply With Quote #16

Quote:
Originally Posted by cravenge View Post
Thanks for the clarification, SilentBr.

One thing I have to say about your killer, though, it's obvious he/she's using aimbot, an addon which provides that cheat, or a script that he/she can run in client side.
  1. If you're using Left 4 Downtown 2 extension, prevent clients from using addons with the Server Addons Disabler function (included in the latest version provided by Accelerator or Spirit with the convar "l4d_addons_eclipse") which takes out hypothesis

You don't need downtown to disable peoples addons
you can just use whitelisting

/left4dead2/whitelist.cfg

you can disable all addons with a few letters or you can disable specific addons if you put the full path.
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
midnight9
Senior Member
Join Date: Nov 2012
Old 01-13-2018 , 09:45   Re: [L4D2] Anti-Wallhack Simple Idea
Reply With Quote #17

Quote:
Originally Posted by Lux View Post
You don't need downtown to disable peoples addons
you can just use whitelisting

/left4dead2/whitelist.cfg

you can disable all addons with a few letters or you can disable specific addons if you put the full path.
I've never tried doing it that way, but there is dedicated config file to allow/disallow addons: cfg/addonconfig.cfg
midnight9 is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 01-13-2018 , 17:13   Re: [L4D2] Anti-Wallhack Simple Idea
Reply With Quote #18

Quote:
Originally Posted by SilentBr View Post
Hello cravenge

Sorry the dealy, I was on vacation. Happy new year!!!

Ok, so I understand to become an invisible-nosound zombie you shout type sm_cd_team, is that right?

By the way, it is not compiling.
Try this one.

PHP Code:
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>
#pragma semicolon 1
#pragma newdecls required

ConVar cvPlayToSelf;
bool bCloaked[MAXPLAYERS+1];
bool bPlayToSelf;

public 
Plugin myinfo =
{
    
name "Cheater Detector",
    
author "cravenge (requested by SilentBr)",
    
description "Lets root admins be able to detect cheaters.",
    
version "1.2",
    
url "https://forums.alliedmods.net/forumdisplay.php?f=108"
}

public 
void OnPluginStart()
{
    
RegAdminCmd("sm_cdetect"OnCDCmdADMFLAG_ROOT"Apply cloaking function");
    
CreateConVar("cheater_detector_version""1.2""Cheater Detector Version"FCVAR_NOTIFY);
    
cvPlayToSelf CreateConVar("cd_play_to_self""0""Play own sounds to yourself?");
    
cvPlayToSelf.AddChangeHook(OnCDCVarChanged);
    
HookEvent("player_death"OnPlayerDeathEventHookMode_Pre);
    
AddAmbientSoundHook(OnAdminASCheck);
    
AddNormalSoundHook(OnAdminNSCheck);
    
AutoExecConfig(true"cheater_detector");
}

public 
void OnCDCVarChanged(Handle convar, const char[] oldValue, const char[] newValue)
{
    
bPlayToSelf cvPlayToSelf.BoolValue;
}

public 
Action OnCDCmd(int clientint args)
{
    if(
client == || !IsClientInGame(client) || GetClientTeam(client) != || !IsPlayerAlive(client))
    {
        return 
Plugin_Handled;
    }

    if(
bCloaked[client])
    {
        
SDKUnhook(clientSDKHook_SetTransmitOnSetTransmit);
        
SetEntityRenderMode(clientRENDER_NORMAL);
        
SetEntityRenderColor(client___255);
        
bCloaked[client] = false;
    }

    else
    {
        
bCloaked[client] = true;
        
SetEntityRenderMode(clientRENDER_TRANSALPHA);
        
SetEntityRenderColor(client___0);
        
SDKHook(clientSDKHook_SetTransmitOnSetTransmit);
    }

    return 
Plugin_Handled;
}

public 
Action OnSetTransmit(int entityint other)
{
    if(
bIsRootAdmin(other))
    {
        return 
Plugin_Continue;
    }

    return 
Plugin_Handled;
}

public 
Action OnAdminASCheck(char sample[PLATFORM_MAX_PATH], int &entityfloat &volumeint &levelint &pitchfloat pos[3], int &flagsfloat &delay)
{
    if(!
bIsInfected(entity) || !bIsRootAdmin(entity) || !bCloaked[entity])
    {
        return 
Plugin_Continue;
    }

    return 
Plugin_Stop;
}

public 
Action OnAdminNSCheck(int clients[MAXPLAYERS], int &numClientschar sample[PLATFORM_MAX_PATH], int &entityint &channelfloat &volumeint &levelint &pitchint &flagschar soundEntry[PLATFORM_MAX_PATH], int &seed)
{
    if(!
bIsInfected(entity) || !bIsRootAdmin(entity) || !bCloaked[entity])
    {
        return 
Plugin_Continue;
    }

    if(!
bPlayToSelf)
    {
        return 
Plugin_Stop;
    }

    
numClients 0;
    for(
int i 1<= MaxClientsi++)
    {
        if(
IsClientInGame(i) && GetClientTeam(i) == && bIsRootAdmin(i) && == entity)
        {
            
clients[numClients] = i;
            
numClients++;
        }
    }

    return 
Plugin_Changed;
}

public 
void OnPluginEnd()
{
    
cvPlayToSelf.RemoveChangeHook(OnCDCVarChanged);
    
delete cvPlayToSelf;
    
UnhookEvent("player_death"OnPlayerDeathEventHookMode_Pre);
    
RemoveAmbientSoundHook(OnAdminASCheck);
    
RemoveNormalSoundHook(OnAdminNSCheck);
}

public 
void OnClientDisconnect(int client)
{
    if(!
bIsRootAdmin(client) || !bCloaked[client])
    {
        return;
    }

    
bCloaked[client] = false;
    
SDKUnhook(clientSDKHook_SetTransmitOnSetTransmit);
}

public 
Action OnPlayerDeath(Event event, const char[] namebool dontBroadcast)
{
    
int idied GetClientOfUserId(event.GetInt("userid"));
    
int ikiller GetClientOfUserId(event.GetInt("attacker"));
    if(
bIsInfected(idied) && bIsRootAdmin(idied) && bCloaked[idied] && bIsSurvivor(ikiller))
    {
        
bCloaked[idied] = false;
        
SDKUnhook(idiedSDKHook_SetTransmitOnSetTransmit);
        
SetEntityRenderMode(idiedRENDER_NORMAL);
        
SetEntityRenderColor(idied___255);
        
PrintToChat(idied"\x05[\x03CD\x05]\x04 %N\x01 killed you while you were cloaked!"ikiller);
    }

    return 
Plugin_Continue;
}

public 
void OnMapEnd()
{
    for(
int i 1<= MaxClientsi++)
    {
        if(
IsClientInGame(i) && bCloaked[i])
        {
            
bCloaked[i] = false;
            
SDKUnhook(iSDKHook_SetTransmitOnSetTransmit);
        }
    }
}

bool bIsSurvivor(int client)
{
    return (
client && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && GetClientTeam(client) == 2);
}

bool bIsInfected(int client)
{
    return (
client && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && GetClientTeam(client) == 3);
}

bool bIsRootAdmin(int client)
{
    return (
CheckCommandAccess(client"sm_cdetect"ADMFLAG_ROOTfalse));

Attached Files
File Type: sp Get Plugin or Get Source (cheater_detector.sp - 231 views - 4.4 KB)
__________________
Psyk0tik is offline
SilentBr
Veteran Member
Join Date: Jan 2009
Old 05-08-2018 , 13:26   Re: [L4D2] Anti-Wallhack Simple Idea
Reply With Quote #19

Quote:
Originally Posted by Crasher_3637 View Post
Try this one.
This was everything that I needed to identify some wallhackers on my versus server. It is working like a charm. Even my teammates are not able to see me.

In my opinion, this plugin should be released/official L4D2.

I've tried stop wallhackers blocking addons, SMAC Anti Wallhack (sound problem) without success.

I want to say thanks to cravenge and Crasher_3637 for helping me with this plugin idea.

PS: Sorry about the loooong delay to reply, I'm already using this on my server and loving it.
SilentBr is offline
Reply


Thread Tools
Display Modes

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 04:27.


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