mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-02-22 03:35:16 +00:00
bots had no knife
This commit is contained in:
@@ -131,10 +131,15 @@ public class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig>
|
||||
private HookResult OnPlayerSpawn(EventPlayerSpawn @event, GameEventInfo info)
|
||||
{
|
||||
var player = @event.Userid;
|
||||
if (!player.IsValid || !player.PlayerPawn.IsValid || player.IsBot)
|
||||
if (!player.IsValid || !player.PlayerPawn.IsValid)
|
||||
{
|
||||
return HookResult.Continue;
|
||||
}
|
||||
if (player.IsBot)
|
||||
{
|
||||
player.GiveNamedItem("weapon_knife");
|
||||
return HookResult.Continue;
|
||||
}
|
||||
if (!PlayerHasKnife(player)) player.GiveNamedItem(g_playersKife[(int)player.EntityIndex!.Value.Value]);
|
||||
|
||||
return HookResult.Continue;
|
||||
|
||||
Reference in New Issue
Block a user