Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- Powers was created by Walrusking(STEAM_0:0:103519394)
- **/
- local power_weapons_enable = CreateConVar("powers_weapons_enabled","1",{FCVAR_NOTIFY, FCVAR_ARCHIVE})
- AddCSLuaFile()
- SWEP.PrintName = "Base Powers"
- SWEP.Author = "Walrusking"
- SWEP.Instructions = "Press your Use key(Default E) to use special attack."
- SWEP.Category = "Powers"
- SWEP.Spawnable = false -- true
- SWEP.AdminOnly = false
- SWEP.UseHands = true
- SWEP.ViewModel = "models/weapons/c_arms_cstrike.mdl"
- SWEP.WorldModel = "models/Items/combine_rifle_ammo01.mdl"
- SWEP.Base = "weapon_base"
- SWEP.Slot = 1
- SWEP.SlotPos = 3
- SWEP.Primary.Ammo = ""
- SWEP.Primary.ClipSize = -1
- SWEP.Primary.DefaultClip = -1
- SWEP.Primary.Automatic = false
- SWEP.Secondary.ClipSize = -1
- SWEP.Secondary.DefaultClip = -1
- SWEP.Secondary.Automatic = false
- SWEP.Secondary.Ammo = "none"
- SWEP.DrawCrosshair = true
- function SWEP:DrawHUD()
- draw.SimpleText(LocalPlayer():GetNWString(LocalPlayer():Nick() .. "needsnamecooldown", ""), "Main_Text", 8,40, Color(255,0,0,255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
- draw.SimpleText(LocalPlayer():GetNWString(LocalPlayer():Nick() .. "needsnamecooldown", ""), "Main_Text", 8,60, Color(255,0,0,255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
- end
- /* BASE COOLDOWN
- timer.Create("cooldown_base"..self.Owner:Nick(), 1, 1, function()
- if SERVER then self.Owner:SetNWString(self.Owner:Nick() .. "needsnamecooldown", "") end
- end)
- */
- function SWEP:PrimaryAttack()
- if power_weapons_enable:GetBool() then
- local basesound = Sound("buttons/combine_button1.wav")
- if self.Owner:GetInfoNum("powers_sounds", 1) == 1 then
- self:EmitSound( basesound )
- end
- /*************
- CODE GOES HERE
- **************/
- else
- self.Owner:ChatPrint("This weapon is currently disabled.")
- end
- end
- function SWEP:SecondaryAttack()
- if power_weapons_enable:GetBool() then
- local basesoundtwo = Sound("items/smallmedkit1.wav")
- if self.Owner:GetInfoNum("powers_sounds", 1) == 1 then
- self:EmitSound( basesoundtwo )
- end
- /*************
- CODE GOES HERE
- **************/
- else
- self.Owner:ChatPrint("This weapon is currently disabled.")
- end
- end
- function SWEP:Reload()
- end
- function SWEP:Deploy()
- if power_weapons_enable:GetBool() then
- else
- self.Owner:ChatPrint("This weapon is currently disabled.")
- end
- return true
- end
- function SWEP:Holster()
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement