Skip to content

Commit

Permalink
Set alpha from connected player dict
Browse files Browse the repository at this point in the history
  • Loading branch information
razpbrry committed Mar 26, 2024
1 parent 7757cd3 commit d42ba85
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Commands/ColorCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}");
Expand Down

0 comments on commit d42ba85

Please sign in to comment.