SWEP reload animation?

Hello everyone, I tried to google and search here to no avail. All of my scripted weapons don’t show the reload animation on the server. However, they do show it in singleplayer. How do I get animations to show on the server? Is it just missing some files?

Basically, how does the reload function work in the sense that how does a gun know what animation to display on reload and what triggers the animation?

the code im using is:
[lua]if (SERVER) then

AddCSLuaFile( "shared.lua" )
SWEP.Weight				= 5
SWEP.AutoSwitchTo		= false
SWEP.AutoSwitchFrom		= false
SWEP.HoldType			= "crossbow"

end

if (CLIENT) then

SWEP.PrintName			= "AI AWM (AWP)"	
SWEP.Author				= "cheesylard"
SWEP.ViewModelFlip		= true
SWEP.CSMuzzleFlashes	= true
	
SWEP.Description		=    "Accuracy International Arctic Warfare Magnum "
						  .. "sniper rifle (Yeah, I didn't put that in the "
						  .. "name, because it's a really long)"
SWEP.Slot               = 4
SWEP.SlotPos			= 1
SWEP.IconLetter			= "r"
SWEP.NameOfSWEP			= "rcs_awp" --always make this the name of the folder the SWEP is in. 

killicon.AddFont( SWEP.NameOfSWEP, "CS", SWEP.IconLetter, Color( 255, 80, 0, 255 ) )

end

SWEP.Category = “RealCS”
SWEP.Base = “rcs_base_bsnip”

SWEP.Spawnable = true
SWEP.AdminSpawnable = true

SWEP.ViewModel = “models/weapons/v_snip_awp.mdl”
SWEP.WorldModel = “models/weapons/w_snip_awp.mdl”

SWEP.Weight = 5
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false

SWEP.Primary.Sound = Sound( “Weapon_AWP.Single” )
SWEP.Primary.Recoil = 2
SWEP.Primary.Damage = 101
SWEP.Primary.NumShots = 1
SWEP.Primary.Cone = 0.2 --regular ol’ spread
SWEP.Primary.ClipSize = 10 --ammo in clip
SWEP.Primary.Delay = 1.3
SWEP.Primary.DefaultClip = 0
SWEP.Primary.Automatic = true
SWEP.Primary.Ammo = “ar2” --keep as is, doesn’t really effect the swep that much unless if in a gamemode then you make custom ammo
SWEP.Primary.MaxReserve = 999999

SWEP.IncreasesSpread = false --does it increase spread the longer you hold down the trigger?
SWEP.Primary.MaxSpread = 0.2 --the maximum amount the spread can go by, best left at 0.20 or lower
–SWEP.Primary.Handle
–SWEP.Primary.HandleCut --these aren’t needed because SWEP.SpreadIncrease is set to false
–SWEP.Primary.SpreadIncrease

SWEP.MoveSpread = 100 --multiplier for spread when you are moving
SWEP.JumpSpread = 200 --multiplier for spread when you are jumping
SWEP.CrouchSpread = 0.5 --multiplier for spread when you are crouching

SWEP.Zoom = 0 --pretty self explanitory, don’t change this unless if you want the gun to be fucked up
SWEP.ZoomOutDelay = 0.2 – this is used for the delay between when you shoot and when it zooms out to pull the bolt
SWEP.ZoomInDelay = 1.5 --always set this 0.2 higher than SWEP.Primary.Delay
SWEP.Zoom1 = 30 --Field of view for the first zoom
SWEP.Zoom2 = 10 --field of view for the second zoom

SWEP.Zoom0Cone = 0.2 --spread for when not zoomed
SWEP.Zoom1Cone = 0.001 --spread for when zoomed once
SWEP.Zoom2Cone = 0.0001 --spread for when zoomed twice
SWEP.EjectDelay = 0.53

SWEP.Secondary.ClipSize = -1 --dont need cuz it just zooms you in
SWEP.Secondary.DefaultClip = -1 --dont need cuz it just zooms you in
SWEP.Secondary.Automatic = true --dont need cuz it just zooms you in
SWEP.Secondary.Ammo = “none” --dont need cuz it just zooms you in

SWEP.IronSightsPos = Vector (5.5739, 0, 2.0518)
SWEP.IronSightsAng = Vector (0, 0, 0)

function SWEP:Reload()
self.Weapon:DefaultReload( ACT_VM_RELOAD )
return true
end[/lua]

Edit: After trying some other weapons. It looks like the animations are trying to be run too fast. So thus you only see part of them.

Found a fix myself today. It was a server problem. Even though the content was already installed, it must have been corrupted, missing, or out-dated. Re-installing CSS content on the server fixed the animation issues. I hope this helps someone else :slight_smile: