Advertisement
Guest User

Untitled

a guest
May 20th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. /**
  2.  
  3. Powers was created by Walrusking(STEAM_0:0:103519394)
  4.  
  5. **/
  6.  
  7. local power_weapons_enable = CreateConVar("powers_weapons_enabled","1",{FCVAR_NOTIFY, FCVAR_ARCHIVE})
  8.  
  9. AddCSLuaFile()
  10.  
  11. SWEP.PrintName = "Base Powers"
  12. SWEP.Author = "Walrusking"
  13. SWEP.Instructions = "Press your Use key(Default E) to use special attack."
  14. SWEP.Category = "Powers"
  15. SWEP.Spawnable = false -- true
  16. SWEP.AdminOnly = false
  17. SWEP.UseHands = true
  18. SWEP.ViewModel = "models/weapons/c_arms_cstrike.mdl"
  19. SWEP.WorldModel = "models/Items/combine_rifle_ammo01.mdl"
  20. SWEP.Base = "weapon_base"
  21. SWEP.Slot = 1
  22. SWEP.SlotPos = 3
  23. SWEP.Primary.Ammo = ""
  24. SWEP.Primary.ClipSize = -1
  25. SWEP.Primary.DefaultClip = -1
  26. SWEP.Primary.Automatic = false
  27. SWEP.Secondary.ClipSize = -1
  28. SWEP.Secondary.DefaultClip = -1
  29. SWEP.Secondary.Automatic = false
  30. SWEP.Secondary.Ammo = "none"
  31. SWEP.DrawCrosshair = true
  32.  
  33. function SWEP:DrawHUD()
  34. draw.SimpleText(LocalPlayer():GetNWString(LocalPlayer():Nick() .. "needsnamecooldown", ""), "Main_Text", 8,40, Color(255,0,0,255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
  35. draw.SimpleText(LocalPlayer():GetNWString(LocalPlayer():Nick() .. "needsnamecooldown", ""), "Main_Text", 8,60, Color(255,0,0,255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
  36. end
  37.  
  38. /* BASE COOLDOWN
  39.  
  40. timer.Create("cooldown_base"..self.Owner:Nick(), 1, 1, function()
  41. if SERVER then self.Owner:SetNWString(self.Owner:Nick() .. "needsnamecooldown", "") end
  42. end)
  43.  
  44. */
  45.  
  46. function SWEP:PrimaryAttack()
  47. if power_weapons_enable:GetBool() then
  48. local basesound = Sound("buttons/combine_button1.wav")
  49. if self.Owner:GetInfoNum("powers_sounds", 1) == 1 then
  50. self:EmitSound( basesound )
  51. end
  52. /*************
  53. CODE GOES HERE
  54. **************/
  55. else
  56. self.Owner:ChatPrint("This weapon is currently disabled.")
  57. end
  58. end
  59.  
  60. function SWEP:SecondaryAttack()
  61. if power_weapons_enable:GetBool() then
  62. local basesoundtwo = Sound("items/smallmedkit1.wav")
  63. if self.Owner:GetInfoNum("powers_sounds", 1) == 1 then
  64. self:EmitSound( basesoundtwo )
  65. end
  66. /*************
  67. CODE GOES HERE
  68. **************/
  69. else
  70. self.Owner:ChatPrint("This weapon is currently disabled.")
  71. end
  72. end
  73.  
  74. function SWEP:Reload()
  75. end
  76.  
  77. function SWEP:Deploy()
  78. if power_weapons_enable:GetBool() then
  79. else
  80. self.Owner:ChatPrint("This weapon is currently disabled.")
  81. end
  82. return true
  83. end
  84.  
  85. function SWEP:Holster()
  86. return true
  87. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement