hide mw base weapons on evade roll

This commit is contained in:
Jonny_Bro (Nikita) 2023-09-10 11:37:09 +05:00
parent 9d5832a5e4
commit 102f7c4a14

View file

@ -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)