Skip to content
Permalink
Browse files

Updated SMAC for ZPS 3.0 and SM 1.8.

Signed-off-by: Mr.Silence <Silenci0@users.noreply.github.com>
  • Loading branch information...
Silenci0 committed Jun 24, 2018
1 parent d6785eb commit 2abf374e84878431eca5ef92892adba7625f44ab
@@ -7,6 +7,11 @@ Because of how complex SMAC is, I am also including the wiki from the wayback ma

I may do something about this later and add an actual webpage someplace so it can be updated. But below are some of the changes I made to SMAC for ZPS specifically.

0.8.6.2 Update (6-11-2018)
-----------------
- Compiled/Updated codebase for SM 1.8
- Updated SMAC stocks and wallhack code to use FindDataMapInfo and FindSendPropInfo instead of FindDataMapOffs and FindSendPropOffs.
- Updated smac_rcon module to have logging for attempts to use rcon_password on the server from a non-whitelisted IP. This functionality REQUIRES the SM Rcon extension found here: https://forums.alliedmods.net/showthread.php?t=168403. Please note that some games might not work with this extension!

0.8.6.1 Initial Commit (9-1-2016)
-----------------
BIN +267 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,9 +25,9 @@
#include <smac_stocks>

/* Globals */
#define SMAC_VERSION "0.8.6.1"
#define SMAC_VERSION "0.8.6.2"
#define SMAC_URL "http://smac.sx"
#define SMAC_AUTHOR "SMAC Development Team"
#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."

enum GameType {
@@ -116,7 +116,7 @@ stock bool:GetClientAbsVelocity(client, Float:velocity[3])
{
static offset = -1;

if (offset == -1 && (offset = FindDataMapOffs(client, "m_vecAbsVelocity")) == -1)
if (offset == -1 && (offset = FindDataMapInfo(client, "m_vecAbsVelocity")) == -1) // FindDataMapOffs(client, "m_vecAbsVelocity")) == -1)
{
ZeroVector(velocity);
return false;
@@ -135,7 +135,7 @@ stock GetClientObserverMode(client)
{
static offset = -1;

if (offset == -1 && (offset = FindSendPropOffs("CBasePlayer", "m_iObserverMode")) == -1)
if (offset == -1 && (offset = FindSendPropInfo("CBasePlayer", "m_iObserverMode")) == -1) //FindSendPropOffs("CBasePlayer", "m_iObserverMode")) == -1)
{
return OBS_MODE_NONE;
}
@@ -147,7 +147,7 @@ stock GetClientObserverTarget(client)
{
static offset = -1;

if (offset == -1 && (offset = FindSendPropOffs("CBasePlayer", "m_hObserverTarget")) == -1)
if (offset == -1 && (offset = FindSendPropInfo("CBasePlayer", "m_hObserverTarget")) == -1)
{
return -1;
}
@@ -22,7 +22,7 @@
#include <sourcemod>
#include <smac>
#undef REQUIRE_EXTENSIONS
#tryinclude <smrcon>
#tryinclude <smrcon>

/* Plugin Info */
public Plugin:myinfo =
@@ -164,6 +164,7 @@ public Action:SMRCon_OnAuth(rconId, const String:address[], const String:passwor
if (!GetTrieSize(g_hWhitelist) || GetTrieValue(g_hWhitelist, address, dummy))
return Plugin_Continue;

SMAC_Log("Unauthorized RCON Login Detected! Failed auth from address: \"%s\", attempted password: \"%s\"", address, password);
allow = false;
return Plugin_Changed;
}
@@ -176,6 +177,7 @@ public Action:SMRCon_OnCommand(rconId, const String:address[], const String:comm
if (!GetTrieSize(g_hWhitelist) || GetTrieValue(g_hWhitelist, address, dummy))
return Plugin_Continue;

SMAC_Log("Unauthorized RCON command use detected! Failed auth from address: \"%s\", attempted command: \"%s\"", address, command);
allow = false;
return Plugin_Changed;
}
@@ -1010,7 +1010,7 @@ FarESP_Enable()
if ((g_iPlayerManager = GetPlayerResourceEntity()) == -1)
return;

g_iPlayerSpotted = FindSendPropOffs("CCSPlayerResource", "m_bPlayerSpotted");
g_iPlayerSpotted = FindSendPropInfo("CCSPlayerResource", "m_bPlayerSpotted"); //FindSendPropOffs("CCSPlayerResource", "m_bPlayerSpotted");
SDKHook(g_iPlayerManager, SDKHook_ThinkPost, PlayerManager_ThinkPost);

g_msgUpdateRadar = GetUserMessageId("UpdateRadar");

0 comments on commit 2abf374

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