Skip to content

Commit 38e5699

Browse files
authored
Merge pull request #50 from HerrMagiic/dev
v2.0.3
2 parents 5f6c692 + 032c77c commit 38e5699

File tree

6 files changed

+11
-5
lines changed

6 files changed

+11
-5
lines changed

CustomCommands/CustomCommands.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace CustomCommands;
99
public partial class CustomCommands : BasePlugin, IPluginConfig<CustomCommandsConfig>
1010
{
1111
public override string ModuleName => "CustomCommands";
12-
public override string ModuleVersion => "2.0.2";
12+
public override string ModuleVersion => "2.0.3";
1313
public override string ModuleAuthor => "HerrMagic";
1414
public override string ModuleDescription => "Create your own commands per config";
1515

CustomCommands/CustomCommands.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.142">
13+
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.163">
1414
<PrivateAssets>none</PrivateAssets>
1515
<ExcludeAssets>runtime</ExcludeAssets>
1616
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

CustomCommands/Services/CooldownManager.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
using System.Text.Json;
22
using CounterStrikeSharp.API.Core;
3-
using CounterStrikeSharp.API.Modules.Entities.Constants;
43
using CustomCommands.Model;
5-
using Microsoft.Extensions.Logging;
64

75
namespace CustomCommands.Interfaces;
86

CustomCommands/Services/EventManager.cs

+6
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,11 @@ public void RegisterListeners()
6060
});
6161
}
6262
});
63+
64+
plugin.RegisterListener<Listeners.OnMapEnd>(() =>
65+
{
66+
PluginGlobals.centerClientOn.Clear();
67+
PluginGlobals.CooldownTimer.Clear();
68+
});
6369
}
6470
}

CustomCommands/Services/ReplaceTagsFunction.cs

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ public string ReplaceMessageTags(string input, CCSPlayerController player, bool
8383
{"{PLAYERS}",
8484
Utilities.GetPlayers().Count(u => u.PlayerPawn.Value != null && u.PlayerPawn.Value.IsValid).ToString() ?? "<PLAYERS not found>"}
8585
};
86+
87+
// Prevent vounrability by not replacing {PLAYERNAME} if safety is true/ServerCommands are being executed
8688
if (!safety)
8789
replacements.Add("{PLAYERNAME}", player.PlayerName ?? "<PLAYERNAME not found>");
8890

Examples/Tags.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"Title": "UserID",
8181
"Description": "Displays Player #userid",
8282
"Command": "userid",
83-
"Message": "Current players userid: {USERID}",
83+
"Message": "Current players userid: {USERID}", // If you want to use this tag for commands add a # before the tag
8484
"PrintTo": 0
8585
}
8686
]

0 commit comments

Comments
 (0)