mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-23 20:08:52 +00:00
Updating pawn's HP on slap
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
using CounterStrikeSharp.API.Modules.Admin;
|
using CounterStrikeSharp.API.Modules.Admin;
|
||||||
using CounterStrikeSharp.API.Modules.Utils;
|
using CounterStrikeSharp.API.Modules.Utils;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using CounterStrikeSharp.API;
|
||||||
|
|
||||||
namespace CS2_SimpleAdmin;
|
namespace CS2_SimpleAdmin;
|
||||||
|
|
||||||
@@ -115,6 +116,7 @@ public static class PlayerUtils
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
pawn.Health -= damage;
|
pawn.Health -= damage;
|
||||||
|
Utilities.SetStateChanged(pawn, "CBaseEntity", "m_iHealth");
|
||||||
|
|
||||||
if (pawn.Health <= 0)
|
if (pawn.Health <= 0)
|
||||||
pawn.CommitSuicide(true, true);
|
pawn.CommitSuicide(true, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user