How to fix animations since update?

I have looked around for the past day trying to find a thread that mentions what you have to do to weapon LUA files to fix the broken animations since the update. So how do I do it?

Animations for what? I haven’t had any animation bugs lately.
Wait, your having a problem with weapon animations?

All the weapons are being held like they are pistols even if they aren’t and I read somewhere that you need to change some code in the LUAs but it didn’t say what needed to be changed.

You need to move SetHoldType to shared.lua and outside of any SERVER or CLIENT conditionals.

This’ll be a shame for all the frekin people out there who don’t know shit about lua because they barely don’t know where the addons folder is.

Thanks for the help. Much appreciated :slight_smile:

I did and it still doesn’t work. :frowning:

// Variables that are used on both client and server

SWEP.HoldType				= "ar2"

SWEP.Base 				= "weapon_mad_base"

SWEP.ViewModelFlip		= true
SWEP.ViewModel			= "models/weapons/v_rif_ak47.mdl"
SWEP.WorldModel			= "models/weapons/w_rif_ak47.mdl"

SWEP.Spawnable			= true
SWEP.AdminSpawnable		= false

SWEP.Primary.Sound 		= Sound("Weapon_AK47.Single")
SWEP.Primary.Recoil		= 1
SWEP.Primary.Damage		= 33
SWEP.Primary.NumShots		= 1
SWEP.Primary.Cone			= 0.027
SWEP.Primary.Delay 		= 0.1

SWEP.Primary.ClipSize		= 30					// Size of a clip
SWEP.Primary.DefaultClip	= 30					// Default number of bullets in a clip
SWEP.Primary.Automatic		= true				// Automatic/Semi Auto
SWEP.Primary.Ammo			= "StriderMinigun"

SWEP.Secondary.ClipSize		= -1					// Size of a clip
SWEP.Secondary.DefaultClip	= -1					// Default number of bullets in a clip
SWEP.Secondary.Automatic	= false				// Automatic/Semi Auto
SWEP.Secondary.Ammo		= "none"

SWEP.ShellEffect			= "effect_mad_shell_rifle"	// "effect_mad_shell_pistol" or "effect_mad_shell_rifle" or "effect_mad_shell_shotgun"

SWEP.Pistol				= false
SWEP.Rifle				= true
SWEP.Shotgun			= false
SWEP.Sniper				= false

SWEP.IronSightsPos 		= Vector (6.0816, -7.8745, 2.5074)
SWEP.IronSightsAng 		= Vector (2.4511, -0.0486, 0)
SWEP.RunArmOffset 		= Vector (-2.6657, 0, 3.5)
SWEP.RunArmAngle 			= Vector (-20.0824, -20.5693, 0)

   Name: SWEP:Precache()
   Desc: Use this function to precache stuff.
function SWEP:Precache()


At the beginning I know it says the the varibles are used on both the client and the server, but I don’t know how to make it so the SWEP.HoldType isn’t in either.

In the weapon_mad_base, self:SetWeaponHoldType( self.HoldType ) needs to be moved out of any if SERVER/CLIENT conditionals (but remain inside the SWEP:Initialize function). If it is already then I don’t know.

well i figured that out.