use landgun anim if player has a gun

This commit is contained in:
Jonny_Bro (Nikita) 2023-10-21 12:32:11 +05:00
parent 77f6f2ad08
commit 4ba59ed732

View file

@ -60,7 +60,11 @@ net.Receive("RollAnimSP", function()
local ply = LocalPlayer() local ply = LocalPlayer()
if net.ReadBool() then if net.ReadBool() then
if ply:UsingRH() then
roll.AnimString = "land" roll.AnimString = "land"
else
roll.AnimString = "landgun"
end
roll.animmodelstring = "climbanim" roll.animmodelstring = "climbanim"
roll.BodyAnimSpeed = 1 roll.BodyAnimSpeed = 1
elseif net.ReadBool() then elseif net.ReadBool() then
@ -163,7 +167,12 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed)
ply:SetSafetyRollAng(landang) ply:SetSafetyRollAng(landang)
ply:SetSafetyRollTime(CurTime() + 0.6) ply:SetSafetyRollTime(CurTime() + 0.6)
if ply:UsingRH() then
roll.AnimString = "land" roll.AnimString = "land"
else
roll.AnimString = "landgun"
end
roll.animmodelstring = "climbanim" roll.animmodelstring = "climbanim"
roll.usefullbody = true roll.usefullbody = true
else else