mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 05:13:02 +05:00
sort weapons and change names
This commit is contained in:
parent
d5ad410759
commit
54e2e82901
5 changed files with 47 additions and 40 deletions
|
@ -22,7 +22,7 @@ SWEP.Secondary.Ammo = "none"
|
|||
|
||||
SWEP.UseHands = true
|
||||
|
||||
SWEP.Spawnable = true
|
||||
SWEP.Spawnable = false
|
||||
SWEP.BobScale = 0
|
||||
SWEP.SwayScale = 0
|
||||
SWEP.ViewModelFOV = 70
|
||||
|
@ -30,6 +30,7 @@ SWEP.ViewModelFOV = 70
|
|||
SWEP.PrintName = "357"
|
||||
SWEP.Author = "datae"
|
||||
SWEP.Instructions = ""
|
||||
SWEP.Category = "Beatrun"
|
||||
|
||||
SWEP.BulletData = {}
|
||||
SWEP.Damage = 150
|
||||
|
|
|
@ -27,9 +27,10 @@ SWEP.BobScale = 0
|
|||
SWEP.SwayScale = 0
|
||||
SWEP.ViewModelFOV = 70
|
||||
|
||||
SWEP.PrintName = "AE"
|
||||
SWEP.PrintName = "Beatrun SMG?"
|
||||
SWEP.Author = "datae"
|
||||
SWEP.Instructions = ""
|
||||
SWEP.Category = "Beatrun"
|
||||
|
||||
SWEP.BulletData = {}
|
||||
SWEP.Damage = 15
|
||||
|
|
|
@ -22,14 +22,15 @@ SWEP.Secondary.DefaultClip = -1
|
|||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.Ammo = "none"
|
||||
|
||||
SWEP.Spawnable = true
|
||||
SWEP.Spawnable = false
|
||||
SWEP.BobScale = 0
|
||||
SWEP.SwayScale = 0
|
||||
SWEP.ViewModelFOV = 70
|
||||
|
||||
SWEP.PrintName = "AE"
|
||||
SWEP.PrintName = "idk"
|
||||
SWEP.Author = "datae"
|
||||
SWEP.Instructions = ""
|
||||
SWEP.Category = "Beatrun"
|
||||
|
||||
SWEP.BulletData = {}
|
||||
SWEP.Damage = 15
|
||||
|
|
|
@ -16,7 +16,7 @@ if CLIENT then
|
|||
end)
|
||||
end
|
||||
|
||||
SWEP.Author = ""
|
||||
SWEP.Author = "datae"
|
||||
SWEP.Contact = ""
|
||||
SWEP.Purpose = ""
|
||||
SWEP.Instructions = ""
|
||||
|
@ -28,9 +28,9 @@ SWEP.HoldType = "fist"
|
|||
|
||||
SWEP.Spawnable = true
|
||||
SWEP.AdminSpawnable = true
|
||||
SWEP.Category = "Beatrun"
|
||||
|
||||
|
||||
--[[Just don't draw the hands, we don't need 'em]]
|
||||
-- Just don't draw the hands, we don't need 'em
|
||||
SWEP.UseHands = false
|
||||
|
||||
SWEP.ViewModel = "models/runnerhands.mdl"
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
SWEP.PrintName = "X"
|
||||
SWEP.PrintName = "ShapeDrawer"
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 1
|
||||
SWEP.DrawAmmo = false
|
||||
SWEP.DrawCrosshair = true
|
||||
|
||||
|
||||
SWEP.Author = ""
|
||||
SWEP.Author = "datae"
|
||||
SWEP.Contact = ""
|
||||
SWEP.Purpose = ""
|
||||
SWEP.Instructions = ""
|
||||
|
@ -43,6 +42,7 @@ function SWEP:Deploy()
|
|||
self:CallOnClient("Deploy")
|
||||
self:SetHoldType(self.HoldType)
|
||||
self:SendWeaponAnim(ACT_VM_DRAW)
|
||||
|
||||
self.points = {}
|
||||
self.center = Vector()
|
||||
end
|
||||
|
@ -51,10 +51,8 @@ function SWEP:Initialize()
|
|||
end
|
||||
|
||||
function SWEP:Think()
|
||||
|
||||
end
|
||||
|
||||
|
||||
function SWEP:Holster()
|
||||
return true
|
||||
end
|
||||
|
@ -64,13 +62,15 @@ end
|
|||
|
||||
function SWEP:Reload()
|
||||
self:CallOnClient("Reload")
|
||||
|
||||
table.Empty(self.points)
|
||||
end
|
||||
|
||||
function SWEP:PrimaryAttack()
|
||||
self:CallOnClient("PrimaryAttack")
|
||||
local ply = self.Owner
|
||||
if !self.points[#self.points] or (ply:EyePos()+ply:EyeAngles():Forward()*50):Distance(self.points[#self.points]) > 5 then
|
||||
|
||||
if not self.points[#self.points] or (ply:EyePos() + ply:EyeAngles():Forward() * 50):Distance(self.points[#self.points]) > 5 then
|
||||
table.insert(self.points, ply:EyePos() + ply:EyeAngles():Forward() * 50)
|
||||
end
|
||||
end
|
||||
|
@ -78,17 +78,21 @@ end
|
|||
|
||||
function SWEP:SecondaryAttack()
|
||||
self:CallOnClient("SecondaryAttack")
|
||||
|
||||
local ply = self.Owner
|
||||
|
||||
self.center:Set(ply:GetEyeTrace().HitPos)
|
||||
end
|
||||
|
||||
hook.Add("PostDrawTranslucentRenderables", "ShapeGun", function()
|
||||
local ply = Entity(1)
|
||||
local wep = ply:GetActiveWeapon() or nil
|
||||
|
||||
if IsValid(wep) and wep:GetClass() == "shapedrawer" then
|
||||
for k, v in ipairs(wep.points) do
|
||||
render.DrawWireframeBox(v, angle_zero, Vector(-1, -1, -1), Vector(1, 1, 1))
|
||||
end
|
||||
|
||||
render.DrawWireframeBox(wep.center, angle_zero, Vector(-2, -2, -2), Vector(2, 2, 2))
|
||||
end
|
||||
end)
|
Loading…
Reference in a new issue