Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //General Settings\\
- SWEP.AdminSpawnable = true // Is the swep spawnable for admin
- SWEP.ViewModelFOV = 64 // How much of the weapon you see ?
- SWEP.ViewModel = "models/weapons/v_irifle.mdl" // The viewModel, the model you se when you are holding it-.-
- SWEP.WorldModel = "models/weapons/w_irifle.mdl" // The worldmodel, The model yu when it's down on the ground
- SWEP.AutoSwitchTo = true
- SWEP.Slot = 6
- SWEP.HoldType = "ar2" // How the swep is hold Pistol smg greanade melee
- SWEP.PrintName = "plasmagun" // your sweps name
- SWEP.Author = "Nicholas Beatrice" // Your name
- SWEP.Spawnable = true // Can everybody spawn this swep ? - If you want only admin keep this false and adminsapwnable true.
- SWEP.AutoSwitchFrom = false // Does the weapon get changed by other sweps you pick them up ?
- SWEP.FiresUnderwater = false // Does your swep fire under water ?
- SWEP.Weight = 5 // Chose the weight of the Swep
- SWEP.DrawCrosshair = true // Do you want it to have a crosshair ?
- SWEP.Category = "Doom: Source" // Make your own catogory for the swep
- SWEP.SlotPos = 1 // Deside wich slot you want your swep be in 1 2 3 4 5 6
- SWEP.DrawAmmo = true // Does the ammo show up when you are using it ? True / False
- SWEP.ReloadSound = "Weapon_Pistol.Reload" // Reload sound, you can use the default ones, or you can use your one; Example; "sound/myswepreload.waw"
- SWEP.Instructions = "Lead your shots and you'll be a dead shot in no time. " // How pepole use your swep ?
- SWEP.base = "weapon_base"
- //General Info\\
- SWEP.Primary.Sound = "doomsource/weapons/plasma.wav" // The sound that plays when you shoot :]
- SWEP.Primary.Damage = 30 // How much damage the swep is doing
- SWEP.Primary.TakeAmmo = 1 // How much ammo does it take for each shot ?
- SWEP.Primary.ClipSize = 30 // The clipsize
- SWEP.Primary.Ammo = "pistol" // ammmo type pistol/ smg1
- SWEP.Primary.DefaultClip = 30 // How much ammo does the swep come with `?
- SWEP.Primary.Spread = 0.1 // Does the bullets spread all over, you want it fire exactly where you are aiming leave it o.1
- SWEP.Primary.NumberofShots = 1 // How many bullets you are firing each shot.
- SWEP.Primary.Automatic = true // Is the swep automatic ?
- SWEP.Primary.Recoil = 0 // How much we should punch the view
- SWEP.Primary.Delay = .125 // How long time before you can fire again
- SWEP.Primary.Force = 50 // The force of the shot
- SWEP.Secondary.Automatic = false
- function SWEP:Initialize()
- self.Plasma = "ent_plasma"
- end
- function SWEP:PrimaryAttack()
- local tr = self.Owner:GetEyeTrace()
- if ( !self:CanPrimaryAttack() ) then return end
- self.Weapon:TakePrimaryAmmo( 1 )
- self.Weapon:EmitSound(self.Primary.Sound)
- self.Weapon:SetNextPrimaryFire(CurTime() + self.Primary.Delay)
- local ent = ents.Create(self.Plasma)
- local PlayerAim = self.Owner:GetAimVector()
- local phys = ent:GetPhysicsObject()
- local shot_length = tr.HitPos:Length()
- self.Force =15000 //velocity of object
- self.Weapon:SendWeaponAnim(ACT_VM_PRIMARYATTACK)
- self.Owner:SetAnimation(PLAYER_ATTACK1)
- end
- function SWEP:SecondaryAttack()
- self.Weapon:SetNextSecondaryFire(CurTime() + 0.3)
- self.Plasma = "ent_plasma"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement