EDIT: Problem solved, the server just needed the models too.
Hi FP. I’ve been puzzling over this glitch for quite some time and can’t think of a solution. What happens is peculiar, when using this model (I apologise to whomever’s pack it is from) reload animations play fine in singleplayer, but not at all on a server. This does not occur for any other models e.g. CS:S or HL2 weapon models, they function fine online and singleplayer.
Here is the test code I am using:
if ( SERVER ) then
AddCSLuaFile( "shared.lua" )
end
SWEP.PrintCycle = true //Shows up in console the current cycle when reloading for timing reload noises
SWEP.ViewModelFlip = true
SWEP.HoldType = "ar2"
SWEP.PrintName ="anim tests"
SWEP.ViewModel = "models/weapons/v_adv__ar.mdl"
SWEP.WorldModel = "models/weapons/w_586.mdl"
SWEP.Weight = 5
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false
//SWEP.ZoomLevel = nil //Reduce FOV to this when zoomed
SWEP.Primary.Sound = Sound( "newsstrp/MORITANEW.wav" ) //Firing sound
SWEP.Primary.Recoil = 2 //Upward recoil
SWEP.KickMax = 0.3 //How much we are allowed to kick
SWEP.KickMult = 5 //How fast we get to max kick
SWEP.Primary.Damage = 20
SWEP.Primary.NumShots = 1
SWEP.Primary.DefaultCone = 0.013 //Sighted cone
SWEP.Primary.ConeUnsighted = 0.2 //Hipfired cone
SWEP.Primary.ConeRunning = 0.5 //Sprinting cone
SWEP.Primary.Delay = 0.11 //Delay between shots
SWEP.Primary.Automatic = false
function SWEP:SecondaryAttack()
self.Owner:SetAnimation(PLAYER_ATTACK1)
self:SendWeaponAnim(ACT_VM_PRIMARYATTACK)
end
function SWEP:Reload()
self.Owner:SetAnimation(PLAYER_RELOAD)
self:SendWeaponAnim(ACT_VM_RELOAD)
end
This is for a friend and I’m trying to push these guns out as quickly as possible, please help fp!
edit: this actually happens with all weapon models now it seems