Skip to content

Commit

Permalink
Add Extended discord support, fixes mistakes in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rushaway committed Dec 3, 2024
1 parent 69495f4 commit 474164a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
12 changes: 6 additions & 6 deletions addons/sourcemod/scripting/BoostAlert_Discord.sp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public Plugin myinfo =
name = PLUGIN_NAME,
author = ".Rushaway",
description = "Discord support based on BoostAlert forwards",
version = "1.0.1",
version = "1.0.2",
url = "https://github.com/srcdslab/sm-plugin-BoostAlert-discord"
};

Expand Down Expand Up @@ -119,9 +119,9 @@ public void BoostAlert_OnBoostedKill(int attacker, int victim, int iInitialAttac
char sAuth_attacker[64], sAuth_victim[64], sAuth_InitBooster[64];

AuthIdType authType = view_as<AuthIdType>(GetConVarInt(g_cvAuthID));
GetClientAuthId(attacker, authType, sAuth_attacker, sizeof(sAuth_attacker));
GetClientAuthId(victim, authType, sAuth_victim, sizeof(sAuth_victim));
GetClientAuthId(iInitialAttacker, authType, sAuth_InitBooster, sizeof(sAuth_InitBooster));
GetClientAuthId(attacker, authType, sAuth_attacker, sizeof(sAuth_attacker), false);
GetClientAuthId(victim, authType, sAuth_victim, sizeof(sAuth_victim), false);
GetClientAuthId(iInitialAttacker, authType, sAuth_InitBooster, sizeof(sAuth_InitBooster), false);

if (authType == AuthId_Steam3)
{
Expand All @@ -143,7 +143,7 @@ public void BoostAlert_OnBoostedKill(int attacker, int victim, int iInitialAttac
else
{
if (iKnife != -1)
FormatEx(sMessage, sizeof(sMessage), "%N [%s] knifed (-%d HP) %N [%s] (Recently knifed by %N [%s])", attacker, sAuth_attacker, victim, sAuth_victim, damage, iInitialAttacker, sAuth_InitBooster);
FormatEx(sMessage, sizeof(sMessage), "%N [%s] knifed (-%d HP) %N [%s] (Recently knifed by %N [%s])", attacker, sAuth_attacker, damage, victim, sAuth_victim, iInitialAttacker, sAuth_InitBooster);
else
FormatEx(sMessage, sizeof(sMessage), "%N [%s] %s %N [%s] with %s (-%d HP) (Recently boosted by %N [%s])", attacker, sAuth_attacker, sType, victim, sAuth_victim, sWeapon, damage, iInitialAttacker, sAuth_InitBooster);
}
Expand Down Expand Up @@ -299,4 +299,4 @@ public void OnWebHookExecuted(HTTPResponse response, DataPack pack)
}

retries = 0;
}
}
7 changes: 7 additions & 0 deletions sourceknight.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ project:
- source: /addons/sourcemod/scripting/include
dest: /addons/sourcemod/scripting/include

- name: ExtendedDiscord
type: git
repo: https://github.com/srcdslab/sm-plugin-Extended-Discord
unpack:
- source: /addons/sourcemod/scripting/include
dest: /addons/sourcemod/scripting/include

root: /
output: /addons/sourcemod/plugins
targets:
Expand Down

0 comments on commit 474164a

Please sign in to comment.