Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- – Effect settings
- SWEP.PrintName = “The Pew Pew” –
- SWEP.Slot = 3 –
- SWEP.SlotPos = 7 –
- SWEP.DrawAmmo = true –
- SWEP.DrawCrosshair = true –
- SWEP.ViewModel = “models/weapons/v_pist_p228.mdl” –
- SWEP.WorldModel = “models/weapons/w_pist_p228.mdl” –
- SWEP.ReloadSound = “clipin.wav” –
- – Other settings
- SWEP.HoldType = “pistol”
- SWEP.Weight = 5 –
- SWEP.AutoSwitchTo = true –
- SWEP.AutoSwitchFrom = false –
- SWEP.Spawnable = true –
- SWEP.AdminSpawnable = true –
- –SWEP.AutoReload = true –
- – Weapon info
- SWEP.Author = “Frizzy” –
- SWEP.Contact = “Not telling =P” –
- SWEP.Purpose = “it make enemies go bye bye” –
- SWEP.Instructions = “Left Button to do silent weak shots, right to to loud powerful shots.” –
- – Primary fire settings
- SWEP.Primary.Sound = “m4a1-1.wav” –
- SWEP.Primary.Damage = 10 –
- SWEP.Primary.NumShots = 0 –
- SWEP.Primary.Recoil = 0.1 –
- SWEP.Primary.Cone = 0.1 –
- SWEP.Primary.Delay = 0.1 –
- SWEP.Primary.ClipSize = 30 –
- SWEP.Primary.DefaultClip = 0 –
- SWEP.Primary.Tracer = 1 –
- SWEP.Primary.Force = 0.3 –
- SWEP.Primary.TakeAmmoPerBullet = false –
- SWEP.Primary.Automatic = false –
- SWEP.Primary.Ammo = “Pistol” – –
- – Secondary fire settings
- SWEP.Secondary.Sound = “awp-1.wav” –
- SWEP.Secondary.Damage = 40 –
- SWEP.Secondary.NumShots = 1 –
- SWEP.Secondary.Recoil = 10 –
- SWEP.Secondary.Cone = 0 –
- SWEP.Secondary.Delay = 3 –
- SWEP.Secondary.ClipSize = 5 –
- SWEP.Secondary.DefaultClip = 0 –
- SWEP.Secondary.Tracer = 1 –
- SWEP.Secondary.Force = 2 –
- SWEP.Secondary.TakeAmmoPerBullet = true –
- SWEP.Secondary.Automatic = false –
- SWEP.Secondary.Ammo = “357″ – –
- SWEP.Object = “” –
- SWEP.ObjectExplode = false –
- SWEP.ObjectForce = 2500
- –
- –
- function SWEP:Initialize() –
- end
- function SWEP:PrimaryAttack() –
- if ( !self:CanPrimaryAttack() ) then return end –
- self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) –
- self.Owner:MuzzleFlash() –
- self.Owner:SetAnimation( PLAYER_ATTACK1 ) –
- self.Weapon:EmitSound(Sound(self.Primary.Sound)) –
- self.Owner:ViewPunch(Angle( -self.Primary.Recoil, 0, 0 ))
- if ( SERVER ) then
- object = ents.Create(”prop_physics”)
- object:SetKeyValue(”physdamagescale”,”500″)
- if (self.ObjectExplode) then
- object:SetKeyValue(”explodedamage”,”25″)
- object:SetKeyValue(”health”,”500″)
- object:SetKeyValue(”exploderadius”,”150″)
- object:SetKeyValue(”physdamagescale”,”1500″)
- –object:SetColor(255,255,255,255)
- end
- object:SetModel(self.Object)
- object:SetOwner(self.Owner)
- object:SetPos(self.Owner:GetShootPos())
- object:SetAngles(self.Owner:GetAimVector())
- object:Spawn()
- local physobj = object:GetPhysicsObject()
- local force = self.ObjectForce * physobj:GetMass()
- physobj:SetVelocity(self.Owner:GetAimVector() * force)
- undo.Create(”Launched prop”)
- undo.AddEntity(object)
- undo.SetPlayer(self.Owner)
- undo.Finish()
- end
- self:TakePrimaryAmmo(1)
- self:SetNextPrimaryFire( CurTime() + self.Primary.Delay ) –
- end
- function SWEP:SecondaryAttack() – Called when we press secondary fire
- if ( !self:CanSecondaryAttack() ) then return end –
- self.Weapon:SendWeaponAnim( ACT_VM_SECONDARYATTACK ) –
- self.Owner:MuzzleFlash() –
- self.Owner:SetAnimation( PLAYER_ATTACK1 ) –
- self.Weapon:EmitSound(Sound(self.Secondary.Sound)) –
- self.Owner:ViewPunch(Angle( -self.Secondary.Recoil, 0, 0 ))
- if ( SERVER ) then
- object = ents.Create(”prop_physics”)
- object:SetKeyValue(”physdamagescale”,”500″)
- if (self.ObjectExplode) then
- object:SetKeyValue(”explodedamage”,”25″)
- object:SetKeyValue(”health”,”500″)
- object:SetKeyValue(”exploderadius”,”150″)
- object:SetKeyValue(”physdamagescale”,”1500″)
- –object:SetColor(255,255,255,255)
- end
- object:SetModel(self.Object)
- object:SetOwner(self.Owner)
- object:SetPos(self.Owner:GetShootPos())
- object:SetAngles(self.Owner:GetAimVector())
- object:Spawn()
- local physobj = object:GetPhysicsObject()
- local force = self.ObjectForce * physobj:GetMass()
- physobj:SetVelocity(self.Owner:GetAimVector() * force)
- undo.Create(”Launched prop”)
- undo.AddEntity(object)
- undo.SetPlayer(self.Owner)
- undo.Finish()
- end
- self:TakeSecondaryAmmo(1)
- self:SetNextSecondaryFire( CurTime() + self.Secondary.Delay ) –
- end
- function SWEP:Think() –
- end
- function SWEP:Reload() –
- if (self.Weapon:DefaultReload()) then return end –
- self.Weapon:DefaultReload( ACT_VM_RELOAD ) –
- self.Weapon:EmitSound(Sound(self.ReloadSound)) –
- end
- function SWEP:Deploy() –
- self.Weapon:SendWeaponAnim(ACT_VM_DRAW)
- return true
- end
- function SWEP:Holster() –
- return true
- end
- function SWEP:OnRemove() –
- end
- function SWEP:OnRestore() –
- end
- function SWEP:Precache() –
- end
- function SWEP:OwnerChanged() –
- end
- function SWEP:ContextScreenClick( aimvec, mousecode, pressed, ply ) –
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement