Skip to content
This repository has been archived by the owner on May 6, 2023. It is now read-only.

Commit

Permalink
Fix rare exception
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlOfDuty committed Jul 25, 2022
1 parent ee85617 commit 13b5c02
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions SCPDiscordPlugin/EventListeners/PlayerEventListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -807,17 +807,17 @@ public void OnGrenadeHitPlayer(PlayerGrenadeHitPlayer ev)
Dictionary<string, string> variables = new Dictionary<string, string>
{
{ "playeripaddress", ev.Player.IPAddress },
{ "playername", ev.Player.Name },
{ "playerplayerid", ev.Player.PlayerID.ToString() },
{ "playersteamid", ev.Player.GetParsedUserID() ?? ev.Player.UserID },
{ "playerclass", ev.Player.PlayerRole.RoleID.ToString() },
{ "playerteam", ev.Player.PlayerRole.Team.ToString() },
{ "targetipaddress", ev.Victim.IPAddress },
{ "targetname", ev.Victim.Name },
{ "targetplayerid", ev.Victim.PlayerID.ToString() },
{ "targetsteamid", ev.Victim.GetParsedUserID() ?? ev.Player.UserID },
{ "targetclass", ev.Victim.PlayerRole.RoleID.ToString() },
{ "targetteam", ev.Victim.PlayerRole.Team.ToString() },
{ "playername", ev.Player?.Name },
{ "playerplayerid", ev.Player?.PlayerID.ToString() },
{ "playersteamid", ev.Player?.GetParsedUserID() ?? ev.Player?.UserID },
{ "playerclass", ev.Player?.PlayerRole.RoleID.ToString() },
{ "playerteam", ev.Player?.PlayerRole.Team.ToString() },
{ "targetipaddress", ev.Victim?.IPAddress },
{ "targetname", ev.Victim?.Name },
{ "targetplayerid", ev.Victim?.PlayerID.ToString() },
{ "targetsteamid", ev.Victim?.GetParsedUserID() ?? ev.Victim?.UserID },
{ "targetclass", ev.Victim?.PlayerRole.RoleID.ToString() },
{ "targetteam", ev.Victim?.PlayerRole.Team.ToString() },
};
this.plugin.SendMessage(Config.GetArray("channels.ongrenadehitplayer"), "player.ongrenadehitplayer", variables);
}
Expand Down

0 comments on commit 13b5c02

Please sign in to comment.