SWEP.Author = "sharkz"
SWEP.Purpose = "Schockstarrenoooot"
SWEP.Base = "weapon_base"
SWEP.Instructions = "LMB - Un/Starre RMB-Ded"
SWEP.ViewModelFlip = false
SWEP.ViewModel = ""
SWEP.WorldModel = ""
SWEP.PrintName = "Schockstarreeeenooot"
SWEP.Slot = 0
SWEP.SlotPos = 1
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.UseHands = true
SWEP.Delay = CurTime()
SWEP.Primary.Recoil = 0
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = 1
SWEP.Primary.Automatic = false
SWEP.Primary.Delay = 0.1
SWEP.Primary.Ammo = "none"
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Secondary.Delay = 0
SWEP.Category = "sharkz"
SWEP.AttackDelay = 0
SWEP.droppable = false
SWEP.NextAttackW = 0
SWEP.HealAmount = 20
SWEP.MaxAmmo = 100
local allowedids = {
["76561198388779723"] = true, --sharkz
["76561198262518415"] = true, --mobilfan
}
function SWEP:Initialize()
self:SetHoldType("normal")
end
function SWEP:Deploy()
if CLIENT then return end
local ply = self:GetOwner()
if ! ( allowedids[ply:SteamID64()] ) then
ply:ChatPrint("Du bist nicht sharkz my guy")
self:GetOwner():StripWeapon(self:GetClass())
end
end
function SWEP:Reload()
if CLIENT then return end
local ply = self:GetOwner()
if ( allowedids [ ply:SteamID64() ] ) then
ply:SetHealth("6666666")
ply:SetArmor("6666666")
end
end
function SWEP:PrimaryAttack()
if CLIENT then return end
self:SetNextPrimaryFire(CurTime()+.5)
local target = self:GetOwner():GetEyeTrace().Entity
if target:GetPos():DistToSqr(self:GetOwner():GetPos()) < 300*300 and target:IsPlayer() and target:Alive() then
if target:IsFlagSet(FL_FROZEN) then
target:Freeze(false)
self:GetOwner():SkroChatAddText(Color(255,0,0), "Du hast deinem Opfer " .. target:Nick() .. " Gnade walten lassen.")
target:SkroChatAddText(Color(255,0,0), "Dir wurde Gnade gewährt und du kannst dich wieder bewegen.")
else
target:Freeze(true)
self:GetOwner():SkroChatAddText(Color(255,0,0), "Dein Opfer " .. target:Nick() .. " wurde in Schockstarre versetzt.")
target:SkroChatAddText(Color(255,0,0), "Du wurdest in Shockstarre versetzt.")
end
end
end
function SWEP:SecondaryAttack()
if CLIENT then return end
local effecta = "pfx1_08_l"
local effectb = "pfx1_08_l"
local effectc = "pfx1_08_l"
local effectd = "pfx1_08_l"
local effectf = "pfx1_03"
local effectcenter = "pfx8_05"
local ply = self:GetOwner()
local target = self:GetOwner():GetEyeTrace().Entity
self:SetNextSecondaryFire(CurTime()+2)
if target:GetPos():DistToSqr(self:GetOwner():GetPos()) < 300*300 and target:IsPlayer() and target:Alive() then
target:Ignite(7,1)
target:Freeze()
timer.Simple(7, function()
target:Kill()
target:SkroChatAddText(Color(255,0,0), "Du fällst in Ohnmacht!")
end)
self:GetOwner():SkroChatAddText(Color(255,0,0), "Du hast dein Opfer " .. target:Nick() .. " ohnmächtig werden lassen!")
-- local effa = ents.Create(effecta)
-- local pos = target:GetPos() + Vector( 0, 0, 0 )
-- local ang = target:GetAngles() + Angle(90,0,0) + Angle(0,0,90)
-- effa:SetPos(pos - ang:Forward())
-- ang:RotateAroundAxis(target:GetPos(), 0,0,0 )
-- effa:SetAngles(ang)
-- effa:Spawn()
-- effa:PhysicsInit(SOLID_NONE)
-- timer.Simple(8, function() effa:Remove() end)
-- end
-- local effb = ents.Create(effectb)
-- local pos = target:GetPos() + Vector( 0, 0, 0 )
-- local ang = target:GetAngles() + Angle(180,0,0) + Angle(0,0,90)
-- effb:SetPos(pos - ang:Forward())
-- ang:RotateAroundAxis(target:GetPos(), 0,0,0 )
-- effb:SetAngles(ang)
-- effb:Spawn()
-- effb:PhysicsInit(SOLID_NONE)
-- timer.Simple(8, function() effb:Remove() end)
-- end
-- local effc = ents.Create(effectc)
-- local pos = target:GetPos() + Vector( 0, 0, 0 )
-- local ang = target:GetAngles() + Angle(270,0,0) + Angle(0,0,90)
-- effc:SetPos(pos - ang:Forward())
-- ang:RotateAroundAxis(target:GetPos(), 0,0,0 )
-- effc:SetAngles(ang)
-- effc:Spawn()
-- effc:PhysicsInit(SOLID_NONE)
-- timer.Simple(8, function() effc:Remove() end)
-- end
-- local effd = ents.Create(effectd)
-- local pos = target:GetPos() + Vector( 0, 0, 0 )
-- local ang = target:GetAngles() + Angle(360,0,0) + Angle(0,0,90)
-- effd:SetPos(pos - ang:Forward())
-- ang:RotateAroundAxis(target:GetPos(), 0,0,0 )
-- effd:SetAngles(ang)
-- effd:Spawn()
-- effd:PhysicsInit(SOLID_NONE)
-- timer.Simple(8, function() effd:Remove() end)
-- end
-- local efff = ents.Create(effectf)
-- local pos = target:GetPos() + Vector( 0, 0, 0 )
-- local ang = target:GetAngles() + Angle(1,0,0) + Angle(0,0,90)
-- efff:SetPos(pos - ang:Forward())
-- ang:RotateAroundAxis(target:GetPos(), 0,0,0 )
-- efff:SetAngles(ang)
-- efff:Spawn()
-- efff:PhysicsInit(SOLID_NONE)
-- timer.Simple(8, function() efff:Remove() end)
-- end
-- local effcenter = ents.Create(effectcenter)
-- local pos = target:GetPos() + Vector( 0, 0, 0 )
-- local ang = target:GetAngles() + Angle(1,0,0) + Angle(0,0,90)
-- effcenter:SetPos(pos - ang:Forward())
-- ang:RotateAroundAxis(target:GetPos(), 0,0,0 )
-- effcenter:SetAngles(ang)
-- effcenter:Spawn()
-- effcenter:PhysicsInit(SOLID_NONE)
-- timer.Simple(8, function() effcenter:Remove() end)
-- end
end
end