diff --git a/src/Commands/ColorCommands.cs b/src/Commands/ColorCommands.cs index 22e5b02..16bd615 100644 --- a/src/Commands/ColorCommands.cs +++ b/src/Commands/ColorCommands.cs @@ -2,7 +2,6 @@ using CounterStrikeSharp.API.Core; using CounterStrikeSharp.API.Modules.Admin; using CounterStrikeSharp.API.Modules.Commands; -using CounterStrikeSharp.API; using Microsoft.Extensions.Logging; namespace ImperfectModels @@ -28,7 +27,7 @@ public void ChangeModelAlphaCommand(CCSPlayerController? player, CommandInfo com foreach (var connectedPlayer in ConnectedPlayers) { ModelAlpha = newModelAlphaInt; - player.PlayerPawn.Value.Render = SetPlayerPawnColor(player, ModelAlpha); + connectedPlayer.Value.PlayerPawn.Value.Render = SetPlayerPawnColor(connectedPlayer.Value, ModelAlpha); } commandInfo.ReplyToCommand($"All player models alpha set to {newModelAlpha}");