mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-02-26 13:07:40 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a24f3b9fa |
@@ -131,10 +131,15 @@ public class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig>
|
|||||||
private HookResult OnPlayerSpawn(EventPlayerSpawn @event, GameEventInfo info)
|
private HookResult OnPlayerSpawn(EventPlayerSpawn @event, GameEventInfo info)
|
||||||
{
|
{
|
||||||
var player = @event.Userid;
|
var player = @event.Userid;
|
||||||
if (!player.IsValid || !player.PlayerPawn.IsValid || player.IsBot)
|
if (!player.IsValid || !player.PlayerPawn.IsValid)
|
||||||
{
|
{
|
||||||
return HookResult.Continue;
|
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]);
|
if (!PlayerHasKnife(player)) player.GiveNamedItem(g_playersKife[(int)player.EntityIndex!.Value.Value]);
|
||||||
|
|
||||||
return HookResult.Continue;
|
return HookResult.Continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user