mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-09-27 20:17:04 +02:00
Bump version to 1.8.2a and add rename timer
This commit is contained in:
parent
ca55c7f1a6
commit
b0c7fd12c3
4 changed files with 13 additions and 3 deletions
|
|
@ -22,7 +22,7 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
|
|||
public override string ModuleName => "CS2-SimpleAdmin" + (Helper.IsDebugBuild ? " (DEBUG)" : " (RELEASE)");
|
||||
public override string ModuleDescription => "Simple admin plugin for Counter-Strike 2 :)";
|
||||
public override string ModuleAuthor => "daffyy";
|
||||
public override string ModuleVersion => "1.8.1a";
|
||||
public override string ModuleVersion => "1.8.2a";
|
||||
|
||||
public override void Load(bool hotReload)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ public partial class CS2_SimpleAdmin
|
|||
player.DiePosition = null;
|
||||
}
|
||||
|
||||
AddTimer(0.41f, () =>
|
||||
AddTimer(0.5f, () =>
|
||||
{
|
||||
foreach (var list in RenamedPlayers)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -275,6 +275,16 @@ internal class PlayerManager
|
|||
/// </remarks>
|
||||
public void CheckPlayersTimer()
|
||||
{
|
||||
CS2_SimpleAdmin.Instance.AddTimer(5f, () =>
|
||||
{
|
||||
foreach (var (steamid, name) in CS2_SimpleAdmin.RenamedPlayers)
|
||||
{
|
||||
var player = Helper.GetPlayerFromSteamid64(steamid);
|
||||
if (player == null || !player.IsValid || player.PlayerName == name) continue;
|
||||
player.Rename(name);
|
||||
}
|
||||
});
|
||||
|
||||
CS2_SimpleAdmin.Instance.PlayersTimer = CS2_SimpleAdmin.Instance.AddTimer(61.0f, () =>
|
||||
{
|
||||
#if DEBUG
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
1.8.1a
|
||||
1.8.2a
|
||||
Loading…
Add table
Add a link
Reference in a new issue