mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-03-10 08:31:42 +00:00
Update WeaponAction.cs
This commit is contained in:
@@ -54,8 +54,8 @@ namespace WeaponPaints
|
|||||||
}
|
}
|
||||||
internal static void GiveKnifeToPlayer(CCSPlayerController? player)
|
internal static void GiveKnifeToPlayer(CCSPlayerController? player)
|
||||||
{
|
{
|
||||||
if (!_config.Additional.KnifeEnabled || player == null || !player.EntityIndex.HasValue || !player.IsValid) return;
|
if (!_config.Additional.KnifeEnabled || player == null || !player.IsValid) return;
|
||||||
if (g_playersKnife.TryGetValue((int)player.EntityIndex.Value.Value, out var knife))
|
if (g_playersKnife.TryGetValue((int)player.EntityIndex!.Value.Value, out var knife))
|
||||||
{
|
{
|
||||||
player.GiveNamedItem(knife);
|
player.GiveNamedItem(knife);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user