Skip to content
Permalink
Browse files

Updated to 0.8.6.3

Signed-off-by: Mr.Silence <Silenci0@users.noreply.github.com>
  • Loading branch information...
Silenci0 committed Jan 24, 2019
1 parent 8375a0b commit 3bb7675e10143e9247ea47e9b8e3e95784274a6c
@@ -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.

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

# 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)
-----------------
- Only updated the change log with wiki information. No plugins or scripts were updated yet.
BIN +297 Bytes (100%) addons/sourcemod/plugins/smac.smx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -25,8 +25,8 @@
#include <smac_stocks>

/* Globals */
#define SMAC_VERSION "0.8.6.2"
#define SMAC_URL "http://smac.sx"
#define SMAC_VERSION "0.8.6.3"
#define SMAC_URL "https://github.com/Silenci0/SMAC"
#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."

@@ -101,6 +101,17 @@ public OnPluginStart()
SetTrieValue(g_IgnoreWeapons, "tf_weapon_stickbomb", 1);
SetTrieValue(g_IgnoreWeapons, "tf_weapon_katana", 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:
{
@@ -118,8 +129,10 @@ public OnPluginStart()
SetTrieValue(g_IgnoreWeapons, "weapon_racket", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_pot", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_plank", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_pipewrench", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_pipe", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_phone", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_meatcleaver", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_machete", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_keyboard", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_ied", 1);
@@ -131,9 +144,11 @@ public OnPluginStart()
SetTrieValue(g_IgnoreWeapons, "weapon_bat_wood", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_bat_aluminum", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_chair", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_baguette", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_barricade", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_axe", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_arms", 1);
SetTrieValue(g_IgnoreWeapons, "weapon_wrench", 1);
}
}

@@ -17,20 +17,6 @@
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

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

@@ -84,7 +70,7 @@ public OnPluginStart()

HookEventEx("player_team", Event_PlayerTeam, EventHookMode_Pre);
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);

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

// Give the client 10s to fully authenticate.
@@ -287,18 +273,18 @@ public Event_PlayerChangeName(Handle:event, const String:name[], bool:dontBroadc
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)
//{
// new client = GetEventInt(event, "player");
//
// if (IS_CLIENT(client) && ++g_iAchievements[client] >= 5)
// {
// return Plugin_Stop;
// }
//
// return Plugin_Continue;
//}

public Action:Event_AchievementEarned(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetEventInt(event, "player");

if (IS_CLIENT(client) && ++g_iAchievements[client] >= 5)
{
return Plugin_Stop;
}

return Plugin_Continue;
}

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

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

return Plugin_Continue;
@@ -349,10 +349,10 @@ bool:RemCvar(String:sCvar[])
}

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

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

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

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

switch (CCompType)
switch (SCCompType)
{
case Comp_Equal:
{
@@ -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)
return;
@@ -518,7 +518,7 @@ public OnConVarQueryFinished(QueryCookie:cookie, client, ConVarQueryResult:resul
new Handle:info = CreateKeyValues("");

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

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

switch (CAction)
{

0 comments on commit 3bb7675

Please sign in to comment.
You can’t perform that action at this time.