okay, i may sound a little bit old but i still have the problem with the holdtype on my server, im using madcow's weapons and i have tried the holdtypefix addon but it didnt work.
this is a example of my sniper.
[PHP]function SWEP:Initialize()
self:SetWeaponHoldType("ar2")
end
SWEP.Base = "weapon_mad_dod_base_sniper"
SWEP.ViewModelFOV = 45
SWEP.ViewModelFlip = false
SWEP.ViewModel = "models/weapons/v_springfield.mdl"
SWEP.WorldModel = "models/weapons/w_spring.mdl"
SWEP.Spawnable = true
SWEP.AdminSpawnable = false
SWEP.Primary.Sound = Sound("Weapon_Springfield.Shoot")
SWEP.Primary.Recoil = 7
SWEP.Primary.Damage = 185
SWEP.Primary.NumShots = 1
SWEP.Primary.Cone = 0.0005
SWEP.Primary.Delay = 1.5
SWEP.Primary.ClipSize = 5 // Size of a clip
SWEP.Primary.DefaultClip = 5 // Default number of bullets in a clip
SWEP.Primary.Automatic = false // Automatic/Semi Auto
SWEP.Primary.Ammo = "smg1"
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.DeployDelay = 1
SWEP.ShellEffect = "effect_mad_shell_rifle" // "effect_mad_shell_pistol" or "effect_mad_shell_rifle" or "effect_mad_shell_shotgun"
SWEP.ShellDelay = 0.65
SWEP.IronSightsPos = Vector (-5.3461, -11.2364, 1.0614)
SWEP.IronSightsAng = Vector (0, 0, 0)
SWEP.RunArmOffset = Vector (4.5794, -2.4396, 3.4595)
SWEP.RunArmAngle = Vector (-14.0819, 19.8924, 0)
SWEP.ScopeZooms = {8}
SWEP.BoltActionSniper = true
/*---------------------------------------------------------
Name: SWEP:Precache()
Desc: Use this function to precache stuff.
---------------------------------------------------------*/
function SWEP:Precache()
util.PrecacheSound("weapons/spring_shoot.wav")
end
/*---------------------------------------------------------
Name: SWEP:ReloadAnimation()
---------------------------------------------------------*/
function SWEP:ReloadAnimation()
self.ShellEffect = "effect_mad_shell_rifle"
self.Weapon:SendWeaponAnim(ACT_VM_IDLE)
local Animation = self.Owner:GetViewModel()
Animation:SetSequence(Animation:LookupSequence("reload"))
// Shell eject
timer.Simple(0.5, function()
if not IsFirstTimePredicted() then return end
if not self.Owner:IsNPC() and not self.Owner:Alive() then return end
local effectdata = EffectData()
effectdata:SetEntity(self.Weapon)
effectdata:SetNormal(self.Owner:GetAimVector())
effectdata:SetAttachment(2)
util.Effect(self.ShellEffect, effectdata)
end)
end
/*---------------------------------------------------------
Name: SWEP:SecondThink()
Desc: Called every frame. Use this function if you don't
want to copy/past the think function everytime you
create a new weapon with this base...
---------------------------------------------------------*/
function SWEP:SecondThink()
end
/*---------------------------------------------------------
Name: SWEP:DeployAnimation()
---------------------------------------------------------*/
function SWEP:DeployAnimation()
self.Weapon:SendWeaponAnim(ACT_VM_IDLE)
local Animation = self.Owner:GetViewModel()
Animation:SetSequence(Animation:LookupSequence("draw"))
end
/*---------------------------------------------------------
Name: SWEP:ShootAnimation()
---------------------------------------------------------*/
function SWEP:ShootAnimation()
if (self.Weapon:Clip1() < 1) then
self.Weapon:SendWeaponAnim(ACT_VM_IDLE)
local Animation = self.Owner:GetViewModel()
Animation:SetSequence(Animation:LookupSequence("shoot_empty"))
self.ShellEffect = "none"
else
self.Weapon:SendWeaponAnim(ACT_VM_IDLE)
local Animation = self.Owner:GetViewModel()
Animation:SetSequence(Animation:LookupSequence("shoot"))
self.ShellEffect = "effect_mad_shell_rifle"
end
end
[/PHP]
i really need help :/
maybe " SWEP.Base = "weapon_mad_dod_base_sniper" " sets an another holdtype?
[QUOTE=yokko;23517256]maybe " SWEP.Base = "weapon_mad_dod_base_sniper" " sets an another holdtype?[/QUOTE]
im going to check
[editline]05:07PM[/editline]
[QUOTE=blown25;23518115]im going to check[/QUOTE]
im giving up, i have tried everything now :(, nothing works, why did garry even do this? what was the point of the update
put the initalize function at the bottom
[QUOTE=Tobba;23519322]put the initalize function at the bottom[/QUOTE]
will that make any difference?
Probbably not
[editline]08:00PM[/editline]
I cant see anything wrong with it
I'm pretty sure the update will help with a lot of things, besides breaking a few things.
I [I] think [/I] that you take SWEP:Holdtype out of the Initialize and it works. I remember hearing that somewhere, probably not though.
Yeah it worked for my shotgun (Crappy, uses default base etc) might work for you
Sorry, you need to Log In to post a reply to this thread.