Skip to content

Commit

Permalink
Updated to 0.8.6.3
Browse files Browse the repository at this point in the history
Signed-off-by: Mr.Silence <Silenci0@users.noreply.github.com>
  • Loading branch information
Silenci0 committed Jan 24, 2019
1 parent 8375a0b commit 3bb7675
Show file tree
Hide file tree
Showing 23 changed files with 70 additions and 44 deletions.
25 changes: 25 additions & 0 deletions README.md
Expand Up @@ -3,9 +3,34 @@ Sourcemod Anti-Cheat


For a lot of people, SMAC has been one of those more elusive plugins due to some of the issues surrounding it involving copyrights and headers. In 0.8.6.0, the original authors added the headers to it and left it at that. During that time, I was working on my own fork of it specifically for ZPS. So not only does the code have all the appropriate headers, but included is a license with those headers as well, so it should be okay to distribute, post, branch, and fork once again as needed provided everyone adheres to the license. For a lot of people, SMAC has been one of those more elusive plugins due to some of the issues surrounding it involving copyrights and headers. In 0.8.6.0, the original authors added the headers to it and left it at that. During that time, I was working on my own fork of it specifically for ZPS. So not only does the code have all the appropriate headers, but included is a license with those headers as well, so it should be okay to distribute, post, branch, and fork once again as needed provided everyone adheres to the license.


Although progress is a bit slow, I do hope to add more features and update detections for various aimbots/hacks over the next few iterations. My hope is to return SMAC to active development as a free, open source project for multiple source-based games. Not sure how well that will go, but I'll give it a shot.

For information about the plugin and its modules, please use the wiki here: https://github.com/Silenci0/SMAC/wiki For information about the plugin and its modules, please use the wiki here: https://github.com/Silenci0/SMAC/wiki


# Changelog # Changelog
0.8.6.3 Update (01-23-2019)
-----------------
- Re-added achievement-related checks back to smac_client. Originally, this was removed some time ago due to an issue with ZPS 2.4, but has been re-added as ZPS 3.0+ has achievements.
- Updated tf2 weapon classes to ignore in smac_aimbot. Most of the weapon classes added had weapons that did not necessarily benefit from aimbot. The weapons classes ignored are as follows:
* tf_weapon_slap - ex: Hot Hand
* tf_weapon_buff_item - ex: The Buff Banner
* tf_weapon_parachute - ex: The B.A.S.E. Jumper
* tf_weapon_breakable_sign - ex: Neon Annihilator
* tf_wearable_demoshield - ex: Splendid Screen
* tf_wearable_razorback - ex: The Razorback
* tf_wearable - ex: Mantreads
* tf_weapon_rocketpack - ex: Thermal Thruster
* tf_weapon_lunchbox_drink - ex: Bonk! Bonk! Atomic Punch
* tf_weapon_lunchbox - ex: Sandvich
* saxxy - ex: Saxxy, Prinny Machete
- Updated zps weapon classes to ignore in smac_aimbot. They are as follows:
* weapon_baguette
* weapon_pipewrench
* weapon_wrench
* weapon_meatcleaver
- Fixed a warning/bug in smac_cvar regarding variable shadowing for the CvarComp:CCompType variable in some parts of the code. I have renamed affected variables to SCCompType to avoid possible conflicts.
- All plugins have been compiled for SM 1.9

0.8.6.2 Update (12-09-2018) 0.8.6.2 Update (12-09-2018)
----------------- -----------------
- Only updated the change log with wiki information. No plugins or scripts were updated yet. - Only updated the change log with wiki information. No plugins or scripts were updated yet.
Expand Down
Binary file modified addons/sourcemod/plugins/smac.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_aimbot.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_autotrigger.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_client.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_commands.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_css_antiflash.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_css_antismoke.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_css_fixes.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_cvars.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_eac_banlist.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_esea_banlist.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_eyetest.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_hl2dm_fixes.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_l4d2_fixes.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_rcon.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_speedhack.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_spinhack.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/smac_wallhack.smx
Binary file not shown.
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/include/smac.inc
Expand Up @@ -25,8 +25,8 @@
#include <smac_stocks> #include <smac_stocks>


/* Globals */ /* Globals */
#define SMAC_VERSION "0.8.6.2" #define SMAC_VERSION "0.8.6.3"
#define SMAC_URL "http://smac.sx" #define SMAC_URL "https://github.com/Silenci0/SMAC"
#define SMAC_AUTHOR "SMAC Development Team (original), Mr. Silence (updated)" #define SMAC_AUTHOR "SMAC Development Team (original), Mr. Silence (updated)"
#define SMAC_MOD_ERROR "This module will not work for this mod and should be removed." #define SMAC_MOD_ERROR "This module will not work for this mod and should be removed."


Expand Down
15 changes: 15 additions & 0 deletions addons/sourcemod/scripting/smac_aimbot.sp
Expand Up @@ -101,6 +101,17 @@ public OnPluginStart()
SetTrieValue(g_IgnoreWeapons, "tf_weapon_stickbomb", 1); SetTrieValue(g_IgnoreWeapons, "tf_weapon_stickbomb", 1);
SetTrieValue(g_IgnoreWeapons, "tf_weapon_katana", 1); SetTrieValue(g_IgnoreWeapons, "tf_weapon_katana", 1);
SetTrieValue(g_IgnoreWeapons, "tf_weapon_flamethrower", 1); SetTrieValue(g_IgnoreWeapons, "tf_weapon_flamethrower", 1);
SetTrieValue(g_IgnoreWeapons, "tf_weapon_slap", 1);
SetTrieValue(g_IgnoreWeapons, "tf_weapon_buff_item", 1);
SetTrieValue(g_IgnoreWeapons, "tf_weapon_parachute", 1);
SetTrieValue(g_IgnoreWeapons, "tf_weapon_breakable_sign", 1);
SetTrieValue(g_IgnoreWeapons, "tf_wearable_demoshield", 1);
SetTrieValue(g_IgnoreWeapons, "tf_wearable_razorback", 1);
SetTrieValue(g_IgnoreWeapons, "tf_wearable", 1);
SetTrieValue(g_IgnoreWeapons, "tf_weapon_rocketpack", 1);
SetTrieValue(g_IgnoreWeapons, "tf_weapon_lunchbox_drink", 1);
SetTrieValue(g_IgnoreWeapons, "tf_weapon_lunchbox", 1);
SetTrieValue(g_IgnoreWeapons, "saxxy", 1);
} }
case Game_HL2DM: case Game_HL2DM:
{ {
Expand All @@ -118,8 +129,10 @@ public OnPluginStart()
SetTrieValue(g_IgnoreWeapons, "weapon_racket", 1); SetTrieValue(g_IgnoreWeapons, "weapon_racket", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_pot", 1); SetTrieValue(g_IgnoreWeapons, "weapon_pot", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_plank", 1); SetTrieValue(g_IgnoreWeapons, "weapon_plank", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_pipewrench", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_pipe", 1); SetTrieValue(g_IgnoreWeapons, "weapon_pipe", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_phone", 1); SetTrieValue(g_IgnoreWeapons, "weapon_phone", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_meatcleaver", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_machete", 1); SetTrieValue(g_IgnoreWeapons, "weapon_machete", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_keyboard", 1); SetTrieValue(g_IgnoreWeapons, "weapon_keyboard", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_ied", 1); SetTrieValue(g_IgnoreWeapons, "weapon_ied", 1);
Expand All @@ -131,9 +144,11 @@ public OnPluginStart()
SetTrieValue(g_IgnoreWeapons, "weapon_bat_wood", 1); SetTrieValue(g_IgnoreWeapons, "weapon_bat_wood", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_bat_aluminum", 1); SetTrieValue(g_IgnoreWeapons, "weapon_bat_aluminum", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_chair", 1); SetTrieValue(g_IgnoreWeapons, "weapon_chair", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_baguette", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_barricade", 1); SetTrieValue(g_IgnoreWeapons, "weapon_barricade", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_axe", 1); SetTrieValue(g_IgnoreWeapons, "weapon_axe", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_arms", 1); SetTrieValue(g_IgnoreWeapons, "weapon_arms", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_wrench", 1);
} }
} }


Expand Down
52 changes: 19 additions & 33 deletions addons/sourcemod/scripting/smac_client.sp
Expand Up @@ -17,20 +17,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


//------------------------ NOTICE: README --------------------------------------//
// All sections regarding achievements have been commented out for now.
//
// The reason for this is that there is a possiblity of false positive for ZPS
// that could potentially occur (it has achievements, but they do not exist) which
// could cause an issue for players at this time.
//
// As a result, to be on the safe side, it was commented out. If you wish to enable
// these lines of code/use this set of plugins on other games, uncomment the code
// and recompile this into its own .smx plugin file.
//
// In the future, should ZPS ever get updated, the code will be uncommented.
//--------------------------------------------------------------------------------//

#pragma semicolon 1 #pragma semicolon 1


/* SM Includes */ /* SM Includes */
Expand All @@ -56,7 +42,7 @@ new Handle:g_hCvarValidateAuth = INVALID_HANDLE;
new Handle:g_hClientConnections = INVALID_HANDLE; new Handle:g_hClientConnections = INVALID_HANDLE;
new Float:g_fTeamJoinTime[MAXPLAYERS+1][6]; new Float:g_fTeamJoinTime[MAXPLAYERS+1][6];
new g_iNameChanges[MAXPLAYERS+1]; new g_iNameChanges[MAXPLAYERS+1];
//new g_iAchievements[MAXPLAYERS+1]; new g_iAchievements[MAXPLAYERS+1];
new bool:g_bMapStarted = false; new bool:g_bMapStarted = false;
new bool:g_bConnectExt = false; new bool:g_bConnectExt = false;


Expand Down Expand Up @@ -84,7 +70,7 @@ public OnPluginStart()


HookEventEx("player_team", Event_PlayerTeam, EventHookMode_Pre); HookEventEx("player_team", Event_PlayerTeam, EventHookMode_Pre);
HookEvent("player_changename", Event_PlayerChangeName, EventHookMode_Post); HookEvent("player_changename", Event_PlayerChangeName, EventHookMode_Post);
//HookEventEx("achievement_earned", Event_AchievementEarned, EventHookMode_Pre); HookEventEx("achievement_earned", Event_AchievementEarned, EventHookMode_Pre);
CreateTimer(10.0, Timer_DecreaseCount, _, TIMER_REPEAT); CreateTimer(10.0, Timer_DecreaseCount, _, TIMER_REPEAT);


// Check all clients. // Check all clients.
Expand Down Expand Up @@ -178,7 +164,7 @@ public OnClientPutInServer(client)
if (IsClientNew(client)) if (IsClientNew(client))
{ {
g_iNameChanges[client] = 0; g_iNameChanges[client] = 0;
//g_iAchievements[client] = 0; g_iAchievements[client] = 0;
} }


// Give the client 10s to fully authenticate. // Give the client 10s to fully authenticate.
Expand Down Expand Up @@ -287,18 +273,18 @@ public Event_PlayerChangeName(Handle:event, const String:name[], bool:dontBroadc
g_iNameChanges[client] = 0; g_iNameChanges[client] = 0;
} }
} }
// ZPS does not have achievements at all and its the least of our troubles atm.
//public Action:Event_AchievementEarned(Handle:event, const String:name[], bool:dontBroadcast) public Action:Event_AchievementEarned(Handle:event, const String:name[], bool:dontBroadcast)
//{ {
// new client = GetEventInt(event, "player"); new client = GetEventInt(event, "player");
//
// if (IS_CLIENT(client) && ++g_iAchievements[client] >= 5) if (IS_CLIENT(client) && ++g_iAchievements[client] >= 5)
// { {
// return Plugin_Stop; return Plugin_Stop;
// } }
//
// return Plugin_Continue; return Plugin_Continue;
//} }


public Action:Timer_DecreaseCount(Handle:timer) public Action:Timer_DecreaseCount(Handle:timer)
{ {
Expand All @@ -309,10 +295,10 @@ public Action:Timer_DecreaseCount(Handle:timer)
g_iNameChanges[i]--; g_iNameChanges[i]--;
} }


//if (g_iAchievements[i]) if (g_iAchievements[i])
//{ {
// g_iAchievements[i]--; g_iAchievements[i]--;
//} }
} }


return Plugin_Continue; return Plugin_Continue;
Expand Down
18 changes: 9 additions & 9 deletions addons/sourcemod/scripting/smac_cvars.sp
Expand Up @@ -349,10 +349,10 @@ bool:RemCvar(String:sCvar[])
} }


// Disable replication // Disable replication
decl CvarComp:CCompType; decl CvarComp:SCCompType;
GetTrieValue(hDataTrie, Cvar_CompType, CCompType); GetTrieValue(hDataTrie, Cvar_CompType, SCCompType);


if (CCompType == Comp_Replicated) if (SCCompType == Comp_Replicated)
{ {
UnhookConVarChange(FindConVar(sCvar), OnConVarChanged); UnhookConVarChange(FindConVar(sCvar), OnConVarChanged);
} }
Expand Down Expand Up @@ -442,8 +442,8 @@ public OnConVarQueryFinished(QueryCookie:cookie, client, ConVarQueryResult:resul
SetTimer(g_hTimer[client], CreateTimer(0.1, Timer_QueryNextCvar, client, TIMER_REPEAT)); SetTimer(g_hTimer[client], CreateTimer(0.1, Timer_QueryNextCvar, client, TIMER_REPEAT));


// Initialize data // Initialize data
decl CvarComp:CCompType, String:sValue[MAX_CVAR_VALUE_LEN], String:sValue2[MAX_CVAR_VALUE_LEN], String:sKickMessage[255]; decl CvarComp:SCCompType, String:sValue[MAX_CVAR_VALUE_LEN], String:sValue2[MAX_CVAR_VALUE_LEN], String:sKickMessage[255];
GetTrieValue(hDataTrie, Cvar_CompType, CCompType); GetTrieValue(hDataTrie, Cvar_CompType, SCCompType);
GetTrieString(hDataTrie, Cvar_Value, sValue, sizeof(sValue)); GetTrieString(hDataTrie, Cvar_Value, sValue, sizeof(sValue));
GetTrieString(hDataTrie, Cvar_Value2, sValue2, sizeof(sValue2)); GetTrieString(hDataTrie, Cvar_Value2, sValue2, sizeof(sValue2));


Expand All @@ -453,7 +453,7 @@ public OnConVarQueryFinished(QueryCookie:cookie, client, ConVarQueryResult:resul
if (IsReplicating(hDataTrie)) if (IsReplicating(hDataTrie))
return; return;


switch (CCompType) switch (SCCompType)
{ {
case Comp_Equal: case Comp_Equal:
{ {
Expand Down Expand Up @@ -503,7 +503,7 @@ public OnConVarQueryFinished(QueryCookie:cookie, client, ConVarQueryResult:resul
} }
} }
} }
else if (CCompType == Comp_NonExist) else if (SCCompType == Comp_NonExist)
{ {
if (result == ConVarQuery_NotFound) if (result == ConVarQuery_NotFound)
return; return;
Expand All @@ -518,7 +518,7 @@ public OnConVarQueryFinished(QueryCookie:cookie, client, ConVarQueryResult:resul
new Handle:info = CreateKeyValues(""); new Handle:info = CreateKeyValues("");


KvSetString(info, "cvar", sCvar); KvSetString(info, "cvar", sCvar);
KvSetNum(info, "comptype", _:CCompType); KvSetNum(info, "comptype", _:SCCompType);
KvSetNum(info, "actiontype", _:CAction); KvSetNum(info, "actiontype", _:CAction);
KvSetString(info, "cvarvalue", cvarValue); KvSetString(info, "cvarvalue", cvarValue);
KvSetString(info, "value", sValue); KvSetString(info, "value", sValue);
Expand All @@ -531,7 +531,7 @@ public OnConVarQueryFinished(QueryCookie:cookie, client, ConVarQueryResult:resul


decl String:sResult[16], String:sCompType[16]; decl String:sResult[16], String:sCompType[16];
GetQueryResultString(result, sResult, sizeof(sResult)); GetQueryResultString(result, sResult, sizeof(sResult));
GetCompTypeString(CCompType, sCompType, sizeof(sCompType)); GetCompTypeString(SCCompType, sCompType, sizeof(sCompType));


switch (CAction) switch (CAction)
{ {
Expand Down

0 comments on commit 3bb7675

Please sign in to comment.