This commit is contained in:
lifestorm
2024-08-04 22:55:00 +03:00
parent 8064ba84d8
commit 73479cff9e
7338 changed files with 1718883 additions and 14 deletions

View File

@@ -0,0 +1,83 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
include("shared.lua")
DEFINE_BASECLASS( SWEP.Base )
SWEP.StatTrakBoneCheck = false
SWEP.NameTagBoneCheck = false
function SWEP:PreDrawViewModel(vm, wep, ply)
if not self.StatTrakBoneCheck and IsValid(vm) then
if not self.NoStattrak and self.VElements["stattrak"].bonemerge and not vm:LookupBone("v_weapon.stattrack") then
self.NoStattrak = true
end
self.StatTrakBoneCheck = true
end
if not self.NameTagBoneCheck and IsValid(vm) then
if not self.NoNametag and self.VElements["nametag"].bonemerge and not vm:LookupBone("v_weapon.uid") then
self.NoNametag = true
end
self.NameTagBoneCheck = true
end
return BaseClass.PreDrawViewModel(self, vm, wep, ply)
end
local cv_dropmags = GetConVar("cl_tfa_csgo_magdrop") or CreateClientConVar("cl_tfa_csgo_magdrop", "1", true, true, "Drop magazine on weapon reload?")
local cv_maglife = GetConVar("cl_tfa_csgo_maglife") or CreateClientConVar("cl_tfa_csgo_maglife", "15",true,true, "Magazine Lifetime")
SWEP.MagLifeTime = 15
function SWEP:DropMag()
if not cv_dropmags or not cv_dropmags:GetBool() then return end
if not cv_maglife then
cv_maglife = GetConVar("cl_tfa_csgo_maglifelife")
end
if cv_life then
self.LifeTime = cv_life:GetInteger()
end
if not self.MagModel then return end
local mag = ents.CreateClientProp()
mag:SetModel(self.MagModel)
mag:SetMaterial(self:GetMaterial())
for i = 1, #self:GetMaterials() do
mag:SetSubMaterial(i - 1, self:GetSubMaterial(i - 1))
end -- full skin support
local pos, ang = self:GetPos(), self:GetAngles()
if self:IsFirstPerson() and self:VMIV() then
local vm = self.OwnerViewModel
ang = vm:GetAngles()
pos = vm:GetPos() - ang:Up() * 8
end
mag:SetPos(pos)
mag:SetAngles(ang)
mag:PhysicsInit(SOLID_VPHYSICS)
mag:PhysWake()
mag:SetMoveType(MOVETYPE_VPHYSICS) -- we call it AFTER physics init
mag:Spawn()
SafeRemoveEntityDelayed(mag, self.MagLifeTime)
end

View File

@@ -0,0 +1,25 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include("shared.lua")
function SWEP:DropMag()
net.Start("TFA_CSGO_DropMag", true)
net.WriteEntity(self)
if sp then
net.Broadcast()
else
net.SendOmit(self:GetOwner())
end
end

View File

@@ -0,0 +1,346 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
DEFINE_BASECLASS("tfa_gun_base")
SWEP.Skins = {}
SWEP.Skin = ""
SWEP.Callback = {}
SWEP.VMPos = Vector(0.879, 0.804, -1)
SWEP.VMPos_Additive = false --Set to false for an easier time using VMPos. If true, VMPos will act as a constant delta ON TOP OF ironsights, run, whateverelse
SWEP.ProceduralHolsterEnabled = true
SWEP.ProceduralHolsterTime = 0.0
SWEP.ProceduralHolsterPos = Vector(0, 0, 0)
SWEP.ProceduralHolsterAng = Vector(0, 0, 0)
SWEP.NoStattrak = false
SWEP.NoNametag = false
SWEP.TracerCount = 1
SWEP.TracerName = "tfa_tracer_csgo" -- Change to a string of your tracer name. Can be custom. There is a nice example at https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/base/entities/effects/tooltracer.lua
SWEP.TracerDelay = 0.0 --Delay for lua tracer effect
SWEP.IsTFACSGOWeapon = true
--These are particle effects INSIDE a pcf file, not PCF files, that are played when you shoot.
SWEP.SmokeParticles = {
pistol = "weapon_muzzle_smoke",
smg = "weapon_muzzle_smoke",
grenade = "weapon_muzzle_smoke",
ar2 = "weapon_muzzle_smoke_long",
shotgun = "weapon_muzzle_smoke_long",
rpg = "weapon_muzzle_smoke",
physgun = "weapon_muzzle_smoke",
crossbow = "weapon_muzzle_smoke",
melee = "weapon_muzzle_smoke",
slam = "weapon_muzzle_smoke",
normal = "weapon_muzzle_smoke",
melee2 = "weapon_muzzle_smoke",
knife = "weapon_muzzle_smoke",
duel = "weapon_muzzle_smoke",
camera = "weapon_muzzle_smoke",
magic = "weapon_muzzle_smoke",
revolver = "weapon_muzzle_smoke",
silenced = "weapon_muzzle_smoke"
}
TFA = TFA or {}
TFA.CSGO = TFA.CSGO or {}
TFA.CSGO.Skins = TFA.CSGO.Skins or {}
function SWEP:Initialize()
BaseClass.Initialize(self)
self:ReadSkin()
if SERVER then
self:CallOnClient("ReadSkin", "")
end
end
local bgcolor = Color(0, 0, 0, 255 * 0.78)
local btntextcol = Color(191, 191, 191, 255 * 0.9)
local btntextdisabledcol = Color(63, 63, 63, 255 * 0.9)
local emptyFunc = function() end
local SkinMenuFrame
local sp = game.SinglePlayer()
function SWEP:AltAttack()
if sp and SERVER then self:CallOnClient("AltAttack") return end
if not CLIENT or IsValid(SkinMenuFrame) then return end
SkinMenuFrame = vgui.Create("DFrame")
SkinMenuFrame:SetSkin("Default")
SkinMenuFrame:SetSize(320, 24 + 64 * 3 + 5 * 4)
SkinMenuFrame:Center()
SkinMenuFrame:ShowCloseButton(false)
SkinMenuFrame:SetDraggable(false)
SkinMenuFrame:SetTitle("TFA CS:GO Weapon Actions")
SkinMenuFrame:MakePopup()
SkinMenuFrame.Paint = function(myself, wv, hv)
local x, y = myself:GetPos()
render.SetScissorRect(x, y, x + wv, y + hv, true)
Derma_DrawBackgroundBlur(myself)
render.SetScissorRect(0, 0, 0, 0, false)
draw.NoTexture()
surface.SetDrawColor(bgcolor)
surface.DrawRect(0, 0, wv, hv)
end
local btnSkinPicker = vgui.Create("DButton", SkinMenuFrame)
btnSkinPicker:SetTall(64)
btnSkinPicker:DockMargin(0, 0, 0, 5)
btnSkinPicker:Dock(TOP)
btnSkinPicker:SetFont("DermaLarge")
btnSkinPicker:SetTextColor(btntextcol)
btnSkinPicker.Paint = emptyFunc
btnSkinPicker:SetText("Change Skin")
btnSkinPicker.DoClick = function(btn, value)
RunConsoleCommand("cl_tfa_csgo_vgui_skinpicker")
SkinMenuFrame:Close()
end
local btnNamePicker = vgui.Create("DButton", SkinMenuFrame)
btnNamePicker:SetTall(64)
btnNamePicker:DockMargin(0, 0, 0, 5)
btnNamePicker:Dock(TOP)
btnNamePicker:SetFont("DermaLarge")
btnNamePicker:SetTextColor(btntextcol)
btnNamePicker.Paint = emptyFunc
btnNamePicker:SetText("Change Nametag")
if self.NoNametag then
btnNamePicker:SetDisabled(true)
btnNamePicker:SetTextColor(btntextdisabledcol)
btnNamePicker:SetCursor("no")
end
btnNamePicker.DoClick = function(btn, value)
RunConsoleCommand("cl_tfa_csgo_vgui_namepicker")
SkinMenuFrame:Close()
end
local btnClose = vgui.Create("DButton", SkinMenuFrame)
btnClose:SetTall(64)
btnClose:DockMargin(0, 0, 0, 0)
btnClose:Dock(BOTTOM)
btnClose:SetFont("DermaLarge")
btnClose:SetTextColor(btntextcol)
btnClose.Paint = emptyFunc
btnClose:SetText("Close")
btnClose.DoClick = function(btn, value)
SkinMenuFrame:Close()
end
end
function SWEP:SaveSkin()
if CLIENT then
if not file.Exists("tfa_csgo/", "DATA") then
file.CreateDir("tfa_csgo")
end
local f = file.Open("tfa_csgo/" .. self:GetClass() .. ".txt", "w", "DATA")
f:Write(self.Skin and self.Skin or "")
f:Flush()
end
end
function SWEP:SyncToServerSkin(skin)
if not skin or string.len(skin) <= 0 then
skin = self.Skin
end
if not skin then return end
if not CLIENT then return end
-- net.Start("TFA_CSGO_SKIN", true)
-- net.WriteEntity(self)
-- net.WriteString(skin)
-- net.SendToServer()
end
function SWEP:LoadSkinTable()
if true then return end
local cl = self:GetClass()
if TFA.CSGO.Skins[cl] then
for k, v in pairs(TFA.CSGO.Skins[cl]) do
self.Skins[k] = v
end
end
end
function SWEP:ReadSkin()
if CLIENT then
self:LoadSkinTable()
local cl = self:GetClass()
local path = "tfa_csgo/" .. cl .. ".txt"
if file.Exists(path, "DATA") then
local f = file.Read(path, "DATA")
if f and v ~= "" then
self.Skin = f
end
end
self:SetNWString("skin", self.Skin)
self:SyncToServerSkin()
end
self:UpdateSkin()
end
function SWEP:UpdateSkin()
if (CLIENT and IsValid(LocalPlayer()) and LocalPlayer() ~= self.Owner) or SERVER then
self:SetMaterial("")
self.Skin = self:GetNWString("skin")
if self.Skins and self.Skins[self.Skin] and self.Skins[self.Skin].tbl then
self:SetSubMaterial(nil, nil)
for k, str in ipairs(self.Skins[self.Skin].tbl) do
if type(str) == "string" then
self:SetSubMaterial(k - 1, str)
return
end
end
self:ClearMaterialCache()
end
end
if not self.Skin then
self.Skin = ""
end
if self.Skin and self.Skins and self.Skins[self.Skin] then
self.MaterialTable = self.Skins[self.Skin].tbl
for l, b in pairs(self.MaterialTable) do
TFA.CSGO.LoadCachedVMT(string.sub(b, 2))
print("Requesting skin #" .. l .. "//" .. string.sub(b, 2))
end
self:ClearMaterialCache()
end
end
SWEP.LerpLight = Vector(1, 1, 1)
SWEP.VElements = {
["nametag"] = { type = "Model", model = "models/weapons/tfa_csgo/uid.mdl", bone = "", rel = "", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bonemerge = true, bodygroup = {}, active = true },
["stattrak"] = { type = "Model", model = "models/weapons/tfa_csgo/stattrack.mdl", bone = "", rel = "", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bonemerge = true, bodygroup = {}, active = true },
}
local stattrak_cv = GetConVar("cl_tfa_csgo_stattrack") or CreateClientConVar("cl_tfa_csgo_stattrack", 1, true, true)
local dostattrak
function SWEP:UpdateStattrak()
if not CLIENT or not self.VElements["stattrak"] then return end
dostattrak = stattrak_cv:GetBool() and not self.NoStattrak
local statname = "VElements.stattrak.active"
if self:GetStat(statname) ~= dostattrak then
self.VElements["stattrak"].active = dostattrak
self:ClearStatCache(statname)
end
end
local nametag_cv = GetConVar("cl_tfa_csgo_nametag") or CreateClientConVar("cl_tfa_csgo_nametag", 1, true, true)
local donametag
function SWEP:UpdateNametag()
if not CLIENT or not self.VElements["nametag"] then return end
donametag = nametag_cv:GetBool() and not self.NoNametag
local statname = "VElements.nametag.active"
if self:GetStat(statname) ~= donametag then
self.VElements["nametag"].active = donametag
self:ClearStatCache(statname)
end
end
local shells_cv = GetConVar("cl_tfa_csgo_2dshells") or CreateClientConVar("cl_tfa_csgo_2dshells", 1, true, true)
local shellsoverride
function SWEP:UpdateShells()
if SERVER then
shellsoverride = (IsValid(self:GetOwner()) and self:GetOwner():IsPlayer() and self:GetOwner():GetInfoNum(shells_cv:GetName(), 0) > 0) and "tfa_shell_csgo" or nil
else
shellsoverride = shells_cv:GetBool() and "tfa_shell_csgo" or nil
end
local statname = "ShellEffectOverride"
if self:GetStat(statname) ~= shellsoverride then
self.ShellEffectOverride = shellsoverride
self:ClearStatCache(statname)
end
end
function SWEP:MakeShell(...)
self:UpdateShells()
return BaseClass.MakeShell(self, ...)
end
function SWEP:Think2(...)
if ((CLIENT and IsValid(LocalPlayer()) and LocalPlayer() ~= self.Owner) or SERVER) and self.Skin ~= self:GetNWString("skin") then
self.Skin = self:GetNWString("skin")
self:UpdateSkin()
end
self:UpdateStattrak()
self:UpdateNametag()
BaseClass.Think2(self, ...)
end
function SWEP:SetBodyGroupVM(k, v)
if isstring(k) then
local vals = k:Split(" ")
k = vals[1]
v = vals[2]
end
self.Bodygroups_V[k] = v
if SERVER then
self:CallOnClient("SetBodyGroupVM", "" .. k .. " " .. v)
end
end
local cv_chamber = GetConVar("sv_tfa_csgo_chambering") or CreateConVar("sv_tfa_csgo_chambering", 1, CLIENT and {FCVAR_REPLICATED} or {FCVAR_REPLICATED, FCVAR_ARCHIVE, FCVAR_NOTIFY}, "Allow round-in-the-chamber on TFA CS:GO weapons?")
function SWEP:CanChamber(...)
if not cv_chamber:GetBool() then return false end
return BaseClass.CanChamber(self, ...)
end

View File

@@ -0,0 +1,130 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
sound.Add(
{
name = "TFA_CSGO_Flashbang.PullPin_Grenade",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/flashbang/pinpull.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Flashbang.PullPin_Grenade_Start",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/flashbang/pinpull_start.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Flashbang.Explode",
channel = CHAN_WEAPON,
level = 140,
sound = { "weapons/tfa_csgo/flashbang/flashbang_explode1.wav",
"weapons/tfa_csgo/flashbang/flashbang_explode2.wav" }
} )
sound.Add(
{
name = "TFA_CSGO_Flashgrenade.BOOM",
channel = CHAN_WEAPON,
level = 140,
sound = { "weapons/tfa_csgo/flashbang/flashbang_explode1.wav",
"weapons/tfa_csgo/flashbang/flashbang_explode2.wav" }
} )
sound.Add(
{
name = "TFA_CSGO_Flashbang.Bounce",
channel = CHAN_ITEM,
level = 75,
volume = 0.6,
sound = "weapons/tfa_csgo/flashbang/grenade_hit1.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Flashbang.Draw",
channel = CHAN_ITEM,
level = 65,
volume = 0.5,
sound = "weapons/tfa_csgo/flashbang/flashbang_draw.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Flashbang.Throw",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/flashbang/grenade_throw.wav"
} )
SWEP.Category = "TFA CS:GO Grenades"
SWEP.Author = ""
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.Instructions = ""
SWEP.PrintName = "Flashbang" -- Weapon name (Shown on HUD)
SWEP.Slot = 4 -- Slot in the weapon selection menu
SWEP.SlotPos = 40 -- Position in the slot
SWEP.DrawAmmo = true -- Should draw the default HL2 ammo counter
SWEP.DrawWeaponInfoBox = false -- Should draw the weapon info box
SWEP.BounceWeaponIcon = false -- Should the weapon icon bounce?
SWEP.DrawCrosshair = false -- set false if you want no crosshair
SWEP.Weight = 2 -- rank relative ot other weapons. bigger is better
SWEP.AutoSwitchTo = true -- Auto switch to if we pick it up
SWEP.AutoSwitchFrom = true -- Auto switch from if you pick up a better weapon
SWEP.HoldType = "grenade" -- how others view you carrying the weapon
-- normal melee melee2 fist knife smg ar2 pistol rpg physgun grenade shotgun crossbow slam passive
-- you're mostly going to use ar2, smg, shotgun or pistol. rpg and ar2 make for good sniper rifles
SWEP.ViewModelFOV = 55
SWEP.ViewModelFlip = false
SWEP.ViewModel = "models/weapons/tfa_csgo/c_eq_flashbang.mdl" -- Weapon view model
SWEP.WorldModel = "models/weapons/tfa_csgo/w_flash.mdl" -- Weapon world model
SWEP.ShowWorldModel = true
SWEP.Base = "tfa_csnade_base"
SWEP.Spawnable = true
SWEP.UseHands = true
SWEP.AdminSpawnable = true
SWEP.ProceduralHoslterEnabled = true
SWEP.ProceduralHolsterTime = 0.0
SWEP.ProceduralHolsterPos = Vector(0, 0, 0)
SWEP.ProceduralHolsterAng = Vector(0, 0, 0)
SWEP.Primary.RPM = 30 -- This is in Rounds Per Minute
SWEP.Primary.ClipSize = 1 -- Size of a clip
SWEP.Primary.DefaultClip = 1 -- Bullets you start with
SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false
SWEP.Primary.Ammo = "csgo_flash"
-- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun
-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a metal peircing shotgun slug
SWEP.Primary.Damage = 0
SWEP.Primary.Round = ("tfa_csgo_thrownflash") --NAME OF ENTITY GOES HERE
SWEP.Velocity = 750 -- Entity Velocity
SWEP.Velocity_Underhand = 375 -- Entity Velocity
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -2,
Right = 1,
Forward = 3,
},
Ang = {
Up = -1,
Right = -2,
Forward = 178
},
Scale = 1
}
SWEP.MoveSpeed = 245/260 --Multiply the player's movespeed by this.
SWEP.IronSightsMoveSpeed = 245/260*0.8 --Multiply the player's movespeed by this when sighting.

View File

@@ -0,0 +1,166 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
sound.Add(
{
name = "TFA_CSGO_FRAGGRENADE.PullPin_Grenade",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/hegrenade/pinpull.wav"
} )
sound.Add(
{
name = "TFA_CSGO_FRAGGRENADE.PullPin_Grenade_Start",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/hegrenade/pinpull_start.wav"
} )
sound.Add(
{
name = "TFA_CSGO_FRAGGRENADE.Bounce",
channel = CHAN_ITEM,
level = 75,
volume = 0.6,
sound = "weapons/tfa_csgo/hegrenade/he_bounce-1.wav"
} )
sound.Add(
{
name = "TFA_CSGO_FRAGGRENADE.Throw",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/hegrenade/grenade_throw.wav"
} )
sound.Add(
{
name = "TFA_CSGO_FRAGGRENADE.Draw",
channel = CHAN_ITEM,
level = 65,
volume = 0.5,
sound = "weapons/tfa_csgo/hegrenade/he_draw.wav"
} )
sound.Add(
{
name = "TFA_CSGO_HEGrenade.PullPin_Grenade",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/hegrenade/pinpull.wav"
} )
sound.Add(
{
name = "TFA_CSGO_HEGrenade.PullPin_Grenade_Start",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/hegrenade/pinpull_start.wav"
} )
sound.Add(
{
name = "TFA_CSGO_HEGrenade.Bounce",
channel = CHAN_ITEM,
level = 75,
volume = 0.6,
sound = "weapons/tfa_csgo/hegrenade/he_bounce-1.wav"
} )
sound.Add(
{
name = "TFA_CSGO_HEGrenade.Throw",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/hegrenade/grenade_throw.wav"
} )
sound.Add(
{
name = "TFA_CSGO_HEGrenade.Draw",
channel = CHAN_ITEM,
level = 65,
volume = 0.5,
sound = "weapons/tfa_csgo/hegrenade/he_draw.wav"
} )
sound.Add(
{
name = "TFA_CSGO_BaseGrenade.ExplodeOld",
channel = CHAN_WEAPON,
level = 140,
sound = { "weapons/tfa_csgo/hegrenade/explode3.wav",
"weapons/tfa_csgo/hegrenade/explode4.wav",
"weapons/tfa_csgo/hegrenade/explode5.wav" }
} )
sound.Add(
{
name = "TFA_CSGO_BaseGrenade.Explode",
channel = CHAN_WEAPON,
level = 140,
sound = { --"weapons/tfa_csgo/hegrenade/hegrenade_detonate01.wav",
"weapons/tfa_csgo/hegrenade/hegrenade_detonate_02.wav",
"weapons/tfa_csgo/hegrenade/hegrenade_detonate_03.wav" }
} )
SWEP.Category = "TFA CS:GO Grenades"
SWEP.Author = ""
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.Instructions = ""
SWEP.PrintName = "High Explosive Grenade" -- Weapon name (Shown on HUD)
SWEP.Slot = 4 -- Slot in the weapon selection menu
SWEP.SlotPos = 40 -- Position in the slot
SWEP.DrawAmmo = true -- Should draw the default HL2 ammo counter
SWEP.DrawWeaponInfoBox = false -- Should draw the weapon info box
SWEP.BounceWeaponIcon = false -- Should the weapon icon bounce?
SWEP.DrawCrosshair = false -- set false if you want no crosshair
SWEP.Weight = 2 -- rank relative ot other weapons. bigger is better
SWEP.AutoSwitchTo = true -- Auto switch to if we pick it up
SWEP.AutoSwitchFrom = true -- Auto switch from if you pick up a better weapon
SWEP.HoldType = "grenade" -- how others view you carrying the weapon
-- normal melee melee2 fist knife smg ar2 pistol rpg physgun grenade shotgun crossbow slam passive
-- you're mostly going to use ar2, smg, shotgun or pistol. rpg and ar2 make for good sniper rifles
SWEP.ViewModelFOV = 55
SWEP.ViewModelFlip = false
SWEP.ViewModel = "models/weapons/tfa_csgo/c_eq_fraggrenade.mdl" -- Weapon view model
SWEP.WorldModel = "models/weapons/tfa_csgo/w_frag.mdl" -- Weapon world model
SWEP.ShowWorldModel = true
SWEP.Base = "tfa_csnade_base"
SWEP.Spawnable = true
SWEP.UseHands = true
SWEP.AdminSpawnable = true
SWEP.ProceduralHoslterEnabled = true
SWEP.ProceduralHolsterTime = 0.0
SWEP.ProceduralHolsterPos = Vector(0, 0, 0)
SWEP.ProceduralHolsterAng = Vector(0, 0, 0)
SWEP.Primary.RPM = 30 -- This is in Rounds Per Minute
SWEP.Primary.ClipSize = 1 -- Size of a clip
SWEP.Primary.DefaultClip = 1 -- Bullets you start with
SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false
SWEP.Primary.Ammo = "csgo_frag"
-- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun
-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a metal peircing shotgun slug
SWEP.Primary.Round = ("tfa_csgo_thrownfrag") --NAME OF ENTITY GOES HERE
SWEP.Velocity = 750 -- Entity Velocity
SWEP.Velocity_Underhand = 375 -- Entity Velocity
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = 0,
Right = 1,
Forward = 3,
},
Ang = {
Up = -1,
Right = -2,
Forward = 178
},
Scale = 1
}
SWEP.MoveSpeed = 245/260 --Multiply the player's movespeed by this.
SWEP.IronSightsMoveSpeed = 245/260*0.8 --Multiply the player's movespeed by this when sighting.

View File

@@ -0,0 +1,206 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
sound.Add(
{
name = "TFA_CSGO_INCENDGRENADE.Bounce",
channel = CHAN_ITEM,
level = 75,
volume = 0.6,
sound = "weapons/tfa_csgo/incgrenade/inc_grenade_bounce-1.wav"
} )
sound.Add(
{
name = "TFA_CSGO_INCENDGRENADE.PullPin_Grenade_Start",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/incgrenade/pinpull_start.wav"
} )
sound.Add(
{
name = "TFA_CSGO_INCENDGRENADE.PullPin_Grenade",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/incgrenade/pinpull.wav"
} )
sound.Add(
{
name = "TFA_CSGO_INCENDGRENADE.Draw",
channel = CHAN_ITEM,
level = 65,
volume = 0.5,
sound = "weapons/tfa_csgo/incgrenade/inc_grenade_draw.wav"
} )
sound.Add(
{
name = "TFA_CSGO_INCENDGRENADE.Throw",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/incgrenade/inc_grenade_throw.wav"
} )
sound.Add(
{
name = "TFA_CSGO_IncGrenade.Bounce",
channel = CHAN_ITEM,
level = 75,
volume = 0.6,
sound = "weapons/tfa_csgo/incgrenade/inc_grenade_bounce-1.wav"
} )
sound.Add(
{
name = "TFA_CSGO_IncGrenade.PullPin_Grenade_Start",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/incgrenade/pinpull_start.wav"
} )
sound.Add(
{
name = "TFA_CSGO_IncGrenade.PullPin_Grenade",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/incgrenade/pinpull.wav"
} )
sound.Add(
{
name = "TFA_CSGO_IncGrenade.Draw",
channel = CHAN_ITEM,
level = 65,
volume = 0.5,
sound = "weapons/tfa_csgo/incgrenade/inc_grenade_draw.wav"
} )
sound.Add(
{
name = "TFA_CSGO_IncGrenade.Throw",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/incgrenade/inc_grenade_throw.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Inferno.Start_IncGrenade",
channel = CHAN_WEAPON,
level = 95,
sound = { "weapons/tfa_csgo/incgrenade/inc_grenade_detonate_1.wav",
"weapons/tfa_csgo/incgrenade/inc_grenade_detonate_2.wav",
"weapons/tfa_csgo/incgrenade/inc_grenade_detonate_3.wav" }
} )
sound.Add(
{
name = "TFA_CSGO_IncGrenade.Start",
channel = CHAN_WEAPON,
level = 95,
sound = { "weapons/tfa_csgo/incgrenade/inc_grenade_detonate_1.wav",
"weapons/tfa_csgo/incgrenade/inc_grenade_detonate_2.wav",
"weapons/tfa_csgo/incgrenade/inc_grenade_detonate_3.wav" }
} )
SWEP.Category = "TFA CS:GO Grenades"
SWEP.Author = ""
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.Instructions = ""
SWEP.PrintName = "Incendiary Grenade" -- Weapon name (Shown on HUD)
SWEP.Slot = 4 -- Slot in the weapon selection menu
SWEP.SlotPos = 40 -- Position in the slot
SWEP.DrawAmmo = true -- Should draw the default HL2 ammo counter
SWEP.DrawWeaponInfoBox = false -- Should draw the weapon info box
SWEP.BounceWeaponIcon = false -- Should the weapon icon bounce?
SWEP.DrawCrosshair = false -- set false if you want no crosshair
SWEP.Weight = 2 -- rank relative ot other weapons. bigger is better
SWEP.AutoSwitchTo = true -- Auto switch to if we pick it up
SWEP.AutoSwitchFrom = true -- Auto switch from if you pick up a better weapon
SWEP.HoldType = "grenade" -- how others view you carrying the weapon
-- normal melee melee2 fist knife smg ar2 pistol rpg physgun grenade shotgun crossbow slam passive
-- you're mostly going to use ar2, smg, shotgun or pistol. rpg and ar2 make for good sniper rifles
SWEP.ViewModelFOV = 55
SWEP.ViewModelFlip = false
SWEP.ViewModel = "models/weapons/tfa_csgo/c_eq_incendiarygrenade.mdl" -- Weapon view model
SWEP.WorldModel = "models/weapons/tfa_csgo/w_incend.mdl" -- Weapon world model
SWEP.ShowWorldModel = true
SWEP.Base = "tfa_csnade_base"
SWEP.Spawnable = true
SWEP.UseHands = true
SWEP.AdminSpawnable = true
SWEP.ProceduralHoslterEnabled = true
SWEP.ProceduralHolsterTime = 0.0
SWEP.ProceduralHolsterPos = Vector(0, 0, 0)
SWEP.ProceduralHolsterAng = Vector(0, 0, 0)
SWEP.Primary.RPM = 30 -- This is in Rounds Per Minute
SWEP.Primary.ClipSize = 1 -- Size of a clip
SWEP.Primary.DefaultClip = 1 -- Bullets you start with
SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false
SWEP.Primary.Ammo = "csgo_incend"
-- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun
-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a metal peircing shotgun slug
SWEP.Primary.Damage = 100
SWEP.Primary.Round = ("tfa_csgo_thrownincen") --NAME OF ENTITY GOES HERE
SWEP.Velocity = 850 -- Entity Velocity
SWEP.Velocity_Underhand = 375 -- Entity Velocity
SWEP.Delay = 0.05 -- Delay to fire entity
SWEP.Delay_Underhand = 0.2 -- Delay to fire entity
SWEP.MoveSpeed = 245/260 --Multiply the player's movespeed by this.
SWEP.IronSightsMoveSpeed = 245/260*0.8 --Multiply the player's movespeed by this when sighting.
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = 0,
Right = 1.8,
Forward = 3.2,
},
Ang = {
Up = -1,
Right = 5,
Forward = 180
},
Scale = 0.8
}
function SWEP:ChoosePullAnim()
if !self:OwnerIsValid() then return end
self.Owner:SetAnimation(PLAYER_RELOAD)
--self:ResetEvents()
local tanim=ACT_VM_PULLPIN
local success = true
self:SendWeaponAnim(ACT_VM_PULLPIN)
if game.SinglePlayer() then
self:CallOnClient("AnimForce",tanim)
end
self.lastact = tanim
return success, tanim
end
function SWEP:ThrowStart()
if self:Clip1()>0 then
self:ChooseShootAnim()
self:SetNWBool("Ready",false)
local bool = self:GetNWBool("Underhanded",false)
if bool then
timer.Simple(self.Delay_Underhand,function()
if IsValid(self) and self:OwnerIsValid() then self:Throw() end
end)
else
timer.Simple(self.Delay,function()
if IsValid(self) and self:OwnerIsValid() then self:Throw() end
end)
end
end
end

View File

@@ -0,0 +1,212 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
sound.Add(
{
name = "TFA_CSGO_MolotovGrenade.Throw",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/molotov/grenade_throw.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Inferno.Throw",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/molotov/grenade_throw.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Molotov.Throw",
channel = CHAN_STATIC,
level = 65,
sound = "weapons/tfa_csgo/molotov/fire_ignite_2.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Molotov.Extinguish",
channel = CHAN_STATIC,
level = 95,
volume = 0.6,
sound = "weapons/tfa_csgo/molotov/molotov_extinguish.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Inferno.IgniteStart",
channel = CHAN_STATIC,
level = 65,
sound = "weapons/tfa_csgo/molotov/fire_ignite_2.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Molotov.Draw",
channel = CHAN_ITEM,
level = 65,
volume = 0.5,
sound = "weapons/tfa_csgo/molotov/molotov_draw.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Molotov.IdleLoop",
channel = CHAN_WEAPON,
level = 75,
volume = 0.6,
sound = "weapons/tfa_csgo/molotov/fire_idle_loop_1.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Inferno.IdleLoop",
channel = CHAN_WEAPON,
level = 75,
volume = 0.6,
sound = "weapons/tfa_csgo/molotov/fire_idle_loop_1.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Inferno.Start",
channel = CHAN_WEAPON,
level = 95,
sound = { "weapons/tfa_csgo/molotov/molotov_detonate_1.wav",
"weapons/tfa_csgo/molotov/molotov_detonate_2.wav",
"weapons/tfa_csgo/molotov/molotov_detonate_3.wav" }
} )
sound.Add(
{
name = "TFA_CSGO_Inferno.FadeOut",
channel = CHAN_WEAPON,
level = 95,
volume = 0.1,
sound = "weapons/tfa_csgo/molotov/fire_loop_fadeout_01.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Inferno.Loop",
channel = CHAN_AUTO,
level = 75,
volume = 0.5,
sound = "weapons/tfa_csgo/molotov/fire_loop_1.wav"
} )
SWEP.Category = "TFA CS:GO Grenades"
SWEP.Author = ""
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.Instructions = ""
SWEP.PrintName = "Molotov" -- Weapon name (Shown on HUD)
SWEP.Slot = 4 -- Slot in the weapon selection menu
SWEP.SlotPos = 40 -- Position in the slot
SWEP.DrawAmmo = true -- Should draw the default HL2 ammo counter
SWEP.DrawWeaponInfoBox = false -- Should draw the weapon info box
SWEP.BounceWeaponIcon = false -- Should the weapon icon bounce?
SWEP.DrawCrosshair = false -- set false if you want no crosshair
SWEP.Weight = 2 -- rank relative ot other weapons. bigger is better
SWEP.AutoSwitchTo = true -- Auto switch to if we pick it up
SWEP.AutoSwitchFrom = true -- Auto switch from if you pick up a better weapon
SWEP.HoldType = "grenade" -- how others view you carrying the weapon
-- normal melee melee2 fist knife smg ar2 pistol rpg physgun grenade shotgun crossbow slam passive
-- you're mostly going to use ar2, smg, shotgun or pistol. rpg and ar2 make for good sniper rifles
SWEP.ViewModelFOV = 55
SWEP.ViewModelFlip = false
SWEP.ViewModel = "models/weapons/tfa_csgo/c_eq_molotov.mdl" -- Weapon view model
SWEP.WorldModel = "models/weapons/tfa_csgo/w_molotov.mdl" -- Weapon world model
SWEP.ShowWorldModel = true
SWEP.Base = "tfa_csnade_base"
SWEP.Spawnable = true
SWEP.UseHands = true
SWEP.AdminSpawnable = true
SWEP.Primary.RPM = 30 -- This is in Rounds Per Minute
SWEP.Primary.ClipSize = 1 -- Size of a clip
SWEP.Primary.DefaultClip = 1 -- Bullets you start with
SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false
SWEP.Primary.Ammo = "csgo_molly"
-- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun
-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a metal peircing shotgun slug
SWEP.Primary.Damage = 100
SWEP.Primary.Round = ("tfa_csgo_thrownmolotov") --NAME OF ENTITY GOES HERE
SWEP.Velocity = 850 -- Entity Velocity
SWEP.Velocity_Underhand = 375 -- Entity Velocity
SWEP.Delay = 0.05 -- Delay to fire entity
SWEP.Delay_Underhand = 0.2 -- Delay to fire entity
SWEP.MoveSpeed = 245/260 --Multiply the player's movespeed by this.
SWEP.IronSightsMoveSpeed = 245/260*0.8 --Multiply the player's movespeed by this when sighting.
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = 0,
Right = 1.8,
Forward = 3.2,
},
Ang = {
Up = -1,
Right = 5,
Forward = 180
},
Scale = 0.8
}
function SWEP:ChoosePullAnim()
if !self:OwnerIsValid() then return end
self.ParticleCreated = false
if SERVER then
self:EmitSound( "TFA_CSGO_Inferno.IdleLoop" )
end
self.Owner:SetAnimation(PLAYER_RELOAD)
--self:ResetEvents()
local tanim=ACT_VM_PULLPIN
local success = true
self:SendWeaponAnim(ACT_VM_PULLPIN)
if game.SinglePlayer() then
self:CallOnClient("AnimForce",tanim)
end
if IsValid(self) and self:OwnerIsValid() and self.Owner:GetViewModel():GetModel()==self.ViewModel and self.ParticleCreated == false then
ParticleEffectAttach("weapon_molotov_fp",PATTACH_POINT_FOLLOW,self.Owner:GetViewModel(),2)
self.ParticleCreated = true
end
self.lastact = tanim
return success, tanim
end
function SWEP:ThrowStart()
if self:Clip1()>0 then
self:ChooseShootAnim()
self:SetNWBool("Ready",false)
local bool = self:GetNWBool("Underhanded",false)
if bool then
timer.Simple(self.Delay_Underhand,function()
if IsValid(self) and self:OwnerIsValid() then
if SERVER then
self:StopSound( "TFA_CSGO_Inferno.IdleLoop" )
end
self:Throw() end
end)
else
timer.Simple(self.Delay,function()
if IsValid(self) and self:OwnerIsValid() then
if SERVER then
self:StopSound( "TFA_CSGO_Inferno.IdleLoop" )
end
self:Throw()
end
end)
end
self:CleanParticles()
end
end

View File

@@ -0,0 +1,119 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
sound.Add(
{
name = "TFA_CSGO_SmokeGrenade.PullPin_Grenade",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/smokegrenade/pinpull.wav"
} )
sound.Add(
{
name = "TFA_CSGO_SmokeGrenade.PullPin_Grenade_Start",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/smokegrenade/pinpull_start.wav"
} )
sound.Add(
{
name = "TFA_CSGO_SmokeGrenade.Bounce",
channel = CHAN_ITEM,
level = 75,
volume = 0.6,
sound = "weapons/tfa_csgo/smokegrenade/grenade_hit1.wav"
} )
sound.Add(
{
name = "TFA_CSGO_BaseSmokeEffect.Sound",
channel = CHAN_WEAPON,
level = 85,
sound = "weapons/tfa_csgo/smokegrenade/smoke_emit.wav"
} )
sound.Add(
{
name = "TFA_CSGO_SmokeGrenade.Draw",
channel = CHAN_ITEM,
level = 65,
volume = 0.5,
sound = "weapons/tfa_csgo/smokegrenade/smokegrenade_draw.wav"
} )
sound.Add(
{
name = "TFA_CSGO_SmokeGrenade.Throw",
channel = CHAN_WEAPON,
level = 65,
sound = "weapons/tfa_csgo/smokegrenade/grenade_throw.wav"
} )
SWEP.Category = "TFA CS:GO Grenades"
SWEP.Author = ""
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.Instructions = ""
SWEP.PrintName = "Smoke Grenade" -- Weapon name (Shown on HUD)
SWEP.Slot = 4 -- Slot in the weapon selection menu
SWEP.SlotPos = 40 -- Position in the slot
SWEP.DrawAmmo = true -- Should draw the default HL2 ammo counter
SWEP.DrawWeaponInfoBox = false -- Should draw the weapon info box
SWEP.BounceWeaponIcon = false -- Should the weapon icon bounce?
SWEP.DrawCrosshair = false -- set false if you want no crosshair
SWEP.Weight = 2 -- rank relative ot other weapons. bigger is better
SWEP.AutoSwitchTo = true -- Auto switch to if we pick it up
SWEP.AutoSwitchFrom = true -- Auto switch from if you pick up a better weapon
SWEP.HoldType = "grenade" -- how others view you carrying the weapon
-- normal melee melee2 fist knife smg ar2 pistol rpg physgun grenade shotgun crossbow slam passive
-- you're mostly going to use ar2, smg, shotgun or pistol. rpg and ar2 make for good sniper rifles
SWEP.ViewModelFOV = 55
SWEP.ViewModelFlip = false
SWEP.ViewModel = "models/weapons/tfa_csgo/c_eq_smokegrenade.mdl" -- Weapon view model
SWEP.WorldModel = "models/weapons/tfa_csgo/w_smoke.mdl" -- Weapon world model
SWEP.ShowWorldModel = true
SWEP.Base = "tfa_csnade_base"
SWEP.Spawnable = true
SWEP.UseHands = true
SWEP.AdminSpawnable = true
SWEP.ProceduralHoslterEnabled = true
SWEP.ProceduralHolsterTime = 0.0
SWEP.ProceduralHolsterPos = Vector(0, 0, 0)
SWEP.ProceduralHolsterAng = Vector(0, 0, 0)
SWEP.Primary.Damage = 0
SWEP.Primary.RPM = 30 -- This is in Rounds Per Minute
SWEP.Primary.ClipSize = 1 -- Size of a clip
SWEP.Primary.DefaultClip = 1 -- Bullets you start with
SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false
SWEP.Primary.Ammo = "csgo_smoke"
-- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun
-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a metal peircing shotgun slug
SWEP.Primary.Round = ("tfa_csgo_thrownsmoke") --NAME OF ENTITY GOES HERE
SWEP.Velocity = 750 -- Entity Velocity
SWEP.Velocity_Underhand = 375 -- Entity Velocity
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = 0,
Right = 1,
Forward = 3,
},
Ang = {
Up = -1,
Right = -2,
Forward = 178
},
Scale = 1
}
SWEP.MoveSpeed = 245/260 --Multiply the player's movespeed by this.
SWEP.IronSightsMoveSpeed = 245/260*0.8 --Multiply the player's movespeed by this when sighting.

View File

@@ -0,0 +1,122 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
sound.Add(
{
name = "TFA_CSGO_Sensor.Equip",
channel = CHAN_WEAPON,
level = 65,
volume = 0.4,
sound = "weapons/tfa_csgo/sensorgrenade/sensor_equip.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Sensor.Activate",
channel = CHAN_WEAPON,
level = 65,
volume = 0.5,
sound = "weapons/tfa_csgo/sensorgrenade/sensor_arm.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Sensor.Land",
channel = CHAN_STATIC,
level = 65,
volume = 0.7,
sound = "weapons/tfa_csgo/sensorgrenade/sensor_land.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Sensor.WarmupBeep",
channel = CHAN_STATIC,
level = 75,
volume = 0.3,
sound = "weapons/tfa_csgo/sensorgrenade/sensor_detect.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Sensor.DetectPlayer_Hud",
channel = CHAN_STATIC,
level = 65,
volume = 0.5,
sound = "weapons/tfa_csgo/sensorgrenade/sensor_detecthud.wav"
} )
sound.Add(
{
name = "TFA_CSGO_Sensor.Detonate",
channel = CHAN_STATIC,
level = 140,
volume = 1.0,
sound = "weapons/tfa_csgo/sensorgrenade/sensor_explode.wav"
} )
SWEP.Category = "TFA CS:GO Grenades"
SWEP.Author = ""
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.Instructions = ""
SWEP.PrintName = "Tactical Awareness Grenade" -- Weapon name (Shown on HUD)
SWEP.Slot = 4 -- Slot in the weapon selection menu
SWEP.SlotPos = 40 -- Position in the slot
SWEP.DrawAmmo = true -- Should draw the default HL2 ammo counter
SWEP.DrawWeaponInfoBox = false -- Should draw the weapon info box
SWEP.BounceWeaponIcon = false -- Should the weapon icon bounce?
SWEP.DrawCrosshair = false -- set false if you want no crosshair
SWEP.Weight = 2 -- rank relative ot other weapons. bigger is better
SWEP.AutoSwitchTo = true -- Auto switch to if we pick it up
SWEP.AutoSwitchFrom = true -- Auto switch from if you pick up a better weapon
SWEP.HoldType = "grenade" -- how others view you carrying the weapon
-- normal melee melee2 fist knife smg ar2 pistol rpg physgun grenade shotgun crossbow slam passive
-- you're mostly going to use ar2, smg, shotgun or pistol. rpg and ar2 make for good sniper rifles
SWEP.ViewModelFOV = 55
SWEP.ViewModelFlip = false
SWEP.ViewModel = "models/weapons/tfa_csgo/c_sonar_bomb.mdl" -- Weapon view model
SWEP.WorldModel = "models/weapons/tfa_csgo/w_eq_sensorgrenade.mdl" -- Weapon world model
SWEP.ShowWorldModel = true
SWEP.Base = "tfa_csnade_base"
SWEP.Spawnable = true
SWEP.UseHands = true
SWEP.AdminSpawnable = true
SWEP.ProceduralHoslterEnabled = true
SWEP.ProceduralHolsterTime = 0.0
SWEP.ProceduralHolsterPos = Vector(0, 0, 0)
SWEP.ProceduralHolsterAng = Vector(0, 0, 0)
SWEP.Primary.RPM = 30 -- This is in Rounds Per Minute
SWEP.Primary.ClipSize = 1 -- Size of a clip
SWEP.Primary.DefaultClip = 1 -- Bullets you start with
SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false
SWEP.Primary.Ammo = "csgo_sonarbomb"
-- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun
-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a metal peircing shotgun slug
SWEP.Primary.Round = ("tfa_csgo_thrownsonar") --NAME OF ENTITY GOES HERE
SWEP.Velocity = 750 -- Entity Velocity
SWEP.Velocity_Underhand = 375 -- Entity Velocity
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -2,
Right = 1,
Forward = 3,
},
Ang = {
Up = -1,
Right = -2,
Forward = 178
},
Scale = 1
}
SWEP.MoveSpeed = 245/260 --Multiply the player's movespeed by this.
SWEP.IronSightsMoveSpeed = 245/260*0.8 --Multiply the player's movespeed by this when sighting.

View File

@@ -0,0 +1,13 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
include('shared.lua')
SWEP.DisplayFalloff = false

View File

@@ -0,0 +1,14 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')

View File

@@ -0,0 +1,253 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_csgo_base"
DEFINE_BASECLASS(SWEP.Base)
SWEP.NoStattrak = true
SWEP.NoNametag = true
SWEP.MuzzleFlashEffect = ""
SWEP.data = {}
SWEP.data.ironsights = 0
SWEP.Delay = 0.1 -- Delay to fire entity
SWEP.Delay_Underhand = 0.1 -- Delay to fire entity
SWEP.Primary.Round = ("") -- Nade Entity
SWEP.Velocity = 550 -- Entity Velocity
SWEP.Underhanded = false
function SWEP:Initialize()
self.ProjectileEntity = self.ProjectileEntity or self.Primary.Round --Entity to shoot
self.ProjectileVelocity = self.Velocity and self.Velocity or 550 --Entity to shoot's velocity
self.ProjectileModel = nil --Entity to shoot's model
self.ProjectileAngles = nil
-- copied idea from gauss just because WHY THE FUCK NOT
self.GetNW2Bool = self.GetNW2Bool or self.GetNWBool
self.SetNW2Bool = self.SetNW2Bool or self.SetNWBool
self:SetNW2Bool("Charging", false)
self:SetNW2Bool("Ready", false)
self:SetNW2Bool("Underhanded", false)
BaseClass.Initialize(self)
end
function SWEP:Deploy()
if self:Clip1() <= 0 then
if self:Ammo1() <= 0 then
timer.Simple(0, function()
if CLIENT or not IsValid(self) or not self:OwnerIsValid() then return end
self:GetOwner():StripWeapon(self:GetClass())
end)
else
self:TakePrimaryAmmo(1, true)
self:SetClip1(1)
end
end
self:SetNW2Bool("Charging", false)
self:SetNW2Bool("Ready", false)
self:SetNW2Bool("Underhanded", false)
self:CleanParticles()
BaseClass.Deploy(self)
end
function SWEP:ChoosePullAnim()
if not self:OwnerIsValid() then return end
if self.Callback.ChoosePullAnim then
self.Callback.ChoosePullAnim(self)
end
self.Owner:SetAnimation(PLAYER_RELOAD)
--self:ResetEvents()
local tanim = ACT_VM_PULLPIN
local success = true
self:SendViewModelAnim(ACT_VM_PULLPIN)
if game.SinglePlayer() then
self:CallOnClient("AnimForce", tanim)
end
self.lastact = tanim
return success, tanim
end
function SWEP:ChooseShootAnim()
if not self:OwnerIsValid() then return end
if self.Callback.ChooseShootAnim then
self.Callback.ChooseShootAnim(self)
end
self.Owner:SetAnimation(PLAYER_ATTACK1)
--self:ResetEvents()
local mybool = self:GetNW2Bool("Underhanded", false)
local tanim = mybool and ACT_VM_RELEASE or ACT_VM_THROW
if not self.SequenceEnabled[ACT_VM_RELEASE] then
tanim = ACT_VM_THROW
end
if mybool then
tanim = ACT_VM_RELEASE
end
local success = true
self:SendViewModelAnim(tanim)
if game.SinglePlayer() then
self:CallOnClient("AnimForce", tanim)
end
self.lastact = tanim
return success, tanim
end
function SWEP:CanFire()
if not self:OwnerIsValid() then return false end
if not TFA.Enum.ReadyStatus[self:GetStatus()] then return false end
--[[
local vm = self.Owner:GetViewModel()
local seq = vm:GetSequence()
local act = vm:GetSequenceActivity(seq)
if not (act == ACT_VM_DRAW or act == ACT_VM_IDLE) then return false end
if act == ACT_VM_DRAW and vm:GetCycle() < 0.99 then return false end
]] -- you see tfa WE DONT NEED THAT OLD CODE ANYMORE
return not (self:GetNW2Bool("Charging") or self:GetNW2Bool("Ready"))
end
function SWEP:ThrowStart()
if self:Clip1() > 0 then
self:ChooseShootAnim()
self:SetNW2Bool("Ready", false)
local bool = self:GetNW2Bool("Underhanded", false)
self:SetStatus(TFA.Enum.STATUS_GRENADE_THROW)
self:SetStatusEnd(CurTime() + (bool and self.Delay_Underhand or self.Delay))
end
end
function SWEP:Throw()
if self:Clip1() > 0 then
local bool = self:GetNW2Bool("Underhanded", false)
local ply = self:GetOwner()
local entity = ents.Create(self:GetStat("Primary.Round"))
entity:SetOwner(ply)
if not bool then
self.ProjectileVelocity = self.Velocity or 550 --Entity to shoot's velocity
if IsValid( entity ) then
entity:SetPos( ply:GetShootPos() + ply:EyeAngles():Forward() * 16 )
entity:SetAngles( ply:EyeAngles() )
entity:Spawn()
entity:GetPhysicsObject():SetVelocity( ply:GetAimVector() * self.Velocity + Vector( 0, 0, 200 ) )
entity:GetPhysicsObject():AddAngleVelocity( Vector( math.Rand( -750, 750 ), math.Rand( -750, 750 ), math.Rand( -750, 750 ) ) )
end
else
if self:GetStat("Velocity_Underhand") then
if IsValid( entity ) then
entity:SetPos( ply:GetShootPos() + ply:EyeAngles():Forward() * 16 + ply:EyeAngles():Up() * -12 )
entity:SetAngles( ply:EyeAngles() )
entity:Spawn()
entity:GetPhysicsObject():SetVelocity( ply:GetAimVector() * self:GetStat("Velocity_Underhand") + Vector( 0, 0, 200 ) )
entity:GetPhysicsObject():AddAngleVelocity( Vector( math.Rand( -500, 500 ), math.Rand( -500, 500 ), math.Rand( -500, 500 ) ) )
end
else
--self.ProjectileVelocity = (self.Velocity and self.Velocity or 550) / 1.5
if IsValid( entity ) then
entity:SetPos( ply:GetShootPos() + ply:EyeAngles():Forward() * 16 )
entity:SetAngles( ply:EyeAngles() )
entity:Spawn()
entity:GetPhysicsObject():SetVelocity( ply:GetAimVector() * self.Velocity + Vector( 0, 0, 200 ) )
entity:GetPhysicsObject():AddAngleVelocity( Vector( math.Rand( -750, 750 ), math.Rand( -750, 750 ), math.Rand( -750, 750 ) ) )
end
end
end
self:TakePrimaryAmmo(1)
self:SetStatus(TFA.Enum.STATUS_GRENADE_READY)
self:SetStatusEnd(CurTime() + self.OwnerViewModel:SequenceDuration())
self:SetNextPrimaryFire(self:GetStatusEnd())
end
end
function SWEP:PrimaryAttack()
if self:Clip1() > 0 and self:OwnerIsValid() and self:CanFire() then
self:ChoosePullAnim()
self:SetStatus(TFA.Enum.STATUS_GRENADE_PULL)
self:SetStatusEnd(CurTime() + self.OwnerViewModel:SequenceDuration())
self:SetNW2Bool("Charging", true)
self:SetNW2Bool("Underhanded", false)
end
end
function SWEP:SecondaryAttack()
if self:Clip1() > 0 and self:CanFire() then
self:ChoosePullAnim()
self:SetStatus(TFA.Enum.STATUS_GRENADE_PULL)
self:SetStatusEnd(CurTime() + self.OwnerViewModel:SequenceDuration())
self:SetNW2Bool("Charging", true)
self:SetNW2Bool("Ready", false)
self:SetNW2Bool("Underhanded", true)
end
end
function SWEP:Reload()
if self:Clip1() <= 0 and self:CanFire() then
self:Deploy()
end
end
function SWEP:ChooseIdleAnim( ... )
if self:GetNW2Bool("Charging") or self:GetNW2Bool("Ready") then return end
BaseClass.ChooseIdleAnim(self,...)
end
function SWEP:Think2()
if SERVER then
local ct = CurTime()
if self:GetStatus() == TFA.Enum.STATUS_GRENADE_PULL and ct >= self:GetStatusEnd() then
self:SetNW2Bool("Charging", false)
self:SetNW2Bool("Ready", true)
elseif self:GetStatus() == TFA.Enum.STATUS_GRENADE_THROW and ct >= self:GetStatusEnd() then
self:Throw()
elseif self:GetStatus() == TFA.Enum.STATUS_GRENADE_READY and ct >= self:GetStatusEnd() then
self:Deploy()
end
if self:OwnerIsValid() and self:GetOwner():IsPlayer() then -- npc support haHAA
if self:GetNW2Bool("Charging", false) and not self:GetNW2Bool("Ready", false) then
if self:GetOwner():KeyDown(IN_ATTACK2) then
self:SetNW2Bool("Underhanded", true)
end
elseif not self:GetNW2Bool("Charging", false) and self:GetNW2Bool("Ready", true) then
if not self:GetOwner():KeyDown(IN_ATTACK2) and not self:GetOwner():KeyDown(IN_ATTACK) then
self:ThrowStart()
end
end
end
end
return BaseClass.Think2(self)
end
function SWEP:ShootBullet()
return false -- OMEGALUL
end

View File

@@ -0,0 +1,44 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
include ("shared.lua")
SWEP.MagLifeTime = 15
function SWEP:DropMag()
if not self.MagModel then return end
local mag = ents.CreateClientProp()
mag:SetModel(self.MagModel)
mag:SetMaterial(self:GetMaterial())
local pos, ang = self:GetPos(), self:GetAngles()
if self:IsFirstPerson() and self:VMIV() then
local vm = self.OwnerViewModel
ang = vm:GetAngles()
pos = vm:GetPos() - ang:Up() * 8
end
mag:SetPos(pos)
mag:SetAngles(ang)
mag:PhysicsInit(SOLID_VPHYSICS)
mag:PhysWake()
mag:SetMoveType(MOVETYPE_VPHYSICS) -- we call it AFTER physics init
mag:Spawn()
SafeRemoveEntityDelayed(mag, self.MagLifeTime)
end

View File

@@ -0,0 +1,45 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function SWEP:DropMag()
net.Start("TFA_HL2R_DropMag")
net.WriteEntity(self)
if sp then
net.Broadcast()
else
net.SendOmit(self:GetOwner())
end
end

View File

@@ -0,0 +1,34 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
SWEP.Gun = ("tfa_hl2r_base")
SWEP.Category = "TFA N7"
SWEP.Author = ""
SWEP.Base = "tfa_gun_base"

View File

@@ -0,0 +1,52 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AddCSLuaFile()
if SERVER then return end
surface.CreateFont("TitleFont",
{
font = "HalfLife2",
size = 300,
weight = 550,
blursize = 1,
scanlines = 5,
symbol = false,
antialias = true,
additive = true
})
surface.CreateFont("GunFont",
{
font = "RealBeta's Weapon Icons",
size = 300,
weight = 550,
blursize = 1,
scanlines = 5,
symbol = false,
antialias = true,
additive = true
})
function SWEP:DrawWeaponSelection( x, y, wide, tall, alpha )
// Set us up the texture
surface.SetDrawColor( color_transparent )
surface.SetTextColor( 255, 220, 0, alpha )
surface.SetFont( self.WepSelectFont )
local w, h = surface.GetTextSize( self.WepSelectLetter )
// Draw that mother
surface.SetTextPos( x + ( wide / 2 ) - ( w / 2 ),
y + ( tall / 2 ) - ( h / 2 ) )
surface.DrawText( self.WepSelectLetter )
end

View File

@@ -0,0 +1,345 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
include("fonts.lua")
SWEP.WepSelectFont = "TitleFont"
SWEP.WepSelectLetter = "k"
-- Variables that are used on both client and server
SWEP.Gun = ("tfa_mmod_grenade") -- must be the name of your swep but NO CAPITALS!
if (GetConVar(SWEP.Gun.."_allowed")) != nil then
if not (GetConVar(SWEP.Gun.."_allowed"):GetBool()) then SWEP.Base = "tfa_blacklisted" SWEP.PrintName = SWEP.Gun return end
end
-- SWEP Bases Variables
GRENADE_TIMER = 2.5 //Seconds
GRENADE_PAUSED_NO = 0
GRENADE_PAUSED_PRIMARY = 1
GRENADE_PAUSED_SECONDARY = 2
GRENADE_DAMAGE_RADIUS = 250.0
SWEP.FiresUnderwater = true
SWEP.Category = "TFA MMOD"
SWEP.Author = ""
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.Instructions = ""
SWEP.PrintName = "GRENADE" -- Weapon name (Shown on HUD)
SWEP.Slot = 4 -- Slot in the weapon selection menu
SWEP.SlotPos = 40 -- Position in the slot
SWEP.DrawAmmo = true -- Should draw the default HL2 ammo counter
SWEP.DrawWeaponInfoBox = false -- Should draw the weapon info box
SWEP.BounceWeaponIcon = false -- Should the weapon icon bounce?
SWEP.DrawCrosshair = false -- set false if you want no crosshair
SWEP.Weight = 2 -- rank relative ot other weapons. bigger is better
SWEP.AutoSwitchTo = true -- Auto switch to if we pick it up
SWEP.AutoSwitchFrom = true -- Auto switch from if you pick up a better weapon
SWEP.HoldType = "grenade" -- how others view you carrying the weapon
-- normal melee melee2 fist knife smg ar2 pistol rpg physgun grenade shotgun crossbow slam passive
-- you're mostly going to use ar2, smg, shotgun or pistol. rpg and ar2 make for good sniper rifles
SWEP.ViewModelFOV = 55
SWEP.ViewModelFlip = false
SWEP.ViewModel = "models/weapons/tfa_mmod/c_grenade.mdl" -- Weapon view model
SWEP.WorldModel = "models/weapons/w_grenade.mdl" -- Weapon world model
SWEP.ShowWorldModel = true
SWEP.Base = "tfa_nade_base"
SWEP.Spawnable = true
SWEP.UseHands = true
SWEP.AdminSpawnable = true
SWEP.DisableIdleAnimations = false
SWEP.ProceduralHoslterEnabled = true
SWEP.ProceduralHolsterTime = 0.0
SWEP.ProceduralHolsterPos = Vector(0, 0, 0)
SWEP.ProceduralHolsterAng = Vector(0, 0, 0)
SWEP.Primary.RPM = 120 -- This is in Rounds Per Minute
SWEP.Primary.ClipSize = 1 -- Size of a clip
SWEP.Primary.DefaultClip = 1 -- Bullets you start with
SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false
SWEP.Primary.Ammo = "Grenade"
-- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun
-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a metal peircing shotgun slug
SWEP.Primary.Round = ("mmod_frag") --NAME OF ENTITY GOES HERE
SWEP.Velocity = 1200 -- Entity Velocity
SWEP.Velocity_Underhand = 350 -- Entity Velocity
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = 0,
Right = 1,
Forward = 3,
},
Ang = {
Up = -1,
Right = -2,
Forward = 178
},
Scale = 1
}
SWEP.SprintAnimation = {
["loop"] = {
["type"] = TFA.Enum.ANIMATION_SEQ, --Sequence or act
["value"] = "sprint", --Number for act, String/Number for sequence
["is_idle"] = true
}
}
SWEP.WalkAnimation = {
["loop"] = {
["type"] = TFA.Enum.ANIMATION_SEQ, --Sequence or act
["value"] = "walk", --Number for act, String/Number for sequence
["is_idle"] = true
},
}
SWEP.AllowViewAttachment = true --Allow the view to sway based on weapon attachment while reloading or drawing, IF THE CLIENT HAS IT ENABLED IN THEIR CONVARS.
SWEP.Sprint_Mode = TFA.Enum.LOCOMOTION_ANI -- ANI = mdl, HYBRID = ani + lua, Lua = lua only
SWEP.Sights_Mode = TFA.Enum.LOCOMOTION_LUA -- ANI = mdl, HYBRID = lua but continue idle, Lua = stop mdl animation
SWEP.Walk_Mode = TFA.Enum.LOCOMOTION_ANI -- ANI = mdl, HYBRID = ani + lua, Lua = lua only
SWEP.Idle_Mode = TFA.Enum.IDLE_BOTH --TFA.Enum.IDLE_DISABLED = no idle, TFA.Enum.IDLE_LUA = lua idle, TFA.Enum.IDLE_ANI = mdl idle, TFA.Enum.IDLE_BOTH = TFA.Enum.IDLE_ANI + TFA.Enum.IDLE_LUA
SWEP.Idle_Blend = 0 --Start an idle this far early into the end of a transition
SWEP.Idle_Smooth = 0 --Start an idle this far early into the end of another animation
SWEP.SprintBobMult = 0
DEFINE_BASECLASS (SWEP.Base)
function SWEP:ChooseShootAnim()
if not self:OwnerIsValid() then return end
self.Owner:SetAnimation(PLAYER_ATTACK1)
--self:ResetEvents()
local mybool = self:GetNW2Bool("Underhanded", false)
local tanim = mybool and ACT_VM_SECONDARYATTACK or ACT_VM_THROW or ACT_VM_HAULBACK
if not self.SequenceEnabled[ACT_VM_SECONDARYATTACK] then
tanim = ACT_VM_THROW
end
local success = true
self:SendViewModelAnim(tanim)
if game.SinglePlayer() then
self:CallOnClient("AnimForce", tanim)
end
self.lastact = tanim
return success, tanim
end
function SWEP:ChoosePullAnim()
if not self:OwnerIsValid() then return end
if self.Callback.ChoosePullAnim then
self.Callback.ChoosePullAnim(self)
end
self:GetOwner():SetAnimation(PLAYER_RELOAD)
--self:ResetEvents()
local tanim = ACT_VM_PULLPIN
local success = true
local bool = self:GetNW2Bool("Underhanded", false)
if not bool then
tanim = ACT_VM_PULLBACK_LOW
else
tanim = ACT_VM_PULLPIN
end
if game.SinglePlayer() then
self:CallOnClient("AnimForce", tanim)
end
self:SendViewModelAnim(tanim)
self.lastact = tanim
return success, tanim
end
function SWEP:Throw()
local pOwner = self.Owner;
if self:Clip1() > 0 then
local bool = self:GetNW2Bool("Underhanded", false)
local own = self:GetOwner()
if not bool then
self:ThrowGrenade( pOwner )
elseif self.Owner:KeyDown( IN_DUCK ) and bool then
self:RollGrenade( pOwner );
else
self:LobGrenade( pOwner );
end
end
self:TakePrimaryAmmo(1)
self:DoAmmoCheck()
end
-- NEW FUNCTIONS
// check a throw from vecSrc. If not valid, move the position back along the line to vecEye
function SWEP:CheckThrowPosition( pPlayer, vecEye, vecSrc )
local tr;
tr = {}
tr.start = vecEye
tr.endpos = vecSrc
tr.mins = -Vector(4.0+2,4.0+2,4.0+2)
tr.maxs = Vector(4.0+2,4.0+2,4.0+2)
tr.mask = MASK_PLAYERSOLID
tr.filter = pPlayer
tr.collision = pPlayer:GetCollisionGroup()
local trace = util.TraceHull( tr );
if ( trace.Hit ) then
vecSrc = tr.endpos;
end
return vecSrc
end
function SWEP:ThrowGrenade( pPlayer )
if ( !CLIENT ) then
local vecEye = pPlayer:EyePos();
local vecShoot = pPlayer:GetShootPos();
local vForward, vRight;
vForward = pPlayer:EyeAngles():Forward();
vRight = pPlayer:EyeAngles():Right();
local vecSrc = vecEye + vForward * 18.0 + vRight * 8.0;
vecSrc = self:CheckThrowPosition( pPlayer, vecEye, vecSrc );
// vForward.x = vForward.x + 0.1;
// vForward.y = vForward.y + 0.1;
local vecThrow;
vecThrow = pPlayer:GetVelocity();
vecThrow = vecThrow + vForward * 1200;
local pGrenade = ents.Create( self.Primary.Round );
pGrenade:SetPos( vecSrc );
pGrenade:SetAngles( Angle(0,0,0) );
pGrenade:SetOwner( pPlayer );
pGrenade:Fire( "SetTimer", GRENADE_TIMER );
pGrenade:Spawn()
pGrenade:GetPhysicsObject():SetVelocity( vecThrow );
pGrenade:GetPhysicsObject():AddAngleVelocity( Vector(600,math.random(-1200,1200),0) );
if ( pGrenade ) then
if ( pPlayer && !pPlayer:Alive() ) then
vecThrow = pPlayer:GetVelocity();
local pPhysicsObject = pGrenade:GetPhysicsObject();
if ( pPhysicsObject ) then
vecThrow = pPhysicsObject:SetVelocity();
end
end
pGrenade.m_flDamage = self.Primary.Damage;
pGrenade.m_DmgRadius = GRENADE_DAMAGE_RADIUS;
end
end
end
function SWEP:LobGrenade( pPlayer )
if ( !CLIENT ) then
local vecEye = pPlayer:EyePos();
local vForward, vRight;
local vecShoot = pPlayer:GetShootPos()
vForward = pPlayer:EyeAngles():Forward();
vRight = pPlayer:EyeAngles():Right();
local vecSrc = vecEye + vForward * 18.0 + vRight * 8.0 + Vector( 0, 0, -8 );
vecSrc = self:CheckThrowPosition( pPlayer, vecEye, vecSrc );
local vecThrow;
vecThrow = pPlayer:GetVelocity();
vecThrow = vecThrow + vForward * 350 + Vector( 0, 0, 50 );
local pGrenade = ents.Create( self.Primary.Round );
pGrenade:SetPos( vecSrc );
pGrenade:SetAngles( Angle(0,0,0) );
pGrenade:SetOwner( pPlayer );
pGrenade:Fire( "SetTimer", GRENADE_TIMER );
pGrenade:Spawn()
pGrenade:GetPhysicsObject():SetVelocity( vecThrow );
pGrenade:GetPhysicsObject():AddAngleVelocity( Vector(200,math.random(-600,600),0) );
if ( pGrenade ) then
pGrenade.m_flDamage = self.Primary.Damage;
pGrenade.m_DmgRadius = GRENADE_DAMAGE_RADIUS;
end
end
end
function SWEP:RollGrenade( pPlayer )
if ( !CLIENT ) then
// BUGBUG: Hardcoded grenade width of 4 - better not change the model :)
local vecSrc;
vecSrc = pPlayer:GetPos();
vecSrc.z = vecSrc.z + 4.0;
local vecFacing = pPlayer:GetAimVector( );
// no up/down direction
vecFacing.z = 0;
vecFacing = VectorNormalize( vecFacing );
local tr;
tr = {};
tr.start = vecSrc;
tr.endpos = vecSrc - Vector(0,0,16);
tr.mask = MASK_PLAYERSOLID;
tr.filter = pPlayer;
tr.collision = COLLISION_GROUP_NONE;
tr = util.TraceLine( tr );
if ( tr.Fraction != 1.0 ) then
// compute forward vec parallel to floor plane and roll grenade along that
local tangent;
tangent = CrossProduct( vecFacing, tr.HitNormal );
vecFacing = CrossProduct( tr.HitNormal, tangent );
end
vecSrc = vecSrc + (vecFacing * 18.0);
vecSrc = self:CheckThrowPosition( pPlayer, pPlayer:GetPos(), vecSrc );
local vecThrow;
vecThrow = pPlayer:GetVelocity();
vecThrow = vecThrow + vecFacing * 700;
// put it on its side
local orientation = Angle(0,pPlayer:GetLocalAngles().y,-90);
// roll it
local rotSpeed = Vector(0,0,720);
local pGrenade = ents.Create( self.Primary.Round );
pGrenade:SetPos( vecSrc );
pGrenade:SetAngles( orientation );
pGrenade:SetOwner( pPlayer );
pGrenade:Fire( "SetTimer", GRENADE_TIMER );
pGrenade:Spawn();
pGrenade:GetPhysicsObject():SetVelocity( vecThrow );
pGrenade:GetPhysicsObject():AddAngleVelocity( rotSpeed );
if ( pGrenade ) then
pGrenade.m_flDamage = self.Primary.Damage;
pGrenade.m_DmgRadius = GRENADE_DAMAGE_RADIUS;
end
end
// player "shoot" animation
pPlayer:SetAnimation( PLAYER_ATTACK1 );
end

View File

@@ -0,0 +1,52 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AddCSLuaFile()
if SERVER then return end
surface.CreateFont("TitleFont",
{
font = "HalfLife2",
size = 300,
weight = 550,
blursize = 1,
scanlines = 5,
symbol = false,
antialias = true,
additive = true
})
surface.CreateFont("GunFont",
{
font = "RealBeta's Weapon Icons",
size = 300,
weight = 550,
blursize = 1,
scanlines = 5,
symbol = false,
antialias = true,
additive = true
})
function SWEP:DrawWeaponSelection( x, y, wide, tall, alpha )
// Set us up the texture
surface.SetDrawColor( color_transparent )
surface.SetTextColor( 255, 220, 0, alpha )
surface.SetFont( self.WepSelectFont )
local w, h = surface.GetTextSize( self.WepSelectLetter )
// Draw that mother
surface.SetTextPos( x + ( wide / 2 ) - ( w / 2 ),
y + ( tall / 2 ) - ( h / 2 ) )
surface.DrawText( self.WepSelectLetter )
end

View File

@@ -0,0 +1,203 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
include("fonts.lua")
SWEP.WepSelectFont = "TitleFont"
SWEP.WepSelectLetter = "n"
SWEP.Category = "TFA MMOD"
SWEP.Author = ""
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.Instructions = ""
SWEP.PrintName = "STUNSTICK\n(CIVIL PROTECTION MELEE ISSUE)" -- Weapon name (Shown on HUD)
SWEP.Slot = 0 -- Slot in the weapon selection menu
SWEP.SlotPos = 27 -- Position in the slot
SWEP.DrawAmmo = true -- Should draw the default HL2 ammo counter
SWEP.DrawWeaponInfoBox = false -- Should draw the weapon info box
SWEP.BounceWeaponIcon = false -- Should the weapon icon bounce?
SWEP.DrawCrosshair = false -- set false if you want no crosshair
SWEP.Weight = 35 -- rank relative ot other weapons. bigger is better
SWEP.AutoSwitchTo = true -- Auto switch to if we pick it up
SWEP.AutoSwitchFrom = true -- Auto switch from if you pick up a better weapon
SWEP.HoldType = "melee" -- how others view you carrying the weapon
SWEP.Primary.Sound = Sound("TFA_MMOD.StunStick.1")
SWEP.KnifeShink = "TFA_MMOD.StunStick.HitWall" --Sounds
SWEP.KnifeSlash = "TFA_MMOD.StunStick.Hit" --Sounds
SWEP.KnifeStab = "TFA_MMOD.StunStick.Hit" --Sounds
SWEP.Primary.Delay = 0.0 --Delay for hull (primary)
SWEP.Secondary.Delay = 0.0 --Delay for hull (secondary)
SWEP.Primary.RPM = 100
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Ammo = nil
SWEP.DamageType = DMG_CLUB
function SWEP:ThrowKnife()
return false
end
SWEP.IsMelee = true
SWEP.VMPos = Vector(1,-1,-1)
SWEP.VMAng = Vector(0, 0, 0)
-- normal melee melee2 fist knife smg ar2 pistol rpg physgun grenade shotgun crossbow slam passive
-- you're mostly going to use ar2, smg, shotgun or pistol. rpg and crossbow make for good sniper rifles
SWEP.SlashTable = {"misscenter1", "misscenter2"} --Table of possible hull sequences
SWEP.StabTable = {"hitcenter1", "hitcenter2", "hitcenter3"} --Table of possible hull sequences
SWEP.StabMissTable = {"misscenter1", "misscenter2"} --Table of possible hull sequences
SWEP.Primary.Length = 50
SWEP.Secondary.Length = 55
SWEP.Primary.Damage = 35
SWEP.Secondary.Damage = 55
SWEP.ViewModelFlip = false
SWEP.ViewModelFOV = 54
SWEP.ViewModel = "models/weapons/tfa_mmod/c_stunstick.mdl" -- Weapon view model
SWEP.WorldModel = "models/weapons/w_stunbaton.mdl" -- Weapon world model
SWEP.ShowWorldModel = true
SWEP.Base = "tfa_knife_base"
SWEP.Spawnable = true
SWEP.UseHands = true
SWEP.AdminSpawnable = true
SWEP.FiresUnderwater = true
SWEP.SprintAnimation = {
["loop"] = {
["type"] = TFA.Enum.ANIMATION_SEQ, --Sequence or act
["value"] = "sprint", --Number for act, String/Number for sequence
["is_idle"] = true
},
}
SWEP.WalkAnimation = {
["loop"] = {
["type"] = TFA.Enum.ANIMATION_SEQ, --Sequence or act
["value"] = "walk", --Number for act, String/Number for sequence
["is_idle"] = true
},
}
SWEP.AllowViewAttachment = true --Allow the view to sway based on weapon attachment while reloading or drawing, IF THE CLIENT HAS IT ENABLED IN THEIR CONVARS.
SWEP.Sprint_Mode = TFA.Enum.LOCOMOTION_ANI -- ANI = mdl, HYBRID = ani + lua, Lua = lua only
SWEP.Sights_Mode = TFA.Enum.LOCOMOTION_ANI -- ANI = mdl, HYBRID = lua but continue idle, Lua = stop mdl animation
SWEP.Walk_Mode = TFA.Enum.LOCOMOTION_ANI -- ANI = mdl, HYBRID = ani + lua, Lua = lua only
SWEP.Idle_Mode = TFA.Enum.IDLE_BOTH --TFA.Enum.IDLE_DISABLED = no idle, TFA.Enum.IDLE_LUA = lua idle, TFA.Enum.IDLE_ANI = mdl idle, TFA.Enum.IDLE_BOTH = TFA.Enum.IDLE_ANI + TFA.Enum.IDLE_LUA
SWEP.Idle_Blend = 0 --Start an idle this far early into the end of a transition
SWEP.Idle_Smooth = 0 --Start an idle this far early into the end of another animation
SWEP.SprintBobMult = 0
DEFINE_BASECLASS ( SWEP.Base )
local tracedata = {}
function SWEP:DoImpactEffect(tr, dmgtype)
if tr.HitSky then return true end
local ib = self.BashBase and IsValid(self) and self:GetBashing()
local dmginfo = DamageInfo()
dmginfo:SetDamageType(dmgtype)
if ib and self.Secondary.BashDamageType == DMG_GENERIC then return true end
if ib then return end
if self.ImpactDecal and self.ImpactDecal ~= "" then
util.Decal(self.ImpactDecal, tr.HitPos + tr.HitNormal, tr.HitPos - tr.HitNormal)
return true
end
end
function SWEP:PrimaryAttack()
if not self:CanAttack() then return end
local ow, gsp, ea, fw, tr
ow = self:GetOwner()
gsp = ow:GetShootPos()
ea = ow:EyeAngles()
fw = ea:Forward()
tracedata.start = gsp
tracedata.endpos = gsp + fw * self.Primary.Length
tracedata.filter = ow
tr = self:GetSlashTrace(tracedata, fw)
if self:GetNextPrimaryFire() < CurTime() and self:GetOwner():IsPlayer() and not self:GetOwner():KeyDown(IN_RELOAD) then
self.SlashCounter = self.SlashCounter + 1
if self.SlashCounter > #self.SlashTable then
self.SlashCounter = 1
end
if tr.Hit then
self:SendViewModelSeq(self.StabTable[self.SlashCounter])
else
self:SendViewModelSeq(self.SlashTable[self.SlashCounter])
end
self:GetOwner():SetAnimation(PLAYER_ATTACK1)
self:SetNextPrimaryFire(CurTime() + 1 / (self.Primary.RPM / 60))
self:SetNextSecondaryFire(CurTime() + 1 / (self.Primary.RPM / 60))
self:SetStatus(TFA.Enum.STATUS_RELOADING)
self:SetStatusEnd(CurTime() + self.Primary.Delay)
end
end
function SWEP:SecondaryAttack()
return false
end
function SWEP:SmackEffect(tr)
local vSrc = tr.StartPos
local bFirstTimePredicted = IsFirstTimePredicted()
local bHitWater = bit.band(util.PointContents(vSrc), MASK_WATER) ~= 0
local bEndNotWater = bit.band(util.PointContents(tr.HitPos), MASK_WATER) == 0
local trSplash = bHitWater and bEndNotWater and util.TraceLine({
start = tr.HitPos,
endpos = vSrc,
mask = MASK_WATER
}) or not (bHitWater or bEndNotWater) and util.TraceLine({
start = vSrc,
endpos = tr.HitPos,
mask = MASK_WATER
})
if (trSplash and bFirstTimePredicted) then
local data = EffectData()
data:SetOrigin(trSplash.HitPos)
data:SetScale(1)
if (bit.band(util.PointContents(trSplash.HitPos), CONTENTS_SLIME) ~= 0) then
data:SetFlags(1) --FX_WATER_IN_SLIME
end
util.Effect("watersplash", data)
end
self:DoImpactEffect(tr, self.DamageType)
if (tr.Hit and bFirstTimePredicted and not trSplash) then
local data = EffectData()
data:SetOrigin(tr.HitPos)
data:SetStart(vSrc)
data:SetSurfaceProp(tr.SurfaceProps)
data:SetDamageType(self.DamageType)
data:SetHitBox(tr.HitBox)
data:SetEntity(tr.Entity)
util.Effect("Impact", data)
util.Effect("StunstickImpact", data)
end
end

View File

@@ -0,0 +1,11 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
include('shared.lua')

View File

@@ -0,0 +1,14 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')

View File

@@ -0,0 +1,49 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
DEFINE_BASECLASS("tfa_bash_base")
SWEP.Slot = 2
SWEP.SlotPos = 73
SWEP.LuaShellEject = true
SWEP.ForceDryFireOff = false --Disables dryfire. Set to false to enable them.
SWEP.DisableIdleAnimations = true --Disables idle animations. Set to false to enable them.
SWEP.ForceEmptyFireOff = false --Disables empty fire animations. Set to false to enable them.
SWEP.Secondary.BashSound = Sound("Weapon_Crowbar.Shove")
SWEP.Secondary.BashDelay = 0.05
SWEP.ViewModelFOV = 50
SWEP.UseHands = true
SWEP.ViewModelBoneMods = {
["ValveBiped.Bip01_R_Finger1"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0.254, 0.09), angle = Angle(15.968, -11.193, 1.437) },
["ValveBiped.Bip01_R_Finger0"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(3.552, 4.526, 0) },
["Thumb04"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(6, 0, 0) }
}
SWEP.KF2StyleShotgun = false --Allow empty reloads for shotguns?
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -3,
Right = 1,
Forward = 3.5,
},
Ang = {
Up = -1,
Right = -2,
Forward = 178
},
Scale = 1.1
}
SWEP.MoveSpeed = 0.9
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed * 0.8

View File

@@ -0,0 +1,59 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Baseball Bat"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_bat_metal.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_bat_metal.mdl" --Viewmodel path
SWEP.HoldType = "melee2"
SWEP.DefaultHoldType = "melee2"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -4.7,
Right = 1,
Forward = 0.5,
},
Ang = {
Up = -1,
Right = 5,
Forward = 178
},
Scale = 1.0
}
SWEP.Primary.Sound = ""--Sound("Weapon_Melee.HatchetLight")
SWEP.Secondary.Sound = ""--Sound("Weapon_Melee.FireaxeHeavy")
SWEP.MoveSpeed = 0.9
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(4.84, 1.424, -3.131)
SWEP.InspectAng = Vector(17.086, 3.938, 14.836)
SWEP.Primary.RPM = 50
SWEP.Primary.Damage = 70
SWEP.Secondary.BashDelay = 0.3
SWEP.ViewModelBoneMods = {
["ValveBiped.Bip01_R_Finger1"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0.254, 0.09), angle = Angle(15.968, -11.193, 1.437) },
["ValveBiped.Bip01_R_Finger0"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(3.552, 4.526, 0) },
["Thumb04"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(6, 0, 0) },
["Middle04"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(-8.212, 1.121, 1.263) },
["Pinky05"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(11.793, 4.677, 11.218) }
}
SWEP.Primary.Blunt = true
SWEP.Secondary.Blunt = true

View File

@@ -0,0 +1,79 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.AnimSequences = {
attack_quick = "Attack_Quick_1",
attack_quick2 = "Attack_Quick_2",
charge_begin = "Attack_Charge_Begin",
charge_loop = "Attack_Charge_Idle",
charge_end = "Attack_Charge_End"
}
SWEP.PrintName = "Claw Hammer"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_tool_barricade.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_tool_barricade.mdl" --Viewmodel path
SWEP.HoldType = "melee"
SWEP.DefaultHoldType = "melee"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -5,
Right = 2,
Forward = 3.5,
},
Ang = {
Up = -1,
Right = 5,
Forward = 178
},
Scale = 1.0
}
SWEP.Primary.Sound = Sound("Weapon_Melee.HammerSwing")
SWEP.Secondary.Sound = Sound("Weapon_Melee.HammerSwing")
SWEP.MoveSpeed = 0.95
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(15.069, -15.437, 5.85)
SWEP.InspectAng = Vector(30.03, 43.618, 40.874)
SWEP.Primary.Blunt = true
SWEP.Primary.Reach = 65
SWEP.Primary.RPM = 80
SWEP.Primary.SoundDelay = 0.1
SWEP.Primary.Delay = 0.25
SWEP.Primary.Damage = 60
SWEP.Secondary.Blunt = true
SWEP.Secondary.RPM = 45 -- Delay = 60/RPM, this is only AFTER you release your heavy attack
SWEP.Secondary.Damage = 100
SWEP.Secondary.Reach = 65
SWEP.Secondary.SoundDelay = 0.05
SWEP.Secondary.Delay = 0.25
SWEP.Secondary.BashDamage = 24
SWEP.Secondary.BashDelay = 0.1
SWEP.Secondary.BashLength = 54
SWEP.Secondary.BashDamageType = DMG_CLUB
SWEP.ViewModelBoneMods = {
["ValveBiped.Bip01_R_Finger1"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0.254, 0.09), angle = Angle(15.968, -11.193, 1.437) },
["ValveBiped.Bip01_R_Finger0"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(3.552, 4.526, 0) },
["Thumb04"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(6, 0, 0) },
["Maglite"] = { scale = Vector(0.009, 0.009, 0.009), pos = Vector(0, 0, -30), angle = Angle(0, 0, 0) }
}

View File

@@ -0,0 +1,64 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Cleaver"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_cleaver.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_cleaver.mdl" --Viewmodel path
SWEP.HoldType = "melee"
SWEP.DefaultHoldType = "melee"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = 0,
Right = 0.5,
Forward = -0.5,
},
Ang = {
Up = -1,
Right = 5,
Forward = 178
},
Scale = 1.2
}
SWEP.Primary.Sound = Sound("Weapon_Melee.HatchetLight")
SWEP.Secondary.Sound = Sound("Weapon_Melee.HatchetHeavy")
SWEP.MoveSpeed = 0.975
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(3.874, -13.436, 3.969)
SWEP.InspectAng = Vector(-7.27, 41.632, 4.92)
SWEP.Primary.Blunt = false
SWEP.Primary.Damage = 60
SWEP.Primary.Reach = 40
SWEP.Primary.RPM = 100
SWEP.Primary.SoundDelay = 0.15
SWEP.Primary.Delay = 0.3
SWEP.Primary.Window = 0.2
SWEP.Secondary.Blunt = false
SWEP.Secondary.RPM = 80 -- Delay = 60/RPM, this is only AFTER you release your heavy attack
SWEP.Secondary.Damage = 100
SWEP.Secondary.Reach = 45
SWEP.Secondary.SoundDelay = 0.1
SWEP.Secondary.Delay = 0.3
SWEP.Secondary.BashDamage = 20
SWEP.Secondary.BashDelay = 0.2
SWEP.Secondary.BashLength = 50

View File

@@ -0,0 +1,64 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Crowbar"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_crowbar.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_crowbar.mdl" --Viewmodel path
SWEP.HoldType = "melee"
SWEP.DefaultHoldType = "melee"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -6,
Right = 1.5,
Forward = 3.5,
},
Ang = {
Up = -1,
Right = 5,
Forward = 178
},
Scale = 1.0
}
SWEP.Primary.Sound = Sound("Weapon_Melee.CrowbarLight")
SWEP.Secondary.Sound = Sound("Weapon_Melee.CrowbarHeavy")
SWEP.MoveSpeed = 0.975
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(-3.086, -6.5, 7.236)
SWEP.InspectAng = Vector(-8.443, 11.651, 12.725)
SWEP.Primary.Blunt = true
SWEP.Primary.Damage = 50
SWEP.Primary.Reach = 60
SWEP.Primary.RPM = 100
SWEP.Primary.SoundDelay = 0.15
SWEP.Primary.Delay = 0.3
SWEP.Primary.Window = 0.2
SWEP.Secondary.Blunt = true
SWEP.Secondary.RPM = 60 -- Delay = 60/RPM, this is only AFTER you release your heavy attack
SWEP.Secondary.Damage = 80
SWEP.Secondary.Reach = 60
SWEP.Secondary.SoundDelay = 0.1
SWEP.Secondary.Delay = 0.3
SWEP.Secondary.BashDamage = 50
SWEP.Secondary.BashDelay = 0.35
SWEP.Secondary.BashLength = 50

View File

@@ -0,0 +1,56 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Fire Axe"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_axe_fire.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_axe_fire.mdl" --Viewmodel path
SWEP.HoldType = "melee2"
SWEP.DefaultHoldType = "melee2"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -6,
Right = 1,
Forward = 3,
},
Ang = {
Up = -1,
Right = -4,
Forward = 178
},
Scale = 1.0
}
SWEP.Primary.Sound = ""--Sound("Weapon_Melee.HatchetLight")
SWEP.Secondary.Sound = ""--Sound("Weapon_Melee.FireaxeHeavy")
SWEP.MoveSpeed = 0.9
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(5.5, 1.424, -3.131)
SWEP.InspectAng = Vector(17.086, 3.938, 14.836)
SWEP.Primary.RPM = 50
SWEP.Primary.Damage = 70
SWEP.Secondary.BashDelay = 0.3
SWEP.ViewModelBoneMods = {
["ValveBiped.Bip01_R_Finger1"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0.254, 0.09), angle = Angle(15.968, -11.193, 1.437) },
["ValveBiped.Bip01_R_Finger0"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(3.552, 4.526, 0) },
["Thumb04"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(6, 0, 0) },
["Middle04"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(-8.212, 1.121, 1.263) },
["Pinky05"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(11.793, 4.677, 11.218) }
}

View File

@@ -0,0 +1,61 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Fubar"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_fubar.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_fubar.mdl" --Viewmodel path
SWEP.HoldType = "melee2"
SWEP.DefaultHoldType = "melee2"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -2,
Right = 0.5,
Forward = 0.5,
},
Ang = {
Up = -1,
Right = 5,
Forward = 178
},
Scale = 1.0
}
SWEP.MoveSpeed = 0.9
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(5.3, 1.7, -3.131)
SWEP.InspectAng = Vector(17.086, 3.938, 14.836)
SWEP.Primary.Blunt = true
SWEP.Primary.Damage = 100
SWEP.Primary.Reach = 90
SWEP.Primary.RPM = 40
SWEP.Primary.SoundDelay = 0.3
SWEP.Primary.Delay = 0.5
SWEP.Primary.Window = 0.3
SWEP.Secondary.Blunt = true
SWEP.Secondary.RPM = 40 -- Delay = 60/RPM, this is only AFTER you release your heavy attack
SWEP.Secondary.Damage = 200
SWEP.Secondary.Reach = 100
SWEP.Secondary.SoundDelay = 0.1
SWEP.Secondary.Delay = 0.4
SWEP.Secondary.BashDamage = 50
SWEP.Secondary.BashDelay = 0.4
SWEP.Secondary.BashLength = 70

View File

@@ -0,0 +1,77 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.AnimSequences = {
attack_quick = "Attack_Quick",
attack_quick2 = "Attack_Quick2",
charge_begin = "Attack_Charge_Begin",
charge_loop = "Attack_Charge_Idle",
charge_end = "Attack_Charge_End"
}
SWEP.PrintName = "Hatchet"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_hatchet.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_hatchet.mdl" --Viewmodel path
SWEP.HoldType = "melee"
SWEP.DefaultHoldType = "melee"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -5,
Right = 2,
Forward = 3.5,
},
Ang = {
Up = -1,
Right = 5,
Forward = 178
},
Scale = 1.0
}
SWEP.Primary.Sound = ""--Sound("Weapon_Melee.HatchetLight")
SWEP.Secondary.Sound = ""--Sound("Weapon_Melee.HatchetHeavy")
SWEP.MoveSpeed = 0.975
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(15.069, -15.437, 5.85)
SWEP.InspectAng = Vector(30.03, 43.618, 40.874)
SWEP.Primary.Reach = 65
SWEP.Primary.RPM = 80
SWEP.Primary.SoundDelay = 0.1
SWEP.Primary.Delay = 0.25
SWEP.Primary.Damage = 60
SWEP.Secondary.RPM = 45 -- Delay = 60/RPM, this is only AFTER you release your heavy attack
SWEP.Secondary.Damage = 100
SWEP.Secondary.Reach = 65
SWEP.Secondary.SoundDelay = 0.05
SWEP.Secondary.Delay = 0.25
SWEP.Secondary.BashDamage = 24
SWEP.Secondary.BashDelay = 0.1
SWEP.Secondary.BashLength = 54
SWEP.Secondary.BashDamageType = DMG_CLUB
SWEP.ViewModelBoneMods = {
["ValveBiped.Bip01_R_Finger1"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0.254, 0.09), angle = Angle(15.968, -11.193, 1.437) },
["ValveBiped.Bip01_R_Finger0"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(3.552, 4.526, 0) },
["Thumb04"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(6, 0, 0) },
["Maglite"] = { scale = Vector(0.009, 0.009, 0.009), pos = Vector(0, 0, -30), angle = Angle(0, 0, 0) }
}

View File

@@ -0,0 +1,63 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Kit Knife"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_kitknife.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_kitknife.mdl" --Viewmodel path
SWEP.HoldType = "knife"
SWEP.DefaultHoldType = "knife"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -1,
Right = 1,
Forward = 3.5,
},
Ang = {
Up = -1,
Right = 5,
Forward = 178
},
Scale = 1.3
}
SWEP.Primary.Sound = Sound("Weapon_KitKnife.SwingLight")
SWEP.Secondary.Sound = Sound("Weapon_KitKnife.SwingHeavy")
SWEP.MoveSpeed = 1.0
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(9.649, -18.091, 0.6)
SWEP.InspectAng = Vector(26.03, 61.206, 28.141)
SWEP.Primary.Reach = 40
SWEP.Primary.RPM = 85
SWEP.Primary.SoundDelay = 0.1
SWEP.Primary.Delay = 0.25
SWEP.Primary.Damage = 60
SWEP.Secondary.RPM = 60 -- Delay = 60/RPM, this is only AFTER you release your heavy attack
SWEP.Secondary.Damage = 90
SWEP.Secondary.Reach = 40
SWEP.Secondary.SoundDelay = 0.05
SWEP.Secondary.Delay = 0.25
SWEP.Secondary.BashDamage = 20
SWEP.Secondary.BashDelay = 0.1
SWEP.Secondary.BashLength = 54
SWEP.Secondary.BashDamageType = DMG_GENERIC
SWEP.Secondary.BashHitSound = ""

View File

@@ -0,0 +1,71 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Lead Pipe"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_pipe_lead.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_pipe_lead.mdl" --Viewmodel path
SWEP.HoldType = "melee"
SWEP.DefaultHoldType = "melee"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -5,
Right = 2,
Forward = 3.5,
},
Ang = {
Up = -1,
Right = 5,
Forward = 178
},
Scale = 1.0
}
SWEP.Primary.Sound = ""--Sound("Weapon_Melee.PipeLeadLight")
SWEP.Secondary.Sound = ""--Sound("Weapon_Melee.PipeLeadHeavy")
SWEP.MoveSpeed = 0.97
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(-3.418, -6.433, 8.241)
SWEP.InspectAng = Vector(-9.146, 9.145, 17.709)
SWEP.Primary.Blunt = true
SWEP.Primary.Damage = 55
SWEP.Primary.Reach = 60
SWEP.Primary.RPM = 90
SWEP.Primary.SoundDelay = 0
SWEP.Primary.Delay = 0.3
SWEP.Primary.Window = 0.2
SWEP.Secondary.Blunt = true
SWEP.Secondary.RPM = 60 -- Delay = 60/RPM, this is only AFTER you release your heavy attack
SWEP.Secondary.Damage = 85
SWEP.Secondary.Reach = 60
SWEP.Secondary.SoundDelay = 0.1
SWEP.Secondary.Delay = 0.3
SWEP.Secondary.BashDamage = 50
SWEP.Secondary.BashDelay = 0.35
SWEP.Secondary.BashLength = 50
SWEP.ViewModelBoneMods = {
["ValveBiped.Bip01_R_Finger1"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0.254, 0.09), angle = Angle(15.968, -11.193, 1.437) },
["ValveBiped.Bip01_R_Finger0"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(3.552, 4.526, 0) },
["Thumb04"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(6, 0, 0) },
["Maglite"] = { scale = Vector(0.009, 0.009, 0.009), pos = Vector(0, 0, -30), angle = Angle(0, 0, 0) }
}

View File

@@ -0,0 +1,63 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Machete"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_machete.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_machete.mdl" --Viewmodel path
SWEP.HoldType = "melee"
SWEP.DefaultHoldType = "melee"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -10,
Right = 2,
Forward = 4.0,
},
Ang = {
Up = -1,
Right = 5,
Forward = 178
},
Scale = 1.0
}
SWEP.Primary.Sound = Sound("Weapon_Melee.MacheteLight")
SWEP.Secondary.Sound = Sound("Weapon_Melee.MacheteHeavy")
SWEP.MoveSpeed = 0.975
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(15.069, -7.437, 10.85)
SWEP.InspectAng = Vector(26.03, 43.618, 54.874)
SWEP.Primary.Reach = 60
SWEP.Primary.RPM = 80
SWEP.Primary.SoundDelay = 0.1
SWEP.Primary.Delay = 0.25
SWEP.Primary.Damage = 60
SWEP.Secondary.RPM = 45 -- Delay = 60/RPM, this is only AFTER you release your heavy attack
SWEP.Secondary.Damage = 100
SWEP.Secondary.Reach = 55
SWEP.Secondary.SoundDelay = 0.05
SWEP.Secondary.Delay = 0.25
SWEP.Secondary.BashDamage = 15
SWEP.Secondary.BashDelay = 0.1
SWEP.Secondary.BashLength = 54
SWEP.Secondary.BashDamageType = DMG_GENERIC
SWEP.Secondary.BashHitSound = ""

View File

@@ -0,0 +1,45 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Pickaxe"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_pickaxe.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_pickaxe.mdl" --Viewmodel path
SWEP.HoldType = "melee2"
SWEP.DefaultHoldType = "melee2"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -4.7,
Right = 1,
Forward = 0.5,
},
Ang = {
Up = -1,
Right = 5,
Forward = 178
},
Scale = 1.0
}
SWEP.MoveSpeed = 0.95
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(4.84, 1.424, -3.131)
SWEP.InspectAng = Vector(17.086, 3.938, 14.836)
SWEP.Primary.Damage = 65
SWEP.Secondary.BashDelay = 0.3

View File

@@ -0,0 +1,61 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Sledgehammer"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_sledge.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_sledge.mdl" --Viewmodel path
SWEP.HoldType = "melee2"
SWEP.DefaultHoldType = "melee2"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -2,
Right = 0.75,
Forward = 4.0,
},
Ang = {
Up = -1,
Right = 8,
Forward = 185
},
Scale = 1.0
}
SWEP.MoveSpeed = 0.85
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(5.3, 1.7, -3.131)
SWEP.InspectAng = Vector(17.086, 3.938, 14.836)
SWEP.Primary.Blunt = true
SWEP.Primary.Damage = 100
SWEP.Primary.Reach = 85
SWEP.Primary.RPM = 40
SWEP.Primary.SoundDelay = 0.3
SWEP.Primary.Delay = 0.475
SWEP.Primary.Window = 0.3
SWEP.Secondary.Blunt = true
SWEP.Secondary.RPM = 40 -- Delay = 60/RPM, this is only AFTER you release your heavy attack
SWEP.Secondary.Damage = 160
SWEP.Secondary.Reach = 90
SWEP.Secondary.SoundDelay = 0.1
SWEP.Secondary.Delay = 0.4
SWEP.Secondary.BashDamage = 25
SWEP.Secondary.BashDelay = 0.3
SWEP.Secondary.BashLength = 70

View File

@@ -0,0 +1,72 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Spade"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_spade.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_spade.mdl" --Viewmodel path
SWEP.HoldType = "melee2"
SWEP.DefaultHoldType = "melee2"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -6,
Right = 1,
Forward = 3,
},
Ang = {
Up = -1,
Right = -4,
Forward = 178
},
Scale = 1.0
}
SWEP.Primary.Sound = ""--Sound("Weapon_Melee.HatchetLight")
SWEP.Secondary.Sound = ""--Sound("Weapon_Melee.FireaxeHeavy")
SWEP.MoveSpeed = 0.925
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(5.5, 1.424, -3.131)
SWEP.InspectAng = Vector(17.086, 3.938, 14.836)
SWEP.Primary.RPM = 70
SWEP.Primary.Damage = 60
SWEP.Primary.Reach = 70
SWEP.Primary.Delay = 0.5
SWEP.Primary.Blunt = true
SWEP.Secondary.RPM = 80
SWEP.Secondary.Damage = 100
SWEP.Secondary.Reach = 70
SWEP.Secondary.Delay = 0.25
SWEP.Secondary.Blunt = true
SWEP.Secondary.BashDamage = 40
SWEP.Secondary.BashDelay = 0.3
SWEP.Secondary.BashLength = 80
SWEP.Secondary.BashDamageType = DMG_CLUB
SWEP.Secondary.BashDelay = 0.3
SWEP.ViewModelBoneMods = {
["ValveBiped.Bip01_R_Finger1"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0.254, 0.09), angle = Angle(15.968, -11.193, 1.437) },
["ValveBiped.Bip01_R_Finger0"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(3.552, 4.526, 0) },
["Thumb04"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(6, 0, 0) },
["Middle04"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(-8.212, 1.121, 1.263) },
["Pinky05"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(11.793, 4.677, 11.218) }
}

View File

@@ -0,0 +1,71 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Pipe Wrench"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_wrench.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_wrench.mdl" --Viewmodel path
SWEP.HoldType = "knife"
SWEP.DefaultHoldType = "knife"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = 2,
Right = 2,
Forward = 0,
},
Ang = {
Up = -1,
Right = 5,
Forward = 178
},
Scale = 1.0
}
SWEP.Primary.Sound = Sound("Weapon_Melee.Wrench")
SWEP.Secondary.Sound = Sound("Weapon_Melee.Wrench")
SWEP.MoveSpeed = 0.97
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(-2.5, -12.58, 1.769)
SWEP.InspectAng = Vector(-6.19, 26.36, -4.468)
SWEP.Primary.Blunt = true
SWEP.Primary.Damage = 65
SWEP.Primary.Reach = 60
SWEP.Primary.RPM = 60
SWEP.Primary.SoundDelay = 0.2
SWEP.Primary.Delay = 0.4
SWEP.Primary.Window = 0.2
SWEP.Secondary.Blunt = true
SWEP.Secondary.RPM = 60 -- Delay = 60/RPM, this is only AFTER you release your heavy attack
SWEP.Secondary.Damage = 100
SWEP.Secondary.Reach = 60
SWEP.Secondary.SoundDelay = 0.1
SWEP.Secondary.Delay = 0.3
SWEP.Secondary.BashDamage = 50
SWEP.Secondary.BashDelay = 0.35
SWEP.Secondary.BashLength = 50
SWEP.ViewModelBoneMods = {
["ValveBiped.Bip01_R_Finger1"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0.254, 0.09), angle = Angle(15.968, -11.193, 1.437) },
["ValveBiped.Bip01_R_Finger0"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(3.552, 4.526, 0) },
["Thumb04"] = { scale = Vector(1, 1, 1), pos = Vector(0, 0, 0), angle = Angle(6, 0, 0) },
-- ["Maglite"] = { scale = Vector(0.009, 0.009, 0.009), pos = Vector(0, 0, -30), angle = Angle(0, 0, 0) }
}

View File

@@ -0,0 +1,11 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
include('shared.lua')

View File

@@ -0,0 +1,14 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')

View File

@@ -0,0 +1,598 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
DEFINE_BASECLASS("tfa_bash_base")
SWEP.Type = "Melee"
SWEP.LuaShellEject = false
SWEP.Primary.Blunt = false
SWEP.Primary.Damage = 60
SWEP.Primary.Reach = 75
SWEP.Primary.RPM = 60
SWEP.Primary.SoundDelay = 0.2
SWEP.Primary.Delay = 0.35
SWEP.Primary.Window = 0.3
SWEP.Secondary.Blunt = false
SWEP.Secondary.RPM = 45 -- Delay = 60/RPM, this is only AFTER you release your heavy attack
SWEP.Secondary.Damage = 120
SWEP.Secondary.Reach = 70
SWEP.Secondary.SoundDelay = 0.05
SWEP.Secondary.Delay = 0.25
SWEP.Secondary.BashDamage = 25
SWEP.Secondary.BashDelay = 0.2
SWEP.Secondary.BashLength = 65
SWEP.Secondary.BashDamageType = DMG_CLUB
SWEP.DisableChambering = true
SWEP.Primary.Motorized = false
SWEP.Primary.Motorized_ToggleBuffer = 0.1 --Blend time to idle when toggling
SWEP.Primary.Motorized_ToggleTime = 1.5 --Time until we turn on/off, independent of the above
SWEP.Primary.Motorized_IdleSound = Sound("Weapon_Chainsaw.IdleLoop") --Idle sound, when on
SWEP.Primary.Motorized_SawSound = Sound("Weapon_Chainsaw.SawLoop") --Rev sound, when on
SWEP.Primary.Motorized_AmmoConsumption_Idle = 100/120 --Ammo units to consume while idle
SWEP.Primary.Motorized_AmmoConsumption_Saw = 100/15 --Ammo units to consume while sawing
SWEP.Primary.Motorized_RPM = 600
SWEP.Primary.Motorized_Damage = 100 --DPS
SWEP.Primary.Motorized_Reach = 60 --DPS
SWEP.Slot = 0
SWEP.DrawCrosshair = false
SWEP.AnimSequences = {
attack_quick = "Attack_Quick",
--attack_quick2 = "Attack_Quick2",
charge_begin = "Attack_Charge_Begin",
charge_loop = "Attack_Charge_Idle",
charge_end = "Attack_Charge_End",
turn_on = "TurnOn",
turn_off = "TurnOff",
idle_on = "IdleOn",
attack_enter = "Idle_To_Attack",
attack_loop = "Attack_On",
attack_exit = "Attack_To_Idle"
}
SWEP.Primary.Ammo = ""
SWEP.Primary.ClipSize = -1
SWEP.Primary.Sound = Sound("Weapon_Melee.FireaxeLight")
SWEP.Primary.HitSound_Flesh = {
sharp = "Weapon_Melee_Sharp.Impact_Light",
blunt = "Weapon_Melee_Blunt.Impact_Light"
}
SWEP.Primary.HitSound = {
sharp = {
[MAT_CONCRETE] = Sound("Weapon_Melee.Impact_Concrete"),
[MAT_DIRT] = Sound("Weapon_Melee.Impact_Concrete"),
[MAT_GRASS] = Sound("Weapon_Melee.Impact_Generic"),
[MAT_SNOW] = Sound("Weapon_Melee.Impact_Generic"),
[MAT_SAND] = Sound("Weapon_Melee.Impact_Generic"),
[MAT_METAL] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_VENT] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_CLIP] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_COMPUTER] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_WOOD] = Sound("Weapon_Melee.Impact_Wood"),
[MAT_WARPSHIELD] = "",
[MAT_DEFAULT] = ""
},
blunt = {
[MAT_CONCRETE] = Sound("Weapon_Melee.Impact_Concrete"),
[MAT_DIRT] = Sound("Weapon_Melee.Impact_Concrete"),
[MAT_GRASS] = Sound("Weapon_Melee.Impact_Generic"),
[MAT_SNOW] = Sound("Weapon_Melee.Impact_Generic"),
[MAT_SAND] = Sound("Weapon_Melee.Impact_Generic"),
[MAT_METAL] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_VENT] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_CLIP] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_COMPUTER] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_WOOD] = Sound("Weapon_Melee.Impact_Wood"),
[MAT_WARPSHIELD] = "",
[MAT_DEFAULT] = ""
}
}
SWEP.Secondary.Sound = Sound("Weapon_Melee.FireaxeHeavy")
SWEP.Secondary.HitSound_Flesh = {
sharp = "Weapon_Melee_Sharp.Impact_Heavy",
blunt = "Weapon_Melee_Blunt.Impact_Heavy"
}
SWEP.Secondary.HitSound = {
sharp = {
[MAT_CONCRETE] = Sound("Weapon_Melee.Impact_Concrete"),
[MAT_DIRT] = Sound("Weapon_Melee.Impact_Concrete"),
[MAT_GRASS] = Sound("Weapon_Melee.Impact_Generic"),
[MAT_SNOW] = Sound("Weapon_Melee.Impact_Generic"),
[MAT_SAND] = Sound("Weapon_Melee.Impact_Generic"),
[MAT_METAL] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_VENT] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_CLIP] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_COMPUTER] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_WOOD] = Sound("Weapon_Melee.Impact_Wood"),
[MAT_WARPSHIELD] = "",
[MAT_DEFAULT] = ""
},
blunt = {
[MAT_CONCRETE] = Sound("Weapon_Melee.Impact_Concrete"),
[MAT_DIRT] = Sound("Weapon_Melee.Impact_Concrete"),
[MAT_GRASS] = Sound("Weapon_Melee.Impact_Generic"),
[MAT_SNOW] = Sound("Weapon_Melee.Impact_Generic"),
[MAT_SAND] = Sound("Weapon_Melee.Impact_Generic"),
[MAT_METAL] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_VENT] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_CLIP] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_COMPUTER] = Sound("Weapon_Melee.Impact_Metal"),
[MAT_WOOD] = Sound("Weapon_Melee.Impact_Wood"),
[MAT_WARPSHIELD] = "",
[MAT_DEFAULT] = ""
}
}
SWEP.InspectPos = Vector(4.84, 1.424, -3.131)
SWEP.InspectAng = Vector(17.086, 3.938, 14.836)
SWEP.IronSightsPos = Vector()
SWEP.IronSightsAng = Vector()
SWEP.Secondary.IronFOV = 90
SWEP.Sights_Mode = TFA.Enum.LOCOMOTION_LUA -- ANI = mdl, Hybrid = stop mdl animation, Lua = hybrid but continue idle
SWEP.Sprint_Mode = TFA.Enum.LOCOMOTION_LUA -- ANI = mdl, Hybrid = ani + lua, Lua = lua only
SWEP.Idle_Mode = TFA.Enum.IDLE_BOTH
SWEP.RunSightsPos = Vector(0,0,0)
SWEP.RunSightsAng = Vector(0,0,0)
SWEP.data = {}
SWEP.data.ironsights = 0
SWEP.IsKnife = true
DEFINE_BASECLASS("tfa_bash_base")
SWEP.TFA_NMRIH_MELEE = true
SWEP.UseHands = true
SWEP.NextSwingSoundTime = -1
SWEP.NextSwingTime = -1
local stat
function SWEP:Deploy()
BaseClass.Deploy(self)
if not self:OwnerIsValid() then return true end
self.Owner.LastNMRIMSwing = nil
self.Owner.HasTFANMRIMSwing = false
return true
end
function SWEP:Holster( ... )
if not self:OwnerIsValid() then return true end
self.Owner.LastNMRIMSwing = nil
self.Owner.HasTFANMRIMSwing = false
self:StopSound( self.Primary.Motorized_SawSound )
self:StopSound( self.Primary.Motorized_IdleSound )
return BaseClass.Holster( self, ... )
end
local IdleStatus = {
[ TFA.GetStatus("NMRIH_MELEE_CHARGE_LOOP") ] = true,
[ TFA.GetStatus("NMRIH_MELEE_MOTOR_LOOP") ] = true,
[ TFA.GetStatus("NMRIH_MELEE_MOTOR_ATTACK") ] = true
}
local OnStatus = {
[ TFA.GetStatus("NMRIH_MELEE_MOTOR_LOOP") ] = true,
[ TFA.GetStatus("NMRIH_MELEE_MOTOR_ATTACK") ] = true
}
local TYPE_PRIMARY = 0
local TYPE_SECONDARY = 1
local TYPE_MOTORIZED = 2
SWEP.AmmoDrainDelta = 0
function SWEP:Think2()
if not self:OwnerIsValid() then return end
stat = self:GetStatus()
if self.Primary.Motorized then
--[[
if stat == TFA.GetStatus("bashing") and self.GetBashing and self:GetBashing() and CurTime() >= self:GetStatusEnd() and self.reqon then
stat = TFA.GetStatus("NMRIH_MELEE_MOTOR_LOOP")
self:SetStatus( stat )
self:SetStatusEnd( math.huge )
self:ChooseIdleAnim()
self:PlayIdleSound( false )
self:CompleteReload()
end
]]--
if OnStatus[stat] then
if SERVER then
self.AmmoDrainDelta = self.AmmoDrainDelta + ( self.Owner:KeyDown(IN_ATTACK) and self.Primary.Motorized_AmmoConsumption_Saw or self.Primary.Motorized_AmmoConsumption_Idle ) * TFA.FrameTime()
while self.AmmoDrainDelta > 0 do
self.AmmoDrainDelta = self.AmmoDrainDelta - 1
self:TakePrimaryAmmo(1)
end
end
if self:Clip1() <= 0 then
self:TurnOff()
elseif stat == TFA.GetStatus("NMRIH_MELEE_MOTOR_ATTACK") and CurTime() > self:GetNextPrimaryFire() then
local ft = 60 / self.Primary.Motorized_RPM
self:HitThing( self.Primary.Motorized_Damage * ft, self.Primary.Motorized_Damage * 0.2 * ft, self.Primary.Motorized_Reach, false, TYPE_MOTORIZED )
self:SetNextPrimaryFire( CurTime() + ft )
end
end
if stat == TFA.GetStatus("NMRIH_MELEE_MOTOR_START") and CurTime() > self:GetStatusEnd() then
stat = TFA.GetStatus("NMRIH_MELEE_MOTOR_LOOP")
self:SetStatus( stat )
self:SetStatusEnd( math.huge )
self:ChooseIdleAnim()
self:PlayIdleSound( false )
self:CompleteReload()
elseif stat == TFA.GetStatus("NMRIH_MELEE_MOTOR_LOOP") and self.Owner:KeyDown(IN_ATTACK) then
stat = TFA.GetStatus("NMRIH_MELEE_MOTOR_ATTACK")
self:SetStatus( stat )
self:SetStatusEnd( math.huge )
self:SendViewModelSeq(self.AnimSequences.attack_enter)
self:StopSound(self.Primary.Motorized_IdleSound)
self.HasPlayedSound[ "idle" ] = false
elseif stat == TFA.GetStatus("NMRIH_MELEE_MOTOR_ATTACK") and not self.Owner:KeyDown(IN_ATTACK) then
stat = TFA.GetStatus("NMRIH_MELEE_MOTOR_LOOP")
self:SetStatus( stat )
self:SetStatusEnd( math.huge )
self:SendViewModelSeq(self.AnimSequences.attack_exit)
self:StopSound(self.Primary.Motorized_SawSound)
self.HasPlayedSound[ "saw" ] = false
end
end
if stat == TFA.GetStatus("NMRIH_MELEE_CHARGE_START") and CurTime() > self:GetStatusEnd() then
stat = TFA.GetStatus("NMRIH_MELEE_CHARGE_LOOP")
self:SetStatus( stat )
self:SetStatusEnd( math.huge )
self:ChooseIdleAnim()
end
if stat == TFA.GetStatus("NMRIH_MELEE_CHARGE_LOOP") and not self.Owner:KeyDown(IN_ATTACK) then
stat = TFA.GetStatus("NMRIH_MELEE_CHARGE_END")
self:SwingThirdPerson()
self:SendViewModelSeq(self.AnimSequences.charge_end)
self:SetStatus( stat )
self:SetStatusEnd( CurTime() + self.OwnerViewModel:SequenceDuration() - 0.3 )
self.Owner.HasTFANMRIMSwing = false
self.Owner.LastNMRIMSwing = nil
end
BaseClass.Think2(self)
if game.SinglePlayer() and CLIENT then return end
self:HandleDelayedAttack( stat )
if IdleStatus[stat] and CurTime() > self:GetNextIdleAnim() then
self:ChooseIdleAnim()
end
end
function SWEP:Reload()
if not self.Primary.Motorized then return end
if not self.Owner:KeyPressed(IN_RELOAD) then return end
stat = self:GetStatus()
if stat == TFA.GetStatus("IDLE") and ( self:Clip1() > 0 or self:Ammo1() > 0 ) then
self.reqon = true
self:SendViewModelSeq(self.AnimSequences.turn_on)
self:SetStatus( TFA.GetStatus("NMRIH_MELEE_MOTOR_START") )
self:SetStatusEnd( CurTime() + self.OwnerViewModel:SequenceDuration() - 0.1 )
elseif stat == TFA.GetStatus("NMRIH_MELEE_MOTOR_LOOP") then
self:TurnOff()
end
end
function SWEP:TurnOff()
self:SendViewModelSeq(self.AnimSequences.turn_off)
self:SetStatus( TFA.GetStatus("NMRIH_MELEE_MOTOR_END") )
self:SetStatusEnd( CurTime() + self.OwnerViewModel:SequenceDuration() - 0.1 )
self:StopSound( self.Primary.Motorized_SawSound )
self:StopSound( self.Primary.Motorized_IdleSound )
self.reqon = false
end
SWEP.wassw_old = false
SWEP.wassw_hard_old = false
function SWEP:HandleDelayedAttack( statv )
stat = statv
if stat == TFA.GetStatus("NMRIH_MELEE_SWING") then
if self.wassw_old == false then
self.NextSwingTime = CurTime() + self.Primary.Delay
self.NextSwingSoundTime = CurTime() + self.Primary.SoundDelay
end
if self.NextSwingTime > 0 and CurTime() > self.NextSwingTime then
self:HitThing( self.Primary.Damage, self.Primary.Damage * 0.2, self.Primary.Reach, self.Primary.Blunt, TYPE_PRIMARY )
self.NextSwingTime = -1
if (SERVER and self.Owner:IsPlayer() and self.Owner.GetCharacter and self.Owner:GetCharacter()) then
self.Owner:GetCharacter():DoAction("melee_slash")
end
end
if self.NextSwingSoundTime > 0 and CurTime() > self.NextSwingSoundTime then
self:EmitSound(self.Primary.Sound)
self.NextSwingSoundTime = -1
end
self.wassw_old = true
else
self.wassw_old = false
end
if stat == TFA.GetStatus("NMRIH_MELEE_CHARGE_END") then
if self.wassw_hard_old == false then
self.NextSwingTime_Hard = CurTime() + self.Secondary.Delay
self.NextSwingSoundTime_Hard = CurTime() + self.Secondary.SoundDelay
end
if self.NextSwingTime_Hard > 0 and CurTime() > self.NextSwingTime_Hard then
self:HitThing( self.Secondary.Damage, self.Secondary.Damage * 0.2, self.Secondary.Reach, self.Secondary.Blunt, TYPE_SECONDARY )
self.NextSwingTime_Hard = -1
if (SERVER and self.Owner:IsPlayer() and self.Owner.GetCharacter and self.Owner:GetCharacter()) then
self.Owner:GetCharacter():DoAction("melee_slash_heavy")
end
end
if self.NextSwingSoundTime_Hard > 0 and CurTime() > self.NextSwingSoundTime_Hard then
self:EmitSound(self.Secondary.Sound)
if self.Owner.Vox then
self.Owner:Vox("bash", 4)
end
self.NextSwingSoundTime_Hard = -1
end
self.wassw_hard_old = true
else
self.wassw_hard_old = false
end
end
function SWEP:PrimaryAttack( release, docharge )
self:VMIV()
if (release) then
if (not docharge) then
self:Swing()
else
self:StartCharge()
end
end
end
function SWEP:Swing()
if (!self:VMIV()) then return end
if (hook.Run("CanDoMeleeAttack", self) == false) then
return
end
math.randomseed(CurTime() - 1)
if (self.AnimSequences.attack_quick2 and math.random(0,1) == 0) then
self:SendViewModelSeq(self.AnimSequences.attack_quick2)
else
self:SendViewModelSeq(self.AnimSequences.attack_quick)
end
self:SwingThirdPerson()
self:SetStatus(TFA.GetStatus("NMRIH_MELEE_SWING"))
self:SetStatusEnd(CurTime() + 60 / self.Primary.RPM)
self.NeedsHit = true
end
function SWEP:StartCharge()
if (hook.Run("CanDoHeavyMeleeAttack", self) == false) then
self.Owner.HasTFANMRIMSwing = false
self.Owner.LastNMRIMSwing = nil
return
end
self:SendViewModelSeq(self.AnimSequences.charge_begin)
self:SetStatus( TFA.GetStatus("NMRIH_MELEE_CHARGE_START") )
self:SetStatusEnd( CurTime() + self.OwnerViewModel:SequenceDuration() - 0.1 )
end
local pos,ang,hull
hull = {}
function SWEP:HitThing( damage, force, reach, blunt, sndtype )
if not self:OwnerIsValid() then return end
pos = self.Owner:GetShootPos()
ang = self.Owner:GetAimVector()
local secondary = false
if sndtype == TYPE_SECONDARY then
if (hook.Run("CanDoHeavyMeleeAttack", self) == false) then
return
end
secondary = true
elseif sndtype == TYPE_PRIMARY then
if (hook.Run("CanDoMeleeAttack", self) == false) then
return
end
end
self.Owner:LagCompensation(true)
hull.start = pos
hull.endpos = pos + (ang * reach)
hull.filter = self.Owner
hull.mins = Vector(-5, -5, 0)
hull.maxs = Vector(5, 5, 5)
local slashtrace = util.TraceHull(hull)
self.Owner:LagCompensation(false)
if slashtrace.Hit then
if slashtrace.Entity == nil then return end
if (SERVER and IsValid(slashtrace.Entity) and (slashtrace.Entity:IsPlayer() or slashtrace.Entity:IsNPC())) then
if (sndtype == TYPE_SECONDARY) then
self.ixAttackType = "heavy"
elseif (sndtype == TYPE_PRIMARY) then
self.ixAttackType = nil
end
end
if game.GetTimeScale() > 0.99 then
local srctbl = secondary and self.Secondary or self.Primary
if sndtype == TYPE_MOTORIZED then srctbl = nil end
self.Owner:FireBullets({
Attacker = self.Owner,
Inflictor = self,
Damage = damage,
Force = force,
Distance = reach + 10,
HullSize = 12.5,
Tracer = 0,
Src = self.Owner:GetShootPos(),
Dir = slashtrace.Normal,
Callback = function(a, b, c)
if c then
if sndtype == TYPE_MOTORIZED then
c:SetDamageType( bit.bor( DMG_SLASH,DMG_ALWAYSGIB) )
else
c:SetDamageType( blunt and DMG_CLUB or DMG_SLASH )
end
end
if srctbl then
if b.MatType == MAT_FLESH or b.MatType == MAT_ALIENFLESH then
self:EmitSound( srctbl.HitSound_Flesh["sharp"] or srctbl.HitSound_Flesh["blunt"] )
else
local sndtbl = srctbl.HitSound[ blunt and "blunt" or "sharp" ]
local snd = sndtbl[ b.MatType ] or sndtbl[ MAT_DIRT ]
self:EmitSound( snd )
end
end
end
})
else
local dmg = DamageInfo()
dmg:SetAttacker(self.Owner)
dmg:SetInflictor(self)
dmg:SetDamagePosition(self.Owner:GetShootPos())
dmg:SetDamageForce(self.Owner:GetAimVector() * (damage * 0.25))
dmg:SetDamage(damage)
if sndtype == TYPE_MOTORIZED then
dmg:SetDamageType( bit.bor( DMG_SLASH,DMG_ALWAYSGIB) )
else
dmg:SetDamageType( blunt and DMG_CLUB or DMG_SLASH )
end
slashtrace.Entity:TakeDamageInfo(dmg)
end
targ = slashtrace.Entity
local srctbl = secondary and self.Secondary or self.Primary
if sndtype == TYPE_MOTORIZED then sndtbl = nil end
if srctbl and game.GetTimeScale() < 0.99 then
if slashtrace.MatType == MAT_FLESH or slashtrace.MatType == MAT_ALIENFLESH then
self:EmitSound( srctbl.HitSound_Flesh["sharp"] or srctbl.HitSound_Flesh["blunt"] )
else
local sndtbl = srctbl.HitSound[ blunt and "blunt" or "sharp" ]
local snd = sndtbl[ slashtrace.MatType ] or sndtbl[ MAT_DIRT ]
self:EmitSound( snd )
end
end
end
end
function SWEP:ChooseIdleAnim()
stat = self:GetStatus()
if self.Primary.Motorized then
if stat == TFA.GetStatus("NMRIH_MELEE_MOTOR_LOOP") then
self:SendViewModelSeq(self.AnimSequences.idle_on)
self:PlayIdleSound( false )
elseif stat == TFA.GetStatus("NMRIH_MELEE_MOTOR_ATTACK") then
self:SendViewModelSeq(self.AnimSequences.attack_loop)
self:PlayIdleSound( true )
end
return
end
if stat == TFA.GetStatus("NMRIH_MELEE_CHARGE_LOOP") then
self:SendViewModelSeq(self.AnimSequences.charge_loop)
else
BaseClass.ChooseIdleAnim(self)
end
end
SWEP.HasPlayedSound = {
["idle"] = false,
["saw"] = false
}
function SWEP:PlayIdleSound( sawing )
if game.SinglePlayer() and CLIENT then return end
local sndid = sawing and "saw" or "idle"
if sawing and self.HasPlayedSound[ "idle" ] then
self:StopSound(self.Primary.Motorized_IdleSound)
self.HasPlayedSound[ "idle" ] = false
elseif self.HasPlayedSound[ "saw" ] and not sawing then
self:StopSound(self.Primary.Motorized_SawSound)
self.HasPlayedSound[ "saw" ] = false
end
if not self.HasPlayedSound[ sndid ] then
self.HasPlayedSound[ sndid ] = true
self:EmitSound( sawing and self.Primary.Motorized_SawSound or self.Primary.Motorized_IdleSound)
end
end
function SWEP:DoImpactEffect(tr, dmgtype)
if not IsValid(self) then return end
stat = self:GetStatus()
if stat == TFA.GetStatus("NMRIH_MELEE_SWING") then
dmgtype = self.Primary.Blunt and DMG_CLUB or DMG_SLASH
elseif stat == TFA.GetStatus("NMRIH_MELEE_CHARGE_END") then
dmgtype = self.Secondary.Blunt and DMG_CLUB or DMG_SLASH
elseif self.Primary.Motorized and not ( self.GetBashing and self:GetBashing() ) then
dmgtype = DMG_SLASH
end
if tr.MatType ~= MAT_FLESH and tr.MatType ~= MAT_ALIENFLESH then
self:ImpactEffectFunc( tr.HitPos, tr.HitNormal, tr.MatType )
if tr.HitSky then return true end
if bit.band(dmgtype,DMG_SLASH) == DMG_SLASH then
util.Decal("ManhackCut", tr.HitPos + tr.HitNormal * 4, tr.HitPos - tr.HitNormal)
return true
else
return false
end
end
return false
end
function SWEP:SwingThirdPerson()
if self.HoldType == "melee" or self.HoldType == "melee2" then
self.Owner:SetAnimation(PLAYER_ATTACK1)
else
self.Owner:AnimRestartGesture(0, ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE2, true)
end
end
function SWEP:ProcessHoldType( ... )
if self.Primary.Motorized and self:GetStatus() == TFA.GetStatus("NMRIH_MELEE_MOTOR_ATTACK") then
self:SetHoldType( "ar2" )
else
BaseClass.ProcessHoldType(self, ...)
end
end
function SWEP:AltAttack()
return BaseClass.AltAttack(self)
end
local l_CT = CurTime
function SWEP:AltAttack()
BaseClass.AltAttack(self)
end

View File

@@ -0,0 +1,61 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
SWEP.Base = "tfa_nmrimelee_base"
SWEP.Category = "Willard Melee Weapons"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Event Claw"
SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_sledge.mdl" --Viewmodel path
SWEP.ViewModelFOV = 50
SWEP.WorldModel = "" --Viewmodel path
SWEP.HoldType = "melee2"
SWEP.DefaultHoldType = "melee2"
SWEP.Offset = { --Procedural world model animation, defaulted for CS:S purposes.
Pos = {
Up = -2,
Right = 0.75,
Forward = 4.0,
},
Ang = {
Up = -1,
Right = 8,
Forward = 185
},
Scale = 1.0
}
SWEP.MoveSpeed = 1
SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed
SWEP.InspectPos = Vector(5.3, 1.7, -3.131)
SWEP.InspectAng = Vector(17.086, 3.938, 14.836)
SWEP.Primary.Blunt = true
SWEP.Primary.Damage = 100
SWEP.Primary.Reach = 85
SWEP.Primary.RPM = 40
SWEP.Primary.SoundDelay = 0.3
SWEP.Primary.Delay = 0.475
SWEP.Primary.Window = 0.3
SWEP.Secondary.Blunt = true
SWEP.Secondary.RPM = 40 -- Delay = 60/RPM, this is only AFTER you release your heavy attack
SWEP.Secondary.Damage = 160
SWEP.Secondary.Reach = 90
SWEP.Secondary.SoundDelay = 0.1
SWEP.Secondary.Delay = 0.4
SWEP.Secondary.BashDamage = 25
SWEP.Secondary.BashDelay = 0.3
SWEP.Secondary.BashLength = 70