[HOTFIX] fix weapon in hup

This commit is contained in:
hydrant
2021-04-15 01:49:35 +02:00
parent 55e324f322
commit 86afa2bb93
2 changed files with 7 additions and 3 deletions

View File

@@ -133,11 +133,14 @@ export default function animationSync() {
mp.events.callRemote("CLIENT:ClearAnimationData", false); mp.events.callRemote("CLIENT:ClearAnimationData", false);
} }
const blockInputControls = [12, 13, 14, 15, 22, 24, 25, 37, 261, 262];
mp.events.add("render", () => { mp.events.add("render", () => {
mp.gui.chat.push("blockInput = " + blockInput);
if (blockInput) { if (blockInput) {
mp.game.controls.disableControlAction(32, 25, true); blockInputControls.forEach((ctrl) => {
mp.game.controls.disableControlAction(32, 24, true); mp.game.controls.disableControlAction(32, ctrl, true);
mp.game.controls.disableControlAction(32, 22, true); });
} }
}); });

View File

@@ -433,6 +433,7 @@ namespace ReallifeGamemode.Server.Extensions
return; return;
player.SyncAnimation("hup"); player.SyncAnimation("hup");
NAPI.Player.SetPlayerCurrentWeapon(player, WeaponHash.Unarmed);
if (player.GetUser().Wanteds > 0) if (player.GetUser().Wanteds > 0)
PositionManager.cuffPoints.Add(player); PositionManager.cuffPoints.Add(player);