From 102f7c4a14e574a2f9b67820254b824cfea7b96e Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Sun, 10 Sep 2023 11:37:09 +0500 Subject: [PATCH] hide mw base weapons on evade roll --- beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua index a1fbeb8..3e76439 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua @@ -76,6 +76,10 @@ end) hook.Add("SetupMove", "EvadeRoll", function(ply, mv, cmd) if ply:GetJumpTurn() and ply:OnGround() and mv:KeyPressed(IN_BACK) then + if ply:Alive() and weapons.IsBasedOn(ply:GetActiveWeapon():GetClass(), "mg_base") then + RunConsoleCommand("mgbase_debug_vmrender", "1") + end + local ang = cmd:GetViewAngles() ply:SetViewOffset(Vector(0, 0, 64)) @@ -110,6 +114,10 @@ hook.Add("SetupMove", "EvadeRoll", function(ply, mv, cmd) net.WriteBool(true) net.Send(ply) end + + if ply:Alive() and weapons.IsBasedOn(ply:GetActiveWeapon():GetClass(), "mg_base") then + RunConsoleCommand("mgbase_debug_vmrender", "0") + end end end)