• is derived from non existant SWEP (weapon_cs_base)
    0 replies, posted
So, I'm getting this error when I try to use my wepon: [code] Giving [CJ]cjburkey01 a pistol-machine-sohtgun SWEP (pistol-machine-sohtgun) is derived from non existant SWEP (weapon_cs_base) - Expect errors [/code] And here is my code: [code] SWEP.PrintName = "Shotgun Machin Pistol" SWEP.Author = "CJ Burkey" SWEP.Instructions = "Left mouse to fire!" SWEP.Spawnable = true SWEP.AdminOnly = true SWEP.Primary.ClipSize = 100 SWEP.Primary.DefaultClip = 100 SWEP.Primary.Automatic = true SWEP.Primary.Ammo = "smg1" SWEP.Primary.Recoil = 1.5 SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" SWEP.Weight = 5 SWEP.AutoSwitchTo = false SWEP.AutoSwitchFrom = false SWEP.Slot = 1 SWEP.SlotPos = 2 SWEP.DrawAmmo = false SWEP.DrawCrosshair = true SWEP.IronSightsPos = Vector( -5.403, -9.5924, 4.2472 ) SWEP.IronSightsAng = Vector( -0.7108, 0.6869, 2.0394 ) SWEP.ViewModel = "models/weapons/v_pistol.mdl" SWEP.WorldModel = "models/weapons/w_pistol.mdl" SWEP.Base = "weapon_cs_base" local ShootSound = Sound("Weapon_Pistol.Single") local EmptySound = Sound("Weapon_Pistol.Empty") local ReloadSound = Sound("Weapon_Pistol.Reload") function SWEP:PrimaryAttack() if(self:CanPrimaryAttack()) then self:ShootBullet(50, 5, 0.05) self.Weapon:SetNextPrimaryFire(CurTime() + 0.05) end end function SWEP:CanPrimaryAttack() if (self.Weapon:Clip1() <= 0) then self:EmitSound(EmptySound) self:SetNextPrimaryFire(CurTime() + 0.2) self:Reload() return false end return true end function SWEP:TakePrimaryAmmo( num ) if ( self.Weapon:Clip1() <= 0 ) then if ( self:Ammo1() <= 0 ) then return end self.Owner:RemoveAmmo( num, self.Weapon:GetPrimaryAmmoType() ) return end self.Weapon:SetClip1( self.Weapon:Clip1() - num ) end function SWEP:Reload() if self.ReloadingTime and CurTime() <= self.ReloadingTime then return end if ( self:Clip1() < self.Primary.ClipSize and self.Owner:GetAmmoCount( self.Primary.Ammo ) > 0 ) then self:DefaultReload( ACT_VM_RELOAD ) local AnimationTime = self.Owner:GetViewModel():SequenceDuration() self.ReloadingTime = CurTime() + AnimationTime self:SetNextPrimaryFire(CurTime() + AnimationTime) self:SetNextSecondaryFire(CurTime() + AnimationTime) end end function SWEP:ShootBullet(damage, num_bullets, aimcone) local bullet = {} bullet.Num = num_bullets bullet.Src = self.Owner:GetShootPos() bullet.Dir = self.Owner:GetAimVector() bullet.Spread = Vector( aimcone, aimcone, 0 ) bullet.Tracer = 5 bullet.TracerName = "Tracer" bullet.Force = 1 bullet.Damage = damage bullet.AmmoType = "smg1" self:TakePrimaryAmmo(1); self:EmitSound(ShootSound) self.Owner:FireBullets(bullet) self:ShootEffects() end [/code] Why is this. I have counter strike source [highlight](User was banned for this post ("wrong section." - postal))[/highlight]
Sorry, you need to Log In to post a reply to this thread.