From 86afa2bb9397e73ca94a014b7e645717715c30b2 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 15 Apr 2021 01:49:35 +0200 Subject: [PATCH] [HOTFIX] fix weapon in hup --- ReallifeGamemode.Client/util/animationSync.ts | 9 ++++++--- ReallifeGamemode.Server/Extensions/ClientExtension.cs | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Client/util/animationSync.ts b/ReallifeGamemode.Client/util/animationSync.ts index 169a070b..4601cb67 100644 --- a/ReallifeGamemode.Client/util/animationSync.ts +++ b/ReallifeGamemode.Client/util/animationSync.ts @@ -133,11 +133,14 @@ export default function animationSync() { mp.events.callRemote("CLIENT:ClearAnimationData", false); } + const blockInputControls = [12, 13, 14, 15, 22, 24, 25, 37, 261, 262]; + mp.events.add("render", () => { + mp.gui.chat.push("blockInput = " + blockInput); if (blockInput) { - mp.game.controls.disableControlAction(32, 25, true); - mp.game.controls.disableControlAction(32, 24, true); - mp.game.controls.disableControlAction(32, 22, true); + blockInputControls.forEach((ctrl) => { + mp.game.controls.disableControlAction(32, ctrl, true); + }); } }); diff --git a/ReallifeGamemode.Server/Extensions/ClientExtension.cs b/ReallifeGamemode.Server/Extensions/ClientExtension.cs index 9c354a51..b400682a 100644 --- a/ReallifeGamemode.Server/Extensions/ClientExtension.cs +++ b/ReallifeGamemode.Server/Extensions/ClientExtension.cs @@ -433,6 +433,7 @@ namespace ReallifeGamemode.Server.Extensions return; player.SyncAnimation("hup"); + NAPI.Player.SetPlayerCurrentWeapon(player, WeaponHash.Unarmed); if (player.GetUser().Wanteds > 0) PositionManager.cuffPoints.Add(player);