mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-03-07 07:31:12 +00:00
Fixed? rename
This commit is contained in:
@@ -596,10 +596,7 @@ public partial class CS2_SimpleAdmin
|
|||||||
// Check if the player is connected and can be targeted
|
// Check if the player is connected and can be targeted
|
||||||
if (player.Connected != PlayerConnectedState.PlayerConnected || !caller!.CanTarget(player))
|
if (player.Connected != PlayerConnectedState.PlayerConnected || !caller!.CanTarget(player))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Rename the player
|
|
||||||
player.Rename(newName);
|
|
||||||
|
|
||||||
// Determine message key and arguments for the rename notification
|
// Determine message key and arguments for the rename notification
|
||||||
var activityMessageKey = "sa_admin_rename_message";
|
var activityMessageKey = "sa_admin_rename_message";
|
||||||
var adminActivityArgs = new object[] { "CALLER", player.PlayerName, newName };
|
var adminActivityArgs = new object[] { "CALLER", player.PlayerName, newName };
|
||||||
@@ -608,6 +605,9 @@ public partial class CS2_SimpleAdmin
|
|||||||
if (caller != null && SilentPlayers.Contains(caller.Slot)) return;
|
if (caller != null && SilentPlayers.Contains(caller.Slot)) return;
|
||||||
|
|
||||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||||
|
|
||||||
|
// Rename the player
|
||||||
|
player.Rename(newName);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user