Skip to content

Commit 7101e8e

Browse files
authored
Update Hooks.cs
1 parent 4856fca commit 7101e8e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Hooks.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,10 @@ public HookResult OnClientSpawn(EventPlayerSpawn @event, GameEventInfo info)
266266
timer_ex?.Kill();
267267
var client = player.Index;
268268
Used[client] = 0;
269-
Give_Values(player);
269+
Server.NextFrame(() =>
270+
{
271+
AddTimer(0.1f, () => { Give_Values(player); });
272+
});
270273

271274
if (Config.DisablePackWeaponAfter20Sec)
272275
{
@@ -506,7 +509,10 @@ public HookResult OnPlayerDeath(EventPlayerDeath @event, GameEventInfo info)
506509
if (Config.GiveHPAfterKill)
507510
{
508511
var health_attacker = attacker.PlayerPawn.Value.Health;
509-
@event.Attacker.PlayerPawn.Value.Health = @event.Attacker.PlayerPawn.Value.Health + Config.RewardsClass.KillHP;
512+
Server.NextFrame(() =>
513+
{
514+
AddTimer(0.1f, () => { set_hp(attacker, health_attacker + Config.RewardsClass.KillHP); });
515+
});
510516
Server.PrintToConsole($"VIP Plugins - Here is bug from valve https://discord.com/channels/1160907911501991946/1160907912445710482/1175583981387927602");
511517
attacker.PrintToChat($" {Config.Prefix} {Localizer["KillRewards", Config.RewardsClass.KillHP, player.PlayerName]}");
512518
}

0 commit comments

Comments
 (0)