Skip to content

Commit 4273c7a

Browse files
authored
feat(ze_collective_css): block AC detection for Hackerman Item (#14)
- This fix is disabled by default, for now only lilac detect this item as cheat and their no plan to enabled it on master. - This is a band aid, the root cause is the vscript of the map itself but mapper don't want to change anything.
1 parent fafa590 commit 4273c7a

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

addons/sourcemod/scripting/FixMapsFiles.sp

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,29 @@
44
#include <sourcemod>
55
#include <sdktools>
66

7+
// Uncomment to enable lilac fix for ze_collective_css
8+
//#define ENABLE_COLLECTIVE_MODULE
9+
10+
#if defined ENABLE_COLLECTIVE_MODULE
11+
bool g_bCollective = false;
12+
#include "modules/ze_collective"
13+
#endif
14+
715
public Plugin myinfo =
816
{
917
name = "Maps files fixer",
1018
author = ".Rushaway",
1119
description = "Downloads fixed files for multiples map",
12-
version = "1.1.0",
20+
version = "1.2.0",
1321
url = ""
1422
};
1523

1624
public void OnMapStart()
1725
{
26+
#if defined ENABLE_COLLECTIVE_MODULE
27+
g_bCollective = false;
28+
#endif
29+
1830
char sCurrentMap[256];
1931
GetCurrentMap(sCurrentMap, sizeof(sCurrentMap));
2032
if (strcmp(sCurrentMap, "ze_paranoid_rezurrection_v11_9", false) == 0)
@@ -32,6 +44,12 @@ public void OnMapStart()
3244
{
3345
ApplyGargantuaFix();
3446
}
47+
#if defined ENABLE_COLLECTIVE_MODULE
48+
else if (strncmp(sCurrentMap, "ze_collective_css", 17, false) == 0)
49+
{
50+
g_bCollective = true;
51+
}
52+
#endif
3553
}
3654

3755
stock void ApplyParanoidFix()
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#tryinclude <lilac>
2+
3+
#if defined _lilac_included
4+
// Hackerman Item on ze_collective_css can trigger detection, block the detection for this item only
5+
public bool lilac_allow_cheat_detection(int client, int cheat)
6+
{
7+
if (!g_bCollective)
8+
return false;
9+
10+
if (cheat == CHEAT_AIMBOT)
11+
{
12+
int weapon = GetPlayerWeaponSlot(client, 1);
13+
if (weapon == -1)
14+
return false;
15+
16+
if (GetEntProp(weapon, Prop_Data, "m_iHammerID") == 11111017)
17+
{
18+
LogAction(-1, -1, "Blocked cheat detection (Aimbot) for client %L on ze_collective_css for Hackerman Item", client);
19+
return true;
20+
}
21+
}
22+
23+
return false;
24+
}
25+
#endif

0 commit comments

Comments
 (0)