mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-09-27 20:17:04 +02:00
Fixed? prename
This commit is contained in:
parent
efa2a392d6
commit
cf5c1d8440
1 changed files with 9 additions and 9 deletions
|
|
@ -637,7 +637,16 @@ public partial class CS2_SimpleAdmin
|
|||
// Check if the player is connected and can be targeted
|
||||
if (player.Connected != PlayerConnectedState.PlayerConnected || !caller!.CanTarget(player))
|
||||
return;
|
||||
|
||||
// Determine message key and arguments for the rename notification
|
||||
var activityMessageKey = "sa_admin_rename_message";
|
||||
var adminActivityArgs = new object[] { "CALLER", player.PlayerName, newName };
|
||||
|
||||
// Display admin activity message to other players
|
||||
if (caller != null && SilentPlayers.Contains(caller.Slot)) return;
|
||||
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
|
||||
// Determine if the new name is valid and update the renamed players list
|
||||
if (!string.IsNullOrEmpty(newName))
|
||||
{
|
||||
|
|
@ -648,15 +657,6 @@ public partial class CS2_SimpleAdmin
|
|||
{
|
||||
RenamedPlayers.Remove(player.SteamID);
|
||||
}
|
||||
|
||||
// Determine message key and arguments for the rename notification
|
||||
var activityMessageKey = "sa_admin_rename_message";
|
||||
var adminActivityArgs = new object[] { "CALLER", player.PlayerName, newName };
|
||||
|
||||
// Display admin activity message to other players
|
||||
if (caller != null && SilentPlayers.Contains(caller.Slot)) return;
|
||||
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue