diff --git a/scripting/include/stac_api.inc b/scripting/include/stac_api.inc new file mode 100644 index 00000000..4354a0da --- /dev/null +++ b/scripting/include/stac_api.inc @@ -0,0 +1 @@ +forward void StacGenEvent_Fwd(int Cl, char[] steamid, char[] eventmsg, char[] hostname, char[] hostipandport, char[] demoname, int demotick); diff --git a/scripting/stac.sp b/scripting/stac.sp index 0806b96c..31067bb6 100755 --- a/scripting/stac.sp +++ b/scripting/stac.sp @@ -42,6 +42,8 @@ public Plugin myinfo = /********** SUBPLUGINS **********/ +Handle StacGenEvent_Fwd; + // globals #include "stac/stac_globals.sp" // misc funcs used around the plugin @@ -161,6 +163,22 @@ public void OnPluginStart() // jaypatch OnPluginStart_jaypatch(); + + // +StacGenEvent_Fwd = CreateGlobalForward +( + "StacGenEvent_Fwd", + ET_Ignore, + /* int Cl */ Param_Cell, + /* char[] steamid */ Param_String, + /* char[] eventmsg */ Param_String, + /* char[] host */ Param_String, + /* char[] hostipandport */ Param_String, + /* char[] demoname */ Param_String, + /* int demotick */ Param_Cell +); + + } public void OnPluginEnd() diff --git a/scripting/stac/stac_stocks.sp b/scripting/stac/stac_stocks.sp index 52270658..8ea8d5b9 100644 --- a/scripting/stac/stac_stocks.sp +++ b/scripting/stac/stac_stocks.sp @@ -694,17 +694,17 @@ public void OnLibraryAdded(const char[] name) } } -/********** DETECTIONS & DISCORD **********/ +/********** DETECTIONS && DISCORD && API **********/ void StacGeneralPlayerNotify(int userid, const char[] format, any ...) { StacLogDemo(); - if (!DISCORD) + /*if (!DISCORD) { return; } - +*/ static char generalTemplate[2048] = \ "{ \"embeds\": \ [{ \"title\": \"StAC Detection!\", \"color\": 16738740, \"fields\":\ @@ -745,6 +745,13 @@ void StacGeneralPlayerNotify(int userid, const char[] format, any ...) { steamid = "N/A"; } + Call_StartForward(StacGenEvent_Fwd); + + // forward void StacGenEvent_Fwd(int Cl, char[] steamid, char[] eventmsg, char[] hostname, char[] hostipandport, char[] demoname, int demotick); + + Call_Finish(); + + // Stac_OnGeneralNotify( Format ( msg,