I have a SWEP pack coming up in development, and everything so far is A-Okay, but a small problem has been formed.
The holdtype does not work.
I have the code
SWEP.HoldType = "melee"
In my shared.lua
I’ve been researching multiple threads, and none of them helped.
I also have tried these codes
function SWEP:Initialize() if (SERVER) then self:SetWeaponHoldType(self.HoldType) end end function SWEP:Initialize() if (CLIENT) then self:SetWeaponHoldType(self.HoldType) end end
But they didn’t help, I still hold each weapon like a pistol.
So the question is, what am I doing wrong?
I have checked http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexaeaf.html
And it said
How do I call both at the same time, if that would work. Should I just merge them? Thanks for any tips you guys can come up with, this problem has happened before, and I have not fixed it.
I have a cl_init.lua, a shared.lua, and a init.lua, if it helps