Advertisement
Guest User

Untitled

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