Skip to content

Commit 2f688f8

Browse files
fix (control bots)
1 parent c3ade8f commit 2f688f8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

FunChangeWeaponOnShoot.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ public override void Fun(FunMatchPlugin plugin)
5050
if (cur_weapon.DesignerName == "weapon_c4" || cur_weapon.DesignerName == "weapon_knife" || cur_weapon.DesignerName == "weapon_knife_t")
5151
return HookResult.Continue;
5252

53-
@event.Userid!.DropActiveWeapon();
53+
player!.DropActiveWeapon();
5454

55-
@event.Userid!.GiveNamedItem(csItem);
55+
player!.GiveNamedItem(csItem);
5656
Server.NextFrame(()=>{
5757
cur_weapon!.Remove();
5858
if (pawn!.WeaponServices!.ActiveWeapon.Get() is null)
5959
{
60-
@event.Userid!.GiveNamedItem(CsItem.Knife);
60+
player!.GiveNamedItem(CsItem.Knife);
6161
}
6262
});
6363
return HookResult.Continue;

FunDropWeaponOnShoot.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public override void Fun(FunMatchPlugin plugin)
2828
Server.NextFrame(()=>{
2929
if (pawn!.WeaponServices!.ActiveWeapon.Get() is null)
3030
{
31-
@event.Userid!.GiveNamedItem(CsItem.Knife);
31+
player!.GiveNamedItem(CsItem.Knife);
3232
}
3333
});
3434
return HookResult.Continue;

0 commit comments

Comments
 (0)