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,330 @@
--[[
| 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( "shared.lua" )
include( 'shared.lua' )
include( 'outputs.lua' )
FRAG_GRENADE_BLIP_FREQUENCY_HL2R = 1.0
FRAG_GRENADE_BLIP_FAST_FREQUENCY_HL2R = 0.3
FRAG_GRENADE_GRACE_TIME_AFTER_PICKUP_HL2R = 1.5
FRAG_GRENADE_WARN_TIME_HL2R = 1.5
GRENADE_COEFFICIENT_OF_RESTITUTION_HL2R = 0.2;
local sk_plr_dmg_fraggrenade = 125;
local sk_npc_dmg_fraggrenade = 75;
local sk_fraggrenade_radius = 250;
GRENADE_MODEL_HL2R = "models/weapons/tfa_hl2r/w_grenade_thrown.mdl"
GLOW_CREATED_HL2R = FALSE;
function ENT:GetShakeAmplitude() return 25.0; end
function ENT:GetShakeRadius() return 750.0; end
// Damage accessors.
function ENT:GetDamage()
return self.m_flDamage;
end
function ENT:GetDamageRadius()
return self.m_DmgRadius;
end
function ENT:SetDamage(flDamage)
self.m_flDamage = flDamage;
end
function ENT:SetDamageRadius(flDamageRadius)
self.m_DmgRadius = flDamageRadius;
end
// Bounce sound accessors.
function ENT:SetBounceSound( pszBounceSound )
self.m_iszBounceSound = tostring( pszBounceSound );
end
function ENT:BlipSound()
local efdata = EffectData()
efdata:SetEntity(self)
efdata:SetFlags(1) -- regular beep
util.Effect("tfa_hl2r_frag_beeplight", efdata)
self.Entity:EmitSound( self.Sound.Blip );
end
// UNDONE: temporary scorching for PreAlpha - find a less sleazy permenant solution.
function ENT:Explode( pTrace, bitsDamageType )
if !( CLIENT ) then
self.Entity:SetModel( "" );//invisible
self.Entity:SetColor( color_transparent );
self.Entity:SetSolid( SOLID_NONE );
self.m_takedamage = DAMAGE_NO;
local vecAbsOrigin = self.Entity:GetPos();
local contents = util.PointContents ( vecAbsOrigin );
if ( pTrace.Fraction != 1.0 ) then
local vecNormal = pTrace.HitNormal;
local pdata = pTrace.MatType;
util.BlastDamage( self.Entity, // don't apply cl_interp delay
self:GetOwner(),
self.Entity:GetPos(),
self.m_DmgRadius,
self.m_flDamage );
else
util.BlastDamage( self.Entity, // don't apply cl_interp delay
self:GetOwner(),
self.Entity:GetPos(),
self.m_DmgRadius,
self.m_flDamage );
end
self:DoExplodeEffect();
self:OnExplode( pTrace );
self.Entity:EmitSound( self.Sound.Explode );
self.Touch = function( ... ) return end;
self.Entity:SetSolid( SOLID_NONE );
self.Entity:SetVelocity( self:GetPos() );
// Because the grenade is zipped out of the world instantly, the EXPLOSION sound that it makes for
// the AI is also immediately destroyed. For this reason, we now make the grenade entity inert and
// throw it away in 1/10th of a second instead of right away. Removing the grenade instantly causes
// intermittent bugs with env_microphones who are listening for explosions. They will 'randomly' not
// hear explosion sounds when the grenade is removed and the SoundEnt thinks (and removes the sound)
// before the env_microphone thinks and hears the sound.
SafeRemoveEntityDelayed( self.Entity, 0.1 );
end
end
function ENT:Detonate()
local tr;
local vecSpot;// trace starts here!
self.Think = function( ... ) return end;
if self:WaterLevel() < 3 then
local explode = ents.Create( "info_particle_system" )
explode:SetKeyValue( "effect_name", "hl2r_explosion_grenade_noaftersmoke" )
explode:SetOwner( self.Owner )
explode:SetPos( self:GetPos() )
explode:Spawn()
explode:Activate()
explode:Fire( "start", "", 0 )
explode:Fire( "kill", "", 30 )
end
vecSpot = self.Entity:GetPos() + Vector ( 0 , 0 , 8 );
tr = {};
tr.start = vecSpot;
tr.endpos = vecSpot + Vector ( 0, 0, -32 );
tr.mask = MASK_SHOT_HULL;
tr.filter = self.Entity;
tr.collision = COLLISION_GROUP_NONE;
tr = util.TraceLine ( tr);
if( tr.StartSolid ) then
// Since we blindly moved the explosion origin vertically, we may have inadvertently moved the explosion into a solid,
// in which case nothing is going to be harmed by the grenade's explosion because all subsequent traces will startsolid.
// If this is the case, we do the downward trace again from the actual origin of the grenade. (sjb) 3/8/2007 (for ep2_outland_09)
tr = {};
tr.start = self.Entity:GetPos();
tr.endpos = self.Entity:GetPos() + Vector( 0, 0, -32);
tr.mask = MASK_SHOT_HULL;
tr.filter = self.Entity;
tr.collision = COLLISION_GROUP_NONE;
tr = util.TraceLine( tr );
end
tr = self:Explode( tr, DMG_BLAST );
if ( self:GetShakeAmplitude() ) then
util.ScreenShake( self.Entity:GetPos(), self:GetShakeAmplitude(), 150.0, 1.0, self:GetShakeRadius() );
end
end
/*---------------------------------------------------------
Name: Initialize
---------------------------------------------------------*/
function ENT:Initialize()
self.m_hThrower = NULL;
self.m_hOriginalThrower = NULL;
self.m_bIsLive = false;
self.m_DmgRadius = 100;
self.m_flDetonateTime = CurTime() + GRENADE_TIMER_HL2R;
self.m_flWarnAITime = CurTime() + GRENADE_TIMER_HL2R - FRAG_GRENADE_WARN_TIME_HL2R;
self.m_bHasWarnedAI = false;
self:Precache( );
self.Entity:SetModel( GRENADE_MODEL_HL2R );
if( self:GetOwner() && self:GetOwner():IsPlayer() ) then
self.m_flDamage = sk_plr_dmg_fraggrenade;
self.m_DmgRadius = sk_fraggrenade_radius;
else
self.m_flDamage = sk_npc_dmg_fraggrenade;
self.m_DmgRadius = sk_fraggrenade_radius;
end
self.m_takedamage = DAMAGE_YES;
self.m_iHealth = 1;
self.Entity:SetCollisionBounds( -Vector(4,4,4), Vector(4,4,4) );
self:CreateVPhysics();
self:BlipSound();
self.m_flNextBlipTime = CurTime() + FRAG_GRENADE_BLIP_FREQUENCY_HL2R;
self.m_combineSpawned = false;
self.m_punted = false;
self:CreateEffects();
self:OnInitialize();
self.BaseClass:Initialize();
end
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
function ENT:OnRestore()
// If we were primed and ready to detonate, put FX on us.
if (self.m_flDetonateTime > 0) then
self:CreateEffects();
end
self.BaseClass:OnRestore();
end
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
function ENT:CreateEffects()
local nAttachment = self:LookupAttachment( "fuse" );
// Start up the eye trail
self.m_pGlowTrail = util.SpriteTrail( self.Entity, nAttachment, self.Trail.Color, true, self.Trail.StartWidth, self.Trail.EndWidth, self.Trail.LifeTime, 1 / ( self.Trail.StartWidth + self.Trail.EndWidth ) * 0.5, self.Trail.Material );
end
function ENT:CreateVPhysics()
// Create the object in the physics system
self.Entity:PhysicsInit( SOLID_VPHYSICS, 0, false );
local Phys = self:GetPhysicsObject()
if ( Phys ) then
Phys:SetMaterial( "grenade" )
end
return true;
end
function ENT:Precache()
util.PrecacheModel( GRENADE_MODEL_HL2R );
util.PrecacheSound( self.Sound.Blip );
util.PrecacheModel( "sprites/redglow1.vmt" );
util.PrecacheModel( self.Trail.Material );
util.PrecacheSound( self.Sound.Explode );
end
function ENT:SetTimer( detonateDelay, warnDelay )
self.m_flDetonateTime = CurTime() + detonateDelay;
self.m_flWarnAITime = CurTime() + warnDelay;
self.Entity:NextThink( CurTime() );
self:CreateEffects();
end
function ENT:Think()
self:OnThink()
if( CurTime() > self.m_flDetonateTime ) then
self:Detonate();
return;
end
if( !self.m_bHasWarnedAI && CurTime() >= self.m_flWarnAITime ) then
self.m_bHasWarnedAI = true;
end
if( CurTime() > self.m_flNextBlipTime ) then
self:BlipSound();
if( self.m_bHasWarnedAI ) then
self.m_flNextBlipTime = CurTime() + FRAG_GRENADE_BLIP_FAST_FREQUENCY_HL2R;
else
self.m_flNextBlipTime = CurTime() + FRAG_GRENADE_BLIP_FREQUENCY_HL2R;
end
end
self.Entity:NextThink( CurTime() + 0.1 );
end
function ENT:SetVelocity( velocity, angVelocity )
local pPhysicsObject = self:GetPhysicsObject();
if ( pPhysicsObject ) then
pPhysicsObject:AddVelocity( velocity );
pPhysicsObject:AddAngleVelocity( angVelocity );
end
end
/*---------------------------------------------------------
Name: OnTakeDamage
---------------------------------------------------------*/
function ENT:OnTakeDamage( dmginfo )
// Manually apply vphysics because BaseCombatCharacter takedamage doesn't call back to CBaseEntity OnTakeDamage
self.Entity:TakePhysicsDamage( dmginfo );
// Grenades only suffer blast damage and burn damage.
if( !(dmginfo:GetDamageType() == bit.bor( DMG_BLAST, DMG_BURN) ) ) then
return 0;
end
return self.BaseClass:OnTakeDamage( dmginfo );
end

View File

@@ -0,0 +1,84 @@
--[[
| 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/
--]]
ENT.Sound = {}
ENT.Sound.Blip = "TFA_HL2R_Grenade.Beep"
ENT.Sound.Explode = "BaseGrenade.Explode"
ENT.Trail = {}
ENT.Trail.Color = Color( 255, 0, 0, 255 )
ENT.Trail.Material = "sprites/bluelaser1.vmt"
ENT.Trail.StartWidth = 8.0
ENT.Trail.EndWidth = 1.0
ENT.Trail.LifeTime = 0.5
// Nice helper function, this does all the work.
/*---------------------------------------------------------
Name: DoExplodeEffect
---------------------------------------------------------*/
function ENT:DoExplodeEffect()
local info = EffectData();
info:SetEntity( self.Entity );
info:SetOrigin( self.Entity:GetPos() );
if self:WaterLevel() >= 3 then
util.Effect("WaterSurfaceExplosion", info)
end
--util.Effect( "Explosion", info );
self:EmitSound("BaseExplosionEffect.Sound")
util.Effect("tfa_hl2r_fx_explosion_dlight", info)
end
/*---------------------------------------------------------
Name: OnExplode
Desc: The grenade has just exploded.
---------------------------------------------------------*/
function ENT:OnExplode( pTrace )
local Pos1 = pTrace.HitPos + pTrace.HitNormal
local Pos2 = pTrace.HitPos - pTrace.HitNormal
util.Decal( "Scorch", Pos1, Pos2 );
end
/*---------------------------------------------------------
Name: OnInitialize
---------------------------------------------------------*/
function ENT:OnInitialize()
end
/*---------------------------------------------------------
Name: StartTouch
---------------------------------------------------------*/
function ENT:StartTouch( entity )
end
/*---------------------------------------------------------
Name: EndTouch
---------------------------------------------------------*/
function ENT:EndTouch( entity )
end
/*---------------------------------------------------------
Name: Touch
---------------------------------------------------------*/
function ENT:Touch( entity )
end
/*---------------------------------------------------------
Name: OnThink
---------------------------------------------------------*/
function ENT:OnThink()
end

View File

@@ -0,0 +1,17 @@
--[[
| 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/
--]]
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.PrintName = ""
ENT.Author = ""
ENT.Spawnable = false
ENT.AdminSpawnable = false

View File

@@ -0,0 +1,176 @@
--[[
| 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( "shared.lua" )
include( 'shared.lua' )
include( 'outputs.lua' )
MAX_AR2_NO_COLLIDE_TIME = 0.2
AR2_GRENADE_MAX_DANGER_RADIUS = 300
// Moved to HL2_SharedGameRules because these are referenced by shared AmmoDef functions
local sk_plr_dmg_smg1_grenade = 100;
local sk_npc_dmg_smg1_grenade = 50;
local sk_max_smg1_grenade = 3;
local sk_smg1_grenade_radius = 250;
/*---------------------------------------------------------
Name: Initialize
---------------------------------------------------------*/
function ENT:Initialize()
self:Precache( );
self.Entity:SetModel( "models/Items/AR2_Grenade.mdl");
self.Entity:PhysicsInit( SOLID_VPHYSICS );
self.Entity:SetMoveCollide( MOVECOLLIDE_FLY_BOUNCE );
// Hits everything but debris
self.Entity:SetCollisionGroup( COLLISION_GROUP_PROJECTILE );
self.Entity:GetPhysicsObject():SetBuoyancyRatio( 0 )
self.Entity:SetCollisionBounds(Vector(-3, -3, -3), Vector(3, 3, 3));
// self.Entity:SetCollisionBounds(Vector(0, 0, 0), Vector(0, 0, 0));
self.Entity:NextThink( CurTime() + 0.1 );
if( self:GetOwner() && self:GetOwner():IsPlayer() ) then
self.m_flDamage = sk_plr_dmg_smg1_grenade;
else
self.m_flDamage = sk_npc_dmg_smg1_grenade;
end
self.m_DmgRadius = sk_smg1_grenade_radius;
self.m_takedamage = DAMAGE_YES;
self.m_bIsLive = true;
self.m_iHealth = 1;
self.Entity:SetGravity( 400 / 600 ); // use a lower gravity for grenades to make them easier to see
self.Entity:SetFriction( 0.8 );
self.Entity:SetSequence( 0 );
self.m_fDangerRadius = 100;
self.m_fSpawnTime = CurTime();
ParticleEffectAttach("rocket_smoke_trail", PATTACH_ABSORIGIN_FOLLOW, self, 0)
self:OnInitialize();
end
//-----------------------------------------------------------------------------
// Purpose: The grenade has a slight delay before it goes live. That way the
// person firing it can bounce it off a nearby wall. However if it
// hits another character it blows up immediately
// Input :
// Output :
//-----------------------------------------------------------------------------
function ENT:Think()
self:OnThink()
self.Entity:NextThink( CurTime() + 0.05 );
if (!self.m_bIsLive) then
// Go live after a short delay
if (self.m_fSpawnTime + MAX_AR2_NO_COLLIDE_TIME < CurTime()) then
self.m_bIsLive = true;
end
end
// If I just went solid and my velocity is zero, it means I'm resting on
// the floor already when I went solid so blow up
if (self.m_bIsLive) then
if (self.Entity:GetVelocity():Length() == 0.0 ||
self.Entity:GetGroundEntity() != NULL ) then
// self:Detonate();
end
end
// The old way of making danger sounds would scare the crap out of EVERYONE between you and where the grenade
// was going to hit. The radius of the danger sound now 'blossoms' over the grenade's lifetime, making it seem
// dangerous to a larger area downrange than it does from where it was fired.
if( self.m_fDangerRadius <= AR2_GRENADE_MAX_DANGER_RADIUS ) then
self.m_fDangerRadius = self.m_fDangerRadius + ( AR2_GRENADE_MAX_DANGER_RADIUS * 0.05 );
end
end
/*---------------------------------------------------------
Name: PhysicsCollide
---------------------------------------------------------*/
function ENT:PhysicsCollide( data, physobj )
self:Touch( data.HitEntity )
self.PhysicsCollide = function( ... ) return end
end
function ENT:Detonate()
if (!self.m_bIsLive) then
return;
end
self.m_bIsLive = false;
self.m_takedamage = DAMAGE_NO;
if(self.m_hSmokeTrail) then
self.m_hSmokeTrail:Remove();
self.m_hSmokeTrail = NULL;
end
self:DoExplodeEffect()
local vecForward = self.Entity:GetVelocity();
vecForward = VectorNormalize(vecForward);
local tr;
tr = {};
tr.start = self.Entity:GetPos();
tr.endpos = self.Entity:GetPos() + 60*vecForward;
tr.mask = MASK_SHOT;
tr.filter = self;
tr.collision = COLLISION_GROUP_NONE;
tr = util.TraceLine ( tr);
self:OnExplode( tr );
if self:WaterLevel() < 3 then
local explode = ents.Create( "info_particle_system" )
explode:SetKeyValue( "effect_name", "hl2r_explosion_grenade_noaftersmoke" )
explode:SetOwner( self.Owner )
explode:SetPos( self:GetPos() )
explode:Spawn()
explode:Activate()
explode:Fire( "start", "", 0 )
explode:Fire( "kill", "", 30 )
end
self:EmitSound( self.Sound.Explode );
self:EmitSound( self.Sound.ExplodeR );
util.ScreenShake( self.Entity:GetPos(), 25.0, 150.0, 1.0, 750, SHAKE_START );
util.BlastDamage ( self.Entity, self:GetOwner(), self.Entity:GetPos(), self.m_DmgRadius, self.m_flDamage );
self.Entity:Remove();
end
function ENT:Precache()
util.PrecacheModel("models/Items/AR2_Grenade.mdl");
end

View File

@@ -0,0 +1,101 @@
--[[
| 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/
--]]
ENT.Sound = {}
ENT.Sound.Explode = "BaseGrenade.Explode"
ENT.Sound.ExplodeR = "TFA_HL2R_BaseGrenade.Explode"
// Nice helper function, this does all the work.
/*---------------------------------------------------------
Name: DoExplodeEffect
---------------------------------------------------------*/
function ENT:DoExplodeEffect()
local info = EffectData();
info:SetEntity( self.Entity );
info:SetOrigin( self.Entity:GetPos() );
if self:WaterLevel() >= 3 then
util.Effect("WaterSurfaceExplosion", info)
end
--util.Effect( "Explosion", info );
util.Effect("tfa_hl2r_fx_explosion_dlight", info)
end
/*---------------------------------------------------------
Name: OnExplode
Desc: The grenade has just exploded.
---------------------------------------------------------*/
function ENT:OnExplode( pTrace )
if ((pTrace.Entity != game.GetWorld()) || (pTrace.HitBox != 0)) then
// non-world needs smaller decals
if( pTrace.Entity && !pTrace.Entity:IsNPC() ) then
util.Decal( "SmallScorch", pTrace.HitPos + pTrace.HitNormal, pTrace.HitPos - pTrace.HitNormal );
end
else
util.Decal( "Scorch", pTrace.HitPos + pTrace.HitNormal, pTrace.HitPos - pTrace.HitNormal );
end
end
/*---------------------------------------------------------
Name: OnInitialize
---------------------------------------------------------*/
function ENT:OnInitialize()
end
/*---------------------------------------------------------
Name: StartTouch
---------------------------------------------------------*/
function ENT:StartTouch( entity )
end
/*---------------------------------------------------------
Name: EndTouch
---------------------------------------------------------*/
function ENT:EndTouch( entity )
end
function ENT:Touch( pOther )
assert( pOther );
if ( pOther:GetSolid() == SOLID_NONE ) then
return;
end
// If I'm live go ahead and blow up
if (self.m_bIsLive) then
self:Detonate();
else
// If I'm not live, only blow up if I'm hitting an chacter that
// is not the owner of the weapon
local pBCC = pOther;
if (pBCC && self.Entity:GetOwner() != pBCC) then
self.m_bIsLive = true;
self:Detonate();
end
end
end
/*---------------------------------------------------------
Name: OnThink
---------------------------------------------------------*/
function ENT:OnThink()
end
function ENT:OnRemove()
end

View File

@@ -0,0 +1,19 @@
--[[
| 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/
--]]
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.PrintName = ""
ENT.Author = ""
ENT.Spawnable = false
ENT.AdminSpawnable = false

View File

@@ -0,0 +1,66 @@
--[[
| 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/
--]]
if SERVER then AddCSLuaFile("shared.lua") end
ENT.Type = "anim"
ENT.PrintName = "HL2 MMod RPG Laser Spot"
ENT.Author = "Upset"
function ENT:SetupDataTables()
self:NetworkVar("Bool", 0, "DrawLaser")
end
if SERVER then
function ENT:Initialize()
self:DrawShadow(false)
end
function ENT:Suspend(flSuspendTime)
self:SetDrawLaser(false)
timer.Simple(flSuspendTime, function()
if self and IsValid(self) then
self:Revive()
end
end)
end
function ENT:Revive()
self:SetDrawLaser(true)
end
else
ENT.RenderGroup = RENDERGROUP_TRANSLUCENT
local laser = Material("sprites/redglow1")
function ENT:DrawTranslucent()
if !self:GetDrawLaser() then return end
local owner = self:GetOwner()
if !owner or !IsValid(owner) or !owner:Alive() then return end
local tr = owner:GetEyeTrace()
local pos = tr.HitPos
local norm = tr.HitNormal
local scale = 16.0 + math.Rand(-4.0, 4.0)
render.SetMaterial(laser)
render.DrawSprite(pos + norm * 3 - EyeVector() * 4, 1 * scale, 1 * scale, Color(255,255,255,255))
end
function ENT:Think()
local owner = self:GetOwner()
if IsValid(owner) then
self:SetRenderBoundsWS(LocalPlayer():EyePos(), owner:GetEyeTrace().HitPos)
end
end
end

View File

@@ -0,0 +1,21 @@
--[[
| 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")
function ENT:Draw()
if CurTime() > self:GetNWFloat("HideTime", CurTime() + 1) then
self:DrawModel()
end
end
function ENT:IsTranslucent()
return true
end

View File

@@ -0,0 +1,142 @@
--[[
| 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")
ENT.Damage = 100
ENT.Prime = 0.03
ENT.Delay = 30
ENT.HideDelay = 0.0
function ENT:Initialize()
local mdl = self:GetModel()
if not mdl or mdl == "" or mdl == "models/error.mdl" then
self:SetModel("models/weapons/tfa_hl2r/w_missile_launch.mdl")
end
self:PhysicsInit(SOLID_VPHYSICS)
--self:PhysicsInitSphere((self:OBBMaxs() - self:OBBMins()):Length() / 4, "metal")
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
self:SetFriction(self.Delay)
self.killtime = CurTime() + self.Delay
self:DrawShadow(true)
self.StartTime = CurTime()
self:EmitSound( "TFA_HL2R_RPG.Loop" )
self:SetUseType(SIMPLE_USE)
self.HasIdle = true
timer.Simple(0.1, function()
if IsValid(self) then
self:SetOwner()
end
end)
self:SetNWFloat("HideTime",CurTime() + self.HideDelay )
self.HP = math.random(30, 60)
end
function ENT:Think()
if self.killtime < CurTime() then
return false
end
self:NextThink(CurTime())
return true
end
local effectdata, shake
function ENT:Explode()
if not IsValid(self.Owner) then
self:Remove()
return
end
effectdata = EffectData()
effectdata:SetOrigin(self:GetPos())
effectdata:SetScale(5)
effectdata:SetMagnitude(5)
util.Effect("HelicopterMegaBomb", effectdata)
util.Effect("Explosion", effectdata)
self.Damage = self.mydamage or self.Damage
util.BlastDamage(self, self.Owner, self:GetPos(), 512, self.Damage )
shake = ents.Create("env_shake")
shake:SetOwner(self.Owner)
shake:SetPos(self:GetPos())
shake:SetKeyValue("amplitude", tostring(self.Damage * 20)) -- Power of the shake
shake:SetKeyValue("radius", tostring( 768 ) ) -- Radius of the shake
shake:SetKeyValue("duration", tostring( self.Damage / 200 )) -- Time of shake
shake:SetKeyValue("frequency", "255") -- How har should the screenshake be
shake:SetKeyValue("spawnflags", "4") -- Spawnflags(In Air)
shake:Spawn()
shake:Activate()
shake:Fire("StartShake", "", 0)
self:EmitSound("TFA_INS2_RPG7.2")
self:Remove()
end
function ENT:PhysicsCollide(data, phys)
if data.Speed > 60 and CurTime() > self.StartTime + self.Prime then
timer.Simple(0,function()
if IsValid(self) then
self:Explode()
end
end)
else
self.Prime = math.huge
if self.HasIdle then
self:StopSound("TFA_HL2R_RPG.Loop")
self.HasIdle = false
self:SetNWFloat("HideTime", -1 )
end
end
--[[elseif self:GetOwner() ~= self then
self.Prime = math.huge
self:StopSound("TFA_INS2_RPG7.Loop")
self:SetOwner(self)
end
]]--
end
function ENT:OnRemove()
if self.HasIdle then
self:StopSound("TFA_HL2R_RPG.Loop")
self.HasIdle = false
end
end
function ENT:Use(activator, caller)
if activator:IsPlayer() and self.WeaponClass and activator:GetWeapon(self.WeaponClass) then
activator:GiveAmmo(1, activator:GetWeapon(self.WeaponClass):GetPrimaryAmmoType(), false)
self:Remove()
end
end
function ENT:OnTakeDamage( dmg )
if dmg:GetInflictor() == self or dmg:GetAttacker() == self then return end
if self.Exploded then return end
if self.HP > 0 and self.HP - dmg:GetDamage() <= 0 then
self.Exploded = true
self:Explode()
end
self.HP = self.HP - dmg:GetDamage()
dmg:SetAttacker(self)
dmg:SetInflictor(self)
self:TakePhysicsDamage( dmg )
end

View File

@@ -0,0 +1,18 @@
--[[
| 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/
--]]
ENT.Type = "anim"
ENT.PrintName = "Contact Explosive"
ENT.Author = ""
ENT.Contact = ""
ENT.Purpose = ""
ENT.Instructions = ""
ENT.DoNotDuplicate = true
ENT.DisableDuplicator = true

View File

@@ -0,0 +1,18 @@
--[[
| 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')
function ENT:Draw()
self:DrawModel()
end
function ENT:OnRemove()
end

View File

@@ -0,0 +1,176 @@
--[[
| 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")
ENT.Model = Model("models/weapons/tfa_hl2r/w_missile.mdl")
ENT.ModelLaunch = Model("models/weapons/tfa_hl2r/w_missile_launch.mdl")
ENT.Sprite = "sprites/animglow01.vmt"
ENT.FlySound = "Missile.Ignite"
function ENT:Initialize()
self:SetMoveType(MOVETYPE_FLYGRAVITY)
self:SetMoveCollide(MOVECOLLIDE_FLY_BOUNCE)
self:SetSolid(SOLID_BBOX)
self:SetModel(self.ModelLaunch)
self:SetCollisionBounds(Vector(), Vector())
local angAngs = self:GetAngles()
angAngs.x = angAngs.x - 30
local vecFwd = angAngs:Forward()
self:SetLocalVelocity(vecFwd * 250)
local svgravity = cvars.Number("sv_gravity", 800)
if svgravity != 0 then
local gravityMul = 400 / svgravity
self:SetGravity(gravityMul)
end
self:NextThink(CurTime() + .4)
self.radius = 300
end
function ENT:Touch(pOther)
if !pOther:IsSolid() or pOther:GetClass() == "hornet" then
return
end
self:Explode(pOther)
end
function ENT:Explode(ent)
if self.didHit then return end
local vecDir = self:GetForward()
local tr = util.TraceLine({
start = self:GetPos(),
endpos = self:GetPos() + vecDir * 16,
mask = MASK_SHOT,
filter = self
})
self:SetSolid(SOLID_NONE)
if tr.Fraction == 1.0 || !tr.HitSky then
local pos, norm = tr.HitPos, tr.HitNormal
local explosion = EffectData()
explosion:SetOrigin(pos)
explosion:SetNormal(norm)
if self:WaterLevel() >= 3 then
util.Effect("WaterSurfaceExplosion", explosion)
else
local explode = ents.Create( "info_particle_system" )
explode:SetKeyValue( "effect_name", "hl2r_explosion_rpg" )
explode:SetOwner( self.Owner )
explode:SetPos( self:GetPos() )
explode:Spawn()
explode:Activate()
explode:Fire( "start", "", 0 )
explode:Fire( "kill", "", 30 )
end
util.Decal("Scorch", pos - vecDir + norm, pos + vecDir)
local dlighteff = EffectData()
dlighteff:SetEntity(self)
dlighteff:SetOrigin(self:GetPos())
util.Effect("hl2r_fx_explosion_dlight", dlighteff)
self:EmitSound("TFA_HL2R_RPG.Explode")
self:EmitSound("BaseExplosionEffect.Sound")
local owner = IsValid(self.Owner) and self.Owner or self
local dmg = DamageInfo()
dmg:SetInflictor(self)
dmg:SetAttacker(owner)
dmg:SetDamage(self.dmg)
dmg:SetDamageType(bit.bor(DMG_BLAST, DMG_AIRBOAT))
util.BlastDamageInfo(dmg, tr.HitPos, self.radius)
end
self.didHit = true
--self:RemoveEffects(EF_BRIGHTLIGHT)
self:StopSound(self.FlySound)
self:SetLocalVelocity(Vector())
self:SetMoveType(MOVETYPE_NONE)
self:AddEffects(EF_NODRAW)
if self.glow and IsValid(self.glow) then self.glow:Remove() end
self:Remove()
end
function ENT:Think()
if self.didHit then return end
if !self.m_flIgniteTime then
self:SetMoveType(MOVETYPE_FLY)
self:SetModel(self.Model)
ParticleEffectAttach("hl2r_weapon_rpg_smoketrail", PATTACH_ABSORIGIN_FOLLOW, self, 0)
--self:AddEffects(EF_BRIGHTLIGHT)
self:EmitSound(self.FlySound)
-- self.glow = ents.Create("env_sprite")
-- local glow = self.glow
-- glow:SetKeyValue("rendercolor", "255 192 64")
-- glow:SetKeyValue("GlowProxySize", "2")
-- glow:SetKeyValue("HDRColorScale", "1")
-- glow:SetKeyValue("renderfx", "15")
-- glow:SetKeyValue("rendermode", "3")
-- glow:SetKeyValue("renderamt", "255")
-- glow:SetKeyValue("model", self.Sprite)
-- glow:SetKeyValue("scale", ".08")
-- glow:Spawn()
-- glow:SetParent(self)
-- glow:SetPos(self:GetPos())
--ParticleEffectAttach("rocket_smoke_trail", PATTACH_ABSORIGIN_FOLLOW, self, 0)
--ParticleEffectAttach("weapon_rpg_smoketrail", PATTACH_ABSORIGIN_FOLLOW, self, 0)
ParticleEffectAttach("hl2r_weapon_rpg_smoketrail", PATTACH_ABSORIGIN_FOLLOW, self, 0)
--util.SpriteTrail( self.Entity, 0, Color( 165, 165, 165 ), false, 8, 16, 0.5, 1 / ( 165 ), "trails/smoke.vmt" )
self.m_flIgniteTime = CurTime()
self.vecTarget = self:GetForward()
self:NextThink(CurTime() + 0.1)
end
if self.bGuiding then
local spot = IsValid(self.pLauncher) and !self.pLauncher:GetSprinting() and self.pLauncher:GetSpotEntity() or NULL
local vecDir = Vector()
if IsValid(spot) and spot:GetOwner() == self:GetOwner() and spot:GetDrawLaser() then
local tr = util.TraceLine({
start = self:GetPos(),
endpos = spot:GetPos(),
filter = {self, self.Owner, spot}
})
if tr.Fraction >= 0.90 then
vecDir = spot:GetPos() - self:GetPos()
vecDir = vecDir:GetNormalized()
self.vecTarget = vecDir
end
end
end
self:SetAngles(self.vecTarget:Angle())
local flSpeed = self:GetVelocity():Length()
self:SetLocalVelocity(self:GetVelocity() * 0.2 + self.vecTarget * (flSpeed * 0.8 + 400))
if self:WaterLevel() == 3 then
if self:GetVelocity():Length() > 300 then
self:SetLocalVelocity(self:GetVelocity():GetNormalized() * 300)
end
else
if self:GetVelocity():Length() > 2000 then
self:SetLocalVelocity(self:GetVelocity():GetNormalized() * 2000)
end
end
self:NextThink(CurTime() + .1)
return true
end
function ENT:OnRemove()
self:StopSound(self.FlySound)
end

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/
--]]
ENT.Type = "anim"
ENT.PrintName = "HL2 MMod RPG Rocket"
ENT.Author = "Upset"

View File

@@ -0,0 +1,152 @@
--[[
| 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/
--]]
-- Most code from mad cow, some from me
-- .phy of the crossbow_bolt made by Silver Spirit
AddCSLuaFile()
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.PrintName = "CrossbowBolt"
ENT.Author = "Worshipper/Zerf"
ENT.RenderGroup = RENDERGROUP_TRANSLUCENT
ENT.Damage = 100
ENT.LifeTime = 4
ENT.Model = "models/crossbow_bolt.mdl"
function ENT:OnRemove()
end
function ENT:PhysicsUpdate()
end
if SERVER then
function ENT:Initialize()
self:SetModel(self.Model)
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:DrawShadow(false)
-- Wake the physics object up. It's time to have fun!
local phys = self:GetPhysicsObject()
if IsValid(phys) then
phys:EnableGravity(false)
phys:EnableDrag(true)
phys:SetMass(2)
phys:Wake()
phys:AddGameFlag(FVPHYSICS_NO_IMPACT_DMG)
phys:AddGameFlag(FVPHYSICS_NO_NPC_IMPACT_DMG)
phys:AddGameFlag(FVPHYSICS_PENETRATING)
end
-- local trail = util.SpriteTrail(self, 0, Color(255, 255, 255, 30), true, 2, 0, 3, 1 / (5.38) * 0.5, "trails/smoke.vmt")
self.Moving = true
end
--[[
function ENT:PhysicsUpdate(phys)
local vel = Vector(0, 0, ((-9.81 * phys:GetMass()) * 0.65))
phys:ApplyForceCenter(vel)
end
--]]
function ENT:Impact(ent, normal, pos)
if not IsValid(self) then return end
local info
local tr = {}
tr.start = self:GetPos()
tr.filter = {self, self.Owner}
tr.endpos = pos
tr = util.TraceLine(tr)
if tr.HitSky then self:Remove() return end
if not ent:IsPlayer() and not ent:IsNPC() then
local effectdata = EffectData()
effectdata:SetOrigin(pos - normal * 10)
effectdata:SetEntity(self)
effectdata:SetStart(pos)
effectdata:SetNormal(normal)
util.Effect("Impact", effectdata)
end
if IsValid(ent) then
local d = DamageInfo()
d:SetDamage( 100 )
d:SetAttacker( self.Owner )
d:SetDamageType( DMG_NEVERGIB )
--ent:TakeDamage(100, self.Owner)
ent:TakeDamageInfo(d)
self:EmitSound("Weapon_Crossbow.BoltHitBody")
self:Remove()
return
end
self:EmitSound("Weapon_Crossbow.BoltHitWorld")
-- We've hit a prop, so let's weld to it. Also embed this in the object for looks
self:SetPos(pos - normal * 10)
-- self:SetAngles(normal:Angle())
if not IsValid(ent) then
self:GetPhysicsObject():EnableMotion(false)
end
timer.Simple(self.LifeTime, function()
if IsValid(self) then self:Remove() end
end)
end
function ENT:PhysicsCollide(data, phys, dmg)
if self.Moving then
self.Moving = false
phys:Sleep()
self:Impact(data.HitEntity, data.HitNormal, data.HitPos)
end
end
function ENT:Think()
local phys = self:GetPhysicsObject()
local ang = self:GetForward() * 100000
local up = self:GetUp() * -800
local force = ang + up
phys:ApplyForceCenter(force)
if (self.HitWeld) then
self.HitWeld = false
constraint.Weld(self.HitEnt, self, 0, 0, 0, true)
end
end
end
if CLIENT then
function ENT:Initialize()
self:DrawShadow(false)
end
function ENT:IsTranslucent()
return true
end
function ENT:Draw()
self:DrawModel()
end
end

View File

@@ -0,0 +1,325 @@
--[[
| 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( "shared.lua" )
include( 'shared.lua' )
include( 'outputs.lua' )
FRAG_GRENADE_BLIP_FREQUENCY = 1.0
FRAG_GRENADE_BLIP_FAST_FREQUENCY = 0.3
FRAG_GRENADE_GRACE_TIME_AFTER_PICKUP = 1.5
FRAG_GRENADE_WARN_TIME = 1.5
GRENADE_COEFFICIENT_OF_RESTITUTION = 0.2;
local sk_plr_dmg_fraggrenade = 125;
local sk_npc_dmg_fraggrenade = 75;
local sk_fraggrenade_radius = 250;
GRENADE_MODEL = "models/items/grenadeammo.mdl"
GLOW_CREATED = FALSE;
function ENT:GetShakeAmplitude() return 25.0; end
function ENT:GetShakeRadius() return 750.0; end
// Damage accessors.
function ENT:GetDamage()
return self.m_flDamage;
end
function ENT:GetDamageRadius()
return self.m_DmgRadius;
end
function ENT:SetDamage(flDamage)
self.m_flDamage = flDamage;
end
function ENT:SetDamageRadius(flDamageRadius)
self.m_DmgRadius = flDamageRadius;
end
// Bounce sound accessors.
function ENT:SetBounceSound( pszBounceSound )
self.m_iszBounceSound = tostring( pszBounceSound );
end
function ENT:BlipSound()
local efdata = EffectData()
efdata:SetEntity(self)
efdata:SetFlags(1) -- regular beep
util.Effect("mmod_frag_beeplight", efdata)
self.Entity:EmitSound( self.Sound.Blip );
end
// UNDONE: temporary scorching for PreAlpha - find a less sleazy permenant solution.
function ENT:Explode( pTrace, bitsDamageType )
if !( CLIENT ) then
self.Entity:SetModel( "" );//invisible
self.Entity:SetColor( color_transparent );
self.Entity:SetSolid( SOLID_NONE );
self.m_takedamage = DAMAGE_NO;
local vecAbsOrigin = self.Entity:GetPos();
local contents = util.PointContents ( vecAbsOrigin );
if ( pTrace.Fraction != 1.0 ) then
local vecNormal = pTrace.HitNormal;
local pdata = pTrace.MatType;
util.BlastDamage( self.Entity, // don't apply cl_interp delay
self:GetOwner(),
self.Entity:GetPos(),
self.m_DmgRadius,
self.m_flDamage );
else
util.BlastDamage( self.Entity, // don't apply cl_interp delay
self:GetOwner(),
self.Entity:GetPos(),
self.m_DmgRadius,
self.m_flDamage );
end
self:DoExplodeEffect();
self:OnExplode( pTrace );
self.Entity:EmitSound( self.Sound.Explode );
self.Touch = function( ... ) return end;
self.Entity:SetSolid( SOLID_NONE );
self.Entity:SetVelocity( self:GetPos() );
// Because the grenade is zipped out of the world instantly, the EXPLOSION sound that it makes for
// the AI is also immediately destroyed. For this reason, we now make the grenade entity inert and
// throw it away in 1/10th of a second instead of right away. Removing the grenade instantly causes
// intermittent bugs with env_microphones who are listening for explosions. They will 'randomly' not
// hear explosion sounds when the grenade is removed and the SoundEnt thinks (and removes the sound)
// before the env_microphone thinks and hears the sound.
SafeRemoveEntityDelayed( self.Entity, 0.1 );
end
end
function ENT:Detonate()
local tr;
local vecSpot;// trace starts here!
self.Think = function( ... ) return end;
local explode = ents.Create( "info_particle_system" )
explode:SetKeyValue( "effect_name", "hl2mmod_explosion_grenade_noaftersmoke" )
explode:SetOwner( self.Owner )
explode:SetPos( self:GetPos() )
explode:Spawn()
explode:Activate()
explode:Fire( "start", "", 0 )
explode:Fire( "kill", "", 30 )
vecSpot = self.Entity:GetPos() + Vector ( 0 , 0 , 8 );
tr = {};
tr.start = vecSpot;
tr.endpos = vecSpot + Vector ( 0, 0, -32 );
tr.mask = MASK_SHOT_HULL;
tr.filter = self.Entity;
tr.collision = COLLISION_GROUP_NONE;
tr = util.TraceLine ( tr);
if( tr.StartSolid ) then
// Since we blindly moved the explosion origin vertically, we may have inadvertently moved the explosion into a solid,
// in which case nothing is going to be harmed by the grenade's explosion because all subsequent traces will startsolid.
// If this is the case, we do the downward trace again from the actual origin of the grenade. (sjb) 3/8/2007 (for ep2_outland_09)
tr = {};
tr.start = self.Entity:GetPos();
tr.endpos = self.Entity:GetPos() + Vector( 0, 0, -32);
tr.mask = MASK_SHOT_HULL;
tr.filter = self.Entity;
tr.collision = COLLISION_GROUP_NONE;
tr = util.TraceLine( tr );
end
tr = self:Explode( tr, DMG_BLAST );
if ( self:GetShakeAmplitude() ) then
util.ScreenShake( self.Entity:GetPos(), self:GetShakeAmplitude(), 150.0, 1.0, self:GetShakeRadius() );
end
end
/*---------------------------------------------------------
Name: Initialize
---------------------------------------------------------*/
function ENT:Initialize()
self.m_hThrower = NULL;
self.m_hOriginalThrower = NULL;
self.m_bIsLive = false;
self.m_DmgRadius = 100;
self.m_flDetonateTime = CurTime() + GRENADE_TIMER;
self.m_flWarnAITime = CurTime() + GRENADE_TIMER - FRAG_GRENADE_WARN_TIME;
self.m_bHasWarnedAI = false;
self:Precache( );
self.Entity:SetModel( GRENADE_MODEL );
if( self:GetOwner() && self:GetOwner():IsPlayer() ) then
self.m_flDamage = sk_plr_dmg_fraggrenade;
self.m_DmgRadius = sk_fraggrenade_radius;
else
self.m_flDamage = sk_npc_dmg_fraggrenade;
self.m_DmgRadius = sk_fraggrenade_radius;
end
self.m_takedamage = DAMAGE_YES;
self.m_iHealth = 1;
self.Entity:SetCollisionBounds( -Vector(4,4,4), Vector(4,4,4) );
self:CreateVPhysics();
self:BlipSound();
self.m_flNextBlipTime = CurTime() + FRAG_GRENADE_BLIP_FREQUENCY;
self.m_combineSpawned = false;
self.m_punted = false;
self:CreateEffects();
self:OnInitialize();
self.BaseClass:Initialize();
end
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
function ENT:OnRestore()
// If we were primed and ready to detonate, put FX on us.
if (self.m_flDetonateTime > 0) then
self:CreateEffects();
end
self.BaseClass:OnRestore();
end
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
function ENT:CreateEffects()
local nAttachment = self:LookupAttachment( "fuse" );
// Start up the eye trail
self.m_pGlowTrail = util.SpriteTrail( self.Entity, nAttachment, self.Trail.Color, true, self.Trail.StartWidth, self.Trail.EndWidth, self.Trail.LifeTime, 1 / ( self.Trail.StartWidth + self.Trail.EndWidth ) * 0.5, self.Trail.Material );
end
function ENT:CreateVPhysics()
// Create the object in the physics system
self.Entity:PhysicsInit( SOLID_VPHYSICS, 0, false );
local Phys = self:GetPhysicsObject()
if ( Phys ) then
Phys:SetMaterial( "grenade" )
end
return true;
end
function ENT:Precache()
util.PrecacheModel( GRENADE_MODEL );
util.PrecacheSound( self.Sound.Blip );
util.PrecacheModel( "sprites/redglow1.vmt" );
util.PrecacheModel( self.Trail.Material );
util.PrecacheSound( self.Sound.Explode );
end
function ENT:SetTimer( detonateDelay, warnDelay )
self.m_flDetonateTime = CurTime() + detonateDelay;
self.m_flWarnAITime = CurTime() + warnDelay;
self.Entity:NextThink( CurTime() );
self:CreateEffects();
end
function ENT:Think()
self:OnThink()
if( CurTime() > self.m_flDetonateTime ) then
self:Detonate();
return;
end
if( !self.m_bHasWarnedAI && CurTime() >= self.m_flWarnAITime ) then
self.m_bHasWarnedAI = true;
end
if( CurTime() > self.m_flNextBlipTime ) then
self:BlipSound();
if( self.m_bHasWarnedAI ) then
self.m_flNextBlipTime = CurTime() + FRAG_GRENADE_BLIP_FAST_FREQUENCY;
else
self.m_flNextBlipTime = CurTime() + FRAG_GRENADE_BLIP_FREQUENCY;
end
end
self.Entity:NextThink( CurTime() + 0.1 );
end
function ENT:SetVelocity( velocity, angVelocity )
local pPhysicsObject = self:GetPhysicsObject();
if ( pPhysicsObject ) then
pPhysicsObject:AddVelocity( velocity );
pPhysicsObject:AddAngleVelocity( angVelocity );
end
end
/*---------------------------------------------------------
Name: OnTakeDamage
---------------------------------------------------------*/
function ENT:OnTakeDamage( dmginfo )
// Manually apply vphysics because BaseCombatCharacter takedamage doesn't call back to CBaseEntity OnTakeDamage
self.Entity:TakePhysicsDamage( dmginfo );
// Grenades only suffer blast damage and burn damage.
if( !(dmginfo:GetDamageType() == bit.bor( DMG_BLAST, DMG_BURN) ) ) then
return 0;
end
return self.BaseClass:OnTakeDamage( dmginfo );
end

View File

@@ -0,0 +1,80 @@
--[[
| 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/
--]]
ENT.Sound = {}
ENT.Sound.Blip = "Grenade.Blip"
ENT.Sound.Explode = "BaseGrenade.Explode"
ENT.Trail = {}
ENT.Trail.Color = Color( 255, 0, 0, 255 )
ENT.Trail.Material = "sprites/bluelaser1.vmt"
ENT.Trail.StartWidth = 8.0
ENT.Trail.EndWidth = 1.0
ENT.Trail.LifeTime = 0.5
// Nice helper function, this does all the work.
/*---------------------------------------------------------
Name: DoExplodeEffect
---------------------------------------------------------*/
function ENT:DoExplodeEffect()
local info = EffectData();
info:SetEntity( self.Entity );
info:SetOrigin( self.Entity:GetPos() );
util.Effect( "Explosion", info );
self:EmitSound("BaseExplosionEffect.Sound")
-- util.Effect("mmod_fx_explosion_dlight", info)
end
/*---------------------------------------------------------
Name: OnExplode
Desc: The grenade has just exploded.
---------------------------------------------------------*/
function ENT:OnExplode( pTrace )
local Pos1 = pTrace.HitPos + pTrace.HitNormal
local Pos2 = pTrace.HitPos - pTrace.HitNormal
util.Decal( "Scorch", Pos1, Pos2 );
end
/*---------------------------------------------------------
Name: OnInitialize
---------------------------------------------------------*/
function ENT:OnInitialize()
end
/*---------------------------------------------------------
Name: StartTouch
---------------------------------------------------------*/
function ENT:StartTouch( entity )
end
/*---------------------------------------------------------
Name: EndTouch
---------------------------------------------------------*/
function ENT:EndTouch( entity )
end
/*---------------------------------------------------------
Name: Touch
---------------------------------------------------------*/
function ENT:Touch( entity )
end
/*---------------------------------------------------------
Name: OnThink
---------------------------------------------------------*/
function ENT:OnThink()
end

View File

@@ -0,0 +1,17 @@
--[[
| 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/
--]]
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.PrintName = ""
ENT.Author = ""
ENT.Spawnable = false
ENT.AdminSpawnable = false

View File

@@ -0,0 +1,174 @@
--[[
| 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( "shared.lua" )
include( 'shared.lua' )
include( 'outputs.lua' )
MAX_AR2_NO_COLLIDE_TIME = 0.2
AR2_GRENADE_MAX_DANGER_RADIUS = 300
// Moved to HL2_SharedGameRules because these are referenced by shared AmmoDef functions
local sk_plr_dmg_smg1_grenade = 100;
local sk_npc_dmg_smg1_grenade = 50;
local sk_max_smg1_grenade = 3;
local sk_smg1_grenade_radius = 250;
/*---------------------------------------------------------
Name: Initialize
---------------------------------------------------------*/
function ENT:Initialize()
self:Precache( );
self.Entity:SetModel( "models/Items/AR2_Grenade.mdl");
self.Entity:PhysicsInit( SOLID_VPHYSICS );
self.Entity:SetMoveCollide( MOVECOLLIDE_FLY_BOUNCE );
// Hits everything but debris
self.Entity:SetCollisionGroup( COLLISION_GROUP_PROJECTILE );
self.Entity:GetPhysicsObject():SetBuoyancyRatio( 0 )
self.Entity:SetCollisionBounds(Vector(-3, -3, -3), Vector(3, 3, 3));
// self.Entity:SetCollisionBounds(Vector(0, 0, 0), Vector(0, 0, 0));
self.Entity:NextThink( CurTime() + 0.1 );
if( self:GetOwner() && self:GetOwner():IsPlayer() ) then
self.m_flDamage = sk_plr_dmg_smg1_grenade;
else
self.m_flDamage = sk_npc_dmg_smg1_grenade;
end
self.m_DmgRadius = sk_smg1_grenade_radius;
self.m_takedamage = DAMAGE_YES;
self.m_bIsLive = true;
self.m_iHealth = 1;
self.Entity:SetGravity( 400 / 600 ); // use a lower gravity for grenades to make them easier to see
self.Entity:SetFriction( 0.8 );
self.Entity:SetSequence( 0 );
self.m_fDangerRadius = 100;
self.m_fSpawnTime = CurTime();
ParticleEffectAttach("hl2mmod_weapon_smg_grenadetrail", PATTACH_ABSORIGIN_FOLLOW, self, 0)
self:OnInitialize();
end
//-----------------------------------------------------------------------------
// Purpose: The grenade has a slight delay before it goes live. That way the
// person firing it can bounce it off a nearby wall. However if it
// hits another character it blows up immediately
// Input :
// Output :
//-----------------------------------------------------------------------------
function ENT:Think()
self:OnThink()
self.Entity:NextThink( CurTime() + 0.05 );
if (!self.m_bIsLive) then
// Go live after a short delay
if (self.m_fSpawnTime + MAX_AR2_NO_COLLIDE_TIME < CurTime()) then
self.m_bIsLive = true;
end
end
// If I just went solid and my velocity is zero, it means I'm resting on
// the floor already when I went solid so blow up
if (self.m_bIsLive) then
if (self.Entity:GetVelocity():Length() == 0.0 ||
self.Entity:GetGroundEntity() != NULL ) then
// self:Detonate();
end
end
// The old way of making danger sounds would scare the crap out of EVERYONE between you and where the grenade
// was going to hit. The radius of the danger sound now 'blossoms' over the grenade's lifetime, making it seem
// dangerous to a larger area downrange than it does from where it was fired.
if( self.m_fDangerRadius <= AR2_GRENADE_MAX_DANGER_RADIUS ) then
self.m_fDangerRadius = self.m_fDangerRadius + ( AR2_GRENADE_MAX_DANGER_RADIUS * 0.05 );
end
end
/*---------------------------------------------------------
Name: PhysicsCollide
---------------------------------------------------------*/
function ENT:PhysicsCollide( data, physobj )
self:Touch( data.HitEntity )
self.PhysicsCollide = function( ... ) return end
end
function ENT:Detonate()
if (!self.m_bIsLive) then
return;
end
self.m_bIsLive = false;
self.m_takedamage = DAMAGE_NO;
if(self.m_hSmokeTrail) then
self.m_hSmokeTrail:Remove();
self.m_hSmokeTrail = NULL;
end
self:DoExplodeEffect()
local vecForward = self.Entity:GetVelocity();
vecForward = VectorNormalize(vecForward);
local tr;
tr = {};
tr.start = self.Entity:GetPos();
tr.endpos = self.Entity:GetPos() + 60*vecForward;
tr.mask = MASK_SHOT;
tr.filter = self;
tr.collision = COLLISION_GROUP_NONE;
tr = util.TraceLine ( tr);
if self:WaterLevel() < 3 then
local explode = ents.Create( "info_particle_system" )
explode:SetKeyValue( "effect_name", "hl2mmod_explosion_grenade_noaftersmoke" )
explode:SetOwner( self.Owner )
explode:SetPos( self:GetPos() )
explode:Spawn()
explode:Activate()
explode:Fire( "start", "", 0 )
explode:Fire( "kill", "", 30 )
end
self:OnExplode( tr );
self.Entity:EmitSound( self.Sound.Explode );
util.ScreenShake( self.Entity:GetPos(), 25.0, 150.0, 1.0, 750, SHAKE_START );
util.BlastDamage ( self.Entity, self:GetOwner(), self.Entity:GetPos(), self.m_DmgRadius, self.m_flDamage );
self.Entity:Remove();
end
function ENT:Precache()
util.PrecacheModel("models/Items/AR2_Grenade.mdl");
end

View File

@@ -0,0 +1,96 @@
--[[
| 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/
--]]
ENT.Sound = {}
ENT.Sound.Explode = "BaseGrenade.Explode"
// Nice helper function, this does all the work.
/*---------------------------------------------------------
Name: DoExplodeEffect
---------------------------------------------------------*/
function ENT:DoExplodeEffect()
local info = EffectData();
info:SetEntity( self.Entity );
info:SetOrigin( self.Entity:GetPos() );
if self:WaterLevel() >= 3 then
util.Effect("WaterSurfaceExplosion", info)
end
self:EmitSound("BaseExplosionEffect.Sound")
util.Effect("mmod_fx_explosion_dlight", info, true)
end
/*---------------------------------------------------------
Name: OnExplode
Desc: The grenade has just exploded.
---------------------------------------------------------*/
function ENT:OnExplode( pTrace )
if ((pTrace.Entity != game.GetWorld()) || (pTrace.HitBox != 0)) then
// non-world needs smaller decals
if( pTrace.Entity && !pTrace.Entity:IsNPC() ) then
util.Decal( "SmallScorch", pTrace.HitPos + pTrace.HitNormal, pTrace.HitPos - pTrace.HitNormal );
end
else
util.Decal( "Scorch", pTrace.HitPos + pTrace.HitNormal, pTrace.HitPos - pTrace.HitNormal );
end
end
/*---------------------------------------------------------
Name: OnInitialize
---------------------------------------------------------*/
function ENT:OnInitialize()
end
/*---------------------------------------------------------
Name: StartTouch
---------------------------------------------------------*/
function ENT:StartTouch( entity )
end
/*---------------------------------------------------------
Name: EndTouch
---------------------------------------------------------*/
function ENT:EndTouch( entity )
end
function ENT:Touch( pOther )
assert( pOther );
if ( pOther:GetSolid() == SOLID_NONE ) then
return;
end
// If I'm live go ahead and blow up
if (self.m_bIsLive) then
self:Detonate();
else
// If I'm not live, only blow up if I'm hitting an chacter that
// is not the owner of the weapon
local pBCC = pOther;
if (pBCC && self.Entity:GetOwner() != pBCC) then
self.m_bIsLive = true;
self:Detonate();
end
end
end
/*---------------------------------------------------------
Name: OnThink
---------------------------------------------------------*/
function ENT:OnThink()
end

View File

@@ -0,0 +1,19 @@
--[[
| 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/
--]]
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.PrintName = ""
ENT.Author = ""
ENT.Spawnable = false
ENT.AdminSpawnable = false

View File

@@ -0,0 +1,66 @@
--[[
| 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/
--]]
if SERVER then AddCSLuaFile("shared.lua") end
ENT.Type = "anim"
ENT.PrintName = "HL2 MMod RPG Laser Spot"
ENT.Author = "Upset"
function ENT:SetupDataTables()
self:NetworkVar("Bool", 0, "DrawLaser")
end
if SERVER then
function ENT:Initialize()
self:DrawShadow(false)
end
function ENT:Suspend(flSuspendTime)
self:SetDrawLaser(false)
timer.Simple(flSuspendTime, function()
if self and IsValid(self) then
self:Revive()
end
end)
end
function ENT:Revive()
self:SetDrawLaser(true)
end
else
ENT.RenderGroup = RENDERGROUP_TRANSLUCENT
local laser = Material("sprites/redglow1")
function ENT:DrawTranslucent()
if !self:GetDrawLaser() then return end
local owner = self:GetOwner()
if !owner or !IsValid(owner) or !owner:Alive() then return end
local tr = owner:GetEyeTrace()
local pos = tr.HitPos
local norm = tr.HitNormal
local scale = 16.0 + math.Rand(-4.0, 4.0)
render.SetMaterial(laser)
render.DrawSprite(pos + norm * 3 - EyeVector() * 4, 1 * scale, 1 * scale, Color(255,255,255,255))
end
function ENT:Think()
local owner = self:GetOwner()
if IsValid(owner) then
self:SetRenderBoundsWS(LocalPlayer():EyePos(), owner:GetEyeTrace().HitPos)
end
end
end

View File

@@ -0,0 +1,21 @@
--[[
| 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")
function ENT:Draw()
if CurTime() > self:GetNWFloat("HideTime", CurTime() + 1) then
self:DrawModel()
end
end
function ENT:IsTranslucent()
return true
end

View File

@@ -0,0 +1,142 @@
--[[
| 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")
ENT.Damage = 100
ENT.Prime = 0.03
ENT.Delay = 30
ENT.HideDelay = 0.0
function ENT:Initialize()
local mdl = self:GetModel()
if not mdl or mdl == "" or mdl == "models/error.mdl" then
self:SetModel("models/weapons/tfa_mmod/w_missile_launch.mdl")
end
self:PhysicsInit(SOLID_VPHYSICS)
--self:PhysicsInitSphere((self:OBBMaxs() - self:OBBMins()):Length() / 4, "metal")
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
self:SetFriction(self.Delay)
self.killtime = CurTime() + self.Delay
self:DrawShadow(true)
self.StartTime = CurTime()
self:EmitSound( "TFA_MMOD.RPG.Loop" )
self:SetUseType(SIMPLE_USE)
self.HasIdle = true
timer.Simple(0.1, function()
if IsValid(self) then
self:SetOwner()
end
end)
self:SetNWFloat("HideTime",CurTime() + self.HideDelay )
self.HP = math.random(30, 60)
end
function ENT:Think()
if self.killtime < CurTime() then
return false
end
self:NextThink(CurTime())
return true
end
local effectdata, shake
function ENT:Explode()
if not IsValid(self.Owner) then
self:Remove()
return
end
effectdata = EffectData()
effectdata:SetOrigin(self:GetPos())
effectdata:SetScale(5)
effectdata:SetMagnitude(5)
util.Effect("HelicopterMegaBomb", effectdata)
util.Effect("Explosion", effectdata)
self.Damage = self.mydamage or self.Damage
util.BlastDamage(self, self.Owner, self:GetPos(), 512, self.Damage )
shake = ents.Create("env_shake")
shake:SetOwner(self.Owner)
shake:SetPos(self:GetPos())
shake:SetKeyValue("amplitude", tostring(self.Damage * 20)) -- Power of the shake
shake:SetKeyValue("radius", tostring( 768 ) ) -- Radius of the shake
shake:SetKeyValue("duration", tostring( self.Damage / 200 )) -- Time of shake
shake:SetKeyValue("frequency", "255") -- How har should the screenshake be
shake:SetKeyValue("spawnflags", "4") -- Spawnflags(In Air)
shake:Spawn()
shake:Activate()
shake:Fire("StartShake", "", 0)
self:EmitSound("TFA_INS2_RPG7.2")
self:Remove()
end
function ENT:PhysicsCollide(data, phys)
if data.Speed > 60 and CurTime() > self.StartTime + self.Prime then
timer.Simple(0,function()
if IsValid(self) then
self:Explode()
end
end)
else
self.Prime = math.huge
if self.HasIdle then
self:StopSound("TFA_MMOD.RPG.Loop")
self.HasIdle = false
self:SetNWFloat("HideTime", -1 )
end
end
--[[elseif self:GetOwner() ~= self then
self.Prime = math.huge
self:StopSound("TFA_INS2_RPG7.Loop")
self:SetOwner(self)
end
]]--
end
function ENT:OnRemove()
if self.HasIdle then
self:StopSound("TFA_MMOD.RPG.Loop")
self.HasIdle = false
end
end
function ENT:Use(activator, caller)
if activator:IsPlayer() and self.WeaponClass and activator:GetWeapon(self.WeaponClass) then
activator:GiveAmmo(1, activator:GetWeapon(self.WeaponClass):GetPrimaryAmmoType(), false)
self:Remove()
end
end
function ENT:OnTakeDamage( dmg )
if dmg:GetInflictor() == self or dmg:GetAttacker() == self then return end
if self.Exploded then return end
if self.HP > 0 and self.HP - dmg:GetDamage() <= 0 then
self.Exploded = true
self:Explode()
end
self.HP = self.HP - dmg:GetDamage()
dmg:SetAttacker(self)
dmg:SetInflictor(self)
self:TakePhysicsDamage( dmg )
end

View File

@@ -0,0 +1,18 @@
--[[
| 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/
--]]
ENT.Type = "anim"
ENT.PrintName = "Contact Explosive"
ENT.Author = ""
ENT.Contact = ""
ENT.Purpose = ""
ENT.Instructions = ""
ENT.DoNotDuplicate = true
ENT.DisableDuplicator = true

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/
--]]
include('shared.lua')
local Mat=Material("models/shiny")
local Glow=Material("sprites/mat_jack_basicglow")
language.Add("ent_rpgrocket","RPG")
function ENT:Initialize()
self.PrettyModel=ClientsideModel("models/Weapons/w_bullet.mdl")
self.PrettyModel:SetPos(self:GetPos()+self:GetUp()*1.25)
self.PrettyModel:SetAngles(self:GetAngles())
self.PrettyModel:SetParent(self)
self.PrettyModel:SetNoDraw(true)
self.PrettyModel:SetModelScale(2,0)
end
function ENT:Draw()
self:DrawModel()
if(self:GetDTBool(0))then
local Pos=self:GetPos()
local Back=-self:GetRight()
render.SetMaterial(Glow)
render.DrawSprite(Pos+Back*20,100,100,Color(255,220,190,255))
end
end
function ENT:OnRemove()
--eat a dick
end

View File

@@ -0,0 +1,144 @@
--[[
| 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/
--]]
--gernaaaayud
--By Jackarunda
AddCSLuaFile('cl_init.lua')
AddCSLuaFile('shared.lua')
include('shared.lua')
ENT.MotorPower=2500
function ENT:Initialize()
self.Owner = self:GetOwner()
self.rockettime = CurTime() + 10
self.Entity:SetModel("models/weapons/tfa_mmod/w_missile_launch.mdl")
self.Entity:PhysicsInit(SOLID_VPHYSICS)
self.Entity:SetMoveType(MOVETYPE_VPHYSICS)
self.Entity:SetSolid(SOLID_VPHYSICS)
self.Entity:SetCollisionGroup(COLLISION_GROUP_NONE)
self.Entity:SetUseType(SIMPLE_USE)
local phys = self.Entity:GetPhysicsObject()
if phys:IsValid() then
phys:Wake()
phys:SetMass(7)
--phys:EnableGravity(false)
phys:EnableDrag(false)
end
self:Fire("enableshadow","",0)
self.Exploded=false
self.ExplosiveMul=0.5
self.MotorFired=false
self.Engaged=false
self:SetModelScale(1,0)
self:SetColor(Color(255,255,255))
self.InitialAng=self:GetAngles()
timer.Simple(0,function()
if(IsValid(self))then
self:FireMotor()
end
end)
local Settins=physenv.GetPerformanceSettings()
if(Settins.MaxVelocity<3000)then
Settins.MaxVelocity=3000
physenv.SetPerformanceSettings(Settins)
end
--if not(self.InitialVel)then self.InitialVel=Vector(0,0,0) end
end
function ENT:FireMotor()
self.Entity:EmitSound("TFA_MMOD.RPG.Loop")
if(self.MotorFired)then return end
self.MotorFired=true
--sound.Play("snd_jack_missilemotorfire.wav",self:GetPos(),85,110)
--sound.Play("snd_jack_missilemotorfire.wav",self:GetPos()+Vector(0,0,1),88,110)
self:SetDTBool(0,true)
self.Engaged=true
end
function ENT:PhysicsCollide(data,physobj)
if((data.Speed>80)and(data.DeltaTime>.2))then
self:Detonate()
end
end
function ENT:OnTakeDamage(dmginfo)
self.Entity:TakePhysicsDamage(dmginfo)
end
function ENT:Think()
if(self.Exploded)then return end
if not(self.Engaged)then
self:GetPhysicsObject():EnableGravity(false)
self:SetAngles(self.InitialAng)
--self:GetPhysicsObject():SetVelocity(self.InitialVel)
end
if(self.MotorFired)then
--local Flew=EffectData()
--Flew:SetOrigin(self:GetPos()-self:GetRight()*20)
--Flew:SetNormal(-self:GetRight())
--Flew:SetScale(2)
--util.Effect("eff_jack_rocketthrust",Flew)
local Flew=EffectData()
Flew:SetOrigin(self:GetPos()-self:GetRight()*20)
Flew:SetNormal(-self:GetRight())
Flew:SetScale(0.5)
util.Effect("eff_jack_rocketthrust",Flew)
local effdat = EffectData()
effdat:SetOrigin( self:GetPos() )
effdat:SetNormal( -self:GetForward() )
effdat:SetScale( 1 )
local SelfPos=self:GetPos()
local Phys=self:GetPhysicsObject()
Phys:EnableGravity(false)
Phys:ApplyForceCenter(self:GetRight()*self.MotorPower)
self.MotorPower=self.MotorPower+2000
if(self.MotorPower>=2000)then self.MotorPower=2000 end
end
if self.rockettime < CurTime() then
self:Detonate()
end
self:NextThink(CurTime()+.025)
return true
end
function ENT:OnRemove()
--pff
end
function ENT:Detonate()
self.Entity:StopSound( "TFA_MMOD.RPG.Loop" )
self.Entity:SetOwner(self.RPGOwner)
if(self.Exploding)then return end
self.Exploding=true
local SelfPos=self:GetPos()
local Pos=SelfPos
if(true)then
/*- EFFECTS -*/
util.ScreenShake(SelfPos,99999,99999,1,750)
--ParticleEffect("pcf_jack_airsplode_medium",SelfPos,self:GetAngles())
for key,thing in pairs(ents.FindInSphere(SelfPos,500))do
if((thing:IsNPC())and(self:Visible(thing)))then
if(table.HasValue({"npc_strider","npc_combinegunship","npc_helicopter","npc_turret_floor","npc_turret_ground","npc_turret_ceiling"},thing:GetClass()))then
thing:SetHealth(1)
thing:Fire("selfdestruct","",.5)
end
end
end
util.BlastDamage(self.Entity,self.RPGOwner,SelfPos,250,3000)
for i=0,40 do
local Trayuss=util.QuickTrace(SelfPos,VectorRand()*200,{self.Entity})
if(Trayuss.Hit)then
util.Decal("Scorch",Trayuss.HitPos+Trayuss.HitNormal,Trayuss.HitPos-Trayuss.HitNormal)
end
end
local Boom=EffectData()
Boom:SetOrigin(SelfPos)
Boom:SetScale(1)
util.Effect("eff_jack_lightboom",Boom,true,true)
self.Entity:Remove()
end
end
function ENT:Use(activator,caller)
--lol dude
end

View File

@@ -0,0 +1,17 @@
--[[
| 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/
--]]
ENT.Type = "anim"
ENT.PrintName = "Rocket-Propelled Grenade"
ENT.Author = "Jackarunda"
ENT.Category = "Jackarunda's Explosives"
ENT.Information = "goes zoom outta the rocket launcher and blows shit up"
ENT.Spawnable = false
ENT.AdminSpawnable = false

View File

@@ -0,0 +1,18 @@
--[[
| 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')
function ENT:Draw()
self:DrawModel()
end
function ENT:OnRemove()
end

View File

@@ -0,0 +1,175 @@
--[[
| 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")
ENT.Model = Model("models/weapons/w_missile.mdl")
ENT.ModelLaunch = Model("models/weapons/w_missile_launch.mdl")
ENT.Sprite = "sprites/animglow01.vmt"
ENT.FlySound = "Missile.Ignite"
function ENT:Initialize()
self:SetMoveType(MOVETYPE_FLYGRAVITY)
self:SetMoveCollide(MOVECOLLIDE_FLY_BOUNCE)
self:SetSolid(SOLID_BBOX)
self:SetModel(self.ModelLaunch)
self:SetCollisionBounds(Vector(), Vector())
local angAngs = self:GetAngles()
angAngs.x = angAngs.x - 30
local vecFwd = angAngs:Forward()
self:SetLocalVelocity(vecFwd * 250)
local svgravity = cvars.Number("sv_gravity", 800)
if svgravity != 0 then
local gravityMul = 400 / svgravity
self:SetGravity(gravityMul)
end
self:NextThink(CurTime() + .4)
self.radius = 300
end
function ENT:Touch(pOther)
if !pOther:IsSolid() or pOther:GetClass() == "hornet" then
return
end
self:Explode(pOther)
end
function ENT:Explode(ent)
if self.didHit then return end
local vecDir = self:GetForward()
local tr = util.TraceLine({
start = self:GetPos(),
endpos = self:GetPos() + vecDir * 16,
mask = MASK_SHOT,
filter = self
})
self:SetSolid(SOLID_NONE)
if tr.Fraction == 1.0 || !tr.HitSky then
local pos, norm = tr.HitPos, tr.HitNormal
local explosion = EffectData()
explosion:SetOrigin(pos)
explosion:SetNormal(norm)
if self:WaterLevel() >= 3 then
util.Effect("WaterSurfaceExplosion", explosion)
else
local explode = ents.Create( "info_particle_system" )
explode:SetKeyValue( "effect_name", "hl2mmod_explosion_rpg" )
explode:SetOwner( self.Owner )
explode:SetPos( self:GetPos() )
explode:Spawn()
explode:Activate()
explode:Fire( "start", "", 0 )
explode:Fire( "kill", "", 30 )
end
util.Decal("Scorch", pos - vecDir + norm, pos + vecDir)
local dlighteff = EffectData()
dlighteff:SetEntity(self)
dlighteff:SetOrigin(self:GetPos())
util.Effect("mmod_fx_explosion_dlight", dlighteff)
self:EmitSound("BaseExplosionEffect.Sound")
local owner = IsValid(self.Owner) and self.Owner or self
local dmg = DamageInfo()
dmg:SetInflictor(self)
dmg:SetAttacker(owner)
dmg:SetDamage(self.dmg)
dmg:SetDamageType(bit.bor(DMG_BLAST, DMG_AIRBOAT))
util.BlastDamageInfo(dmg, tr.HitPos, self.radius)
end
self.didHit = true
--self:RemoveEffects(EF_BRIGHTLIGHT)
self:StopSound(self.FlySound)
self:SetLocalVelocity(Vector())
self:SetMoveType(MOVETYPE_NONE)
self:AddEffects(EF_NODRAW)
if self.glow and IsValid(self.glow) then self.glow:Remove() end
self:Remove()
end
function ENT:Think()
if self.didHit then return end
if !self.m_flIgniteTime then
self:SetMoveType(MOVETYPE_FLY)
self:SetModel(self.Model)
ParticleEffectAttach("hl2mmod_weapon_rpg_smoketrail", PATTACH_ABSORIGIN_FOLLOW, self, 0)
--self:AddEffects(EF_BRIGHTLIGHT)
self:EmitSound(self.FlySound)
-- self.glow = ents.Create("env_sprite")
-- local glow = self.glow
-- glow:SetKeyValue("rendercolor", "255 192 64")
-- glow:SetKeyValue("GlowProxySize", "2")
-- glow:SetKeyValue("HDRColorScale", "1")
-- glow:SetKeyValue("renderfx", "15")
-- glow:SetKeyValue("rendermode", "3")
-- glow:SetKeyValue("renderamt", "255")
-- glow:SetKeyValue("model", self.Sprite)
-- glow:SetKeyValue("scale", ".08")
-- glow:Spawn()
-- glow:SetParent(self)
-- glow:SetPos(self:GetPos())
--ParticleEffectAttach("rocket_smoke_trail", PATTACH_ABSORIGIN_FOLLOW, self, 0)
--ParticleEffectAttach("weapon_rpg_smoketrail", PATTACH_ABSORIGIN_FOLLOW, self, 0)
ParticleEffectAttach("hl2mmod_weapon_rpg_smoketrail", PATTACH_ABSORIGIN_FOLLOW, self, 0)
--util.SpriteTrail( self.Entity, 0, Color( 165, 165, 165 ), false, 8, 16, 0.5, 1 / ( 165 ), "trails/smoke.vmt" )
self.m_flIgniteTime = CurTime()
self.vecTarget = self:GetForward()
self:NextThink(CurTime() + 0.1)
end
if self.bGuiding then
local spot = IsValid(self.pLauncher) and !self.pLauncher:GetSprinting() and self.pLauncher:GetSpotEntity() or NULL
local vecDir = Vector()
if IsValid(spot) and spot:GetOwner() == self:GetOwner() and spot:GetDrawLaser() then
local tr = util.TraceLine({
start = self:GetPos(),
endpos = spot:GetPos(),
filter = {self, self.Owner, spot}
})
if tr.Fraction >= 0.90 then
vecDir = spot:GetPos() - self:GetPos()
vecDir = vecDir:GetNormalized()
self.vecTarget = vecDir
end
end
end
self:SetAngles(self.vecTarget:Angle())
local flSpeed = self:GetVelocity():Length()
self:SetLocalVelocity(self:GetVelocity() * 0.2 + self.vecTarget * (flSpeed * 0.8 + 400))
if self:WaterLevel() == 3 then
if self:GetVelocity():Length() > 300 then
self:SetLocalVelocity(self:GetVelocity():GetNormalized() * 300)
end
else
if self:GetVelocity():Length() > 2000 then
self:SetLocalVelocity(self:GetVelocity():GetNormalized() * 2000)
end
end
self:NextThink(CurTime() + .1)
return true
end
function ENT:OnRemove()
self:StopSound(self.FlySound)
end

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/
--]]
ENT.Type = "anim"
ENT.PrintName = "HL2 MMod RPG Rocket"
ENT.Author = "Upset"

View File

@@ -0,0 +1,74 @@
--[[
| 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()
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.Spawnable = false
function ENT:Draw()
self:DrawModel()
end
function ENT:Initialize()
if SERVER then
self:SetModel( "models/weapons/tfa_hdtf/w_m67.mdl" )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self:PhysicsInit( SOLID_VPHYSICS )
self:SetCollisionGroup( COLLISION_GROUP_NONE )
self:DrawShadow( false )
end
self:EmitSound("TFA_CSGO_HEGrenade.Throw")
self.ExplodeTimer = CurTime() + 1.5
end
function ENT:Think()
if SERVER and self.ExplodeTimer <= CurTime() then
self:Explode()
self:Remove()
end
end
function ENT:PhysicsCollide( data )
if SERVER and data.Speed > 150 then
self:EmitSound( "TFA_CSGO_HEGrenade.Bounce" )
end
end
function ENT:OnRemove()
end
function ENT:Explode()
if SERVER then
local explode = ents.Create( "info_particle_system" )
explode:SetKeyValue( "effect_name", "explosion_hegrenade_brief" )
explode:SetOwner( self.Owner )
explode:SetPos( self:GetPos() )
explode:Spawn()
explode:Activate()
explode:Fire( "start", "", 0 )
explode:Fire( "kill", "", 15 )
local explode2 = ents.Create( "info_particle_system" )
explode2:SetKeyValue( "effect_name", "explosion_hegrenade_interior" )
explode2:SetOwner( self.Owner )
explode2:SetPos( self:GetPos() )
explode2:Spawn()
explode2:Activate()
explode2:Fire( "start", "", 0 )
explode2:Fire( "kill", "", 15 )
self:EmitSound( "TFA_CSGO_BaseGrenade.Explode" )
end
util.BlastDamage( self, self.Owner, self:GetPos(), 350, 98 )
local spos = self:GetPos()
local trs = util.TraceLine({start=spos + Vector(0,0,64), endpos=spos + Vector(0,0,-32), filter=self})
util.Decal("Scorch", trs.HitPos + trs.HitNormal, trs.HitPos - trs.HitNormal)
end

View File

@@ -0,0 +1,99 @@
--[[
| 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()
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.Spawnable = false
ENT.AdminSpawnable = false
ENT.Damage = 1
function ENT:Draw()
end
function ENT:Initialize()
self.Damage = 1
self:SetNWBool("extinguished",false)
if SERVER then
self:SetModel( "models/weapons/tfa_csgo/w_eq_incendiarygrenade_thrown.mdl" )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_NONE )
self:SetCollisionGroup( COLLISION_GROUP_DEBRIS )
self:DrawShadow( false )
self:CreateFires()
end
self:NextThink( CurTime() )
end
function ENT:CreateFires()
for i = 1, 20 do
local fire = ents.Create("info_particle_system")
if (i < 2) then
fire:SetKeyValue("effect_name","molotov_fire_main_gm")
else
fire:SetKeyValue("effect_name","molotov_fire_child_gm")
end
local pos = self:GetPos()
//fire:SetPos( Vector( pos.x + 100 * math.sin( math.rad( i * 20 ) ), pos.y + 100 * math.cos( math.rad( i * 20 ) ), pos.z ) )
fire:SetPos( Vector( pos.x + math.Rand(0, 144) * math.sin( math.rad( i * math.Rand( 0, 180 ) ) ), pos.y + math.Rand(0, 144) * math.cos( math.rad( i * math.Rand( 0, 180 ) ) ), pos.z ) )
fire:SetAngles( self:GetAngles() )
fire:SetParent( self )
fire:Spawn()
fire:Activate()
fire:Fire("Start","",0)
fire:Fire("Kill", "",8)
end
self.nextFires = CurTime() + 6
end
function ENT:Think()
if SERVER then
for k, v in pairs( ents.FindInSphere( self:GetPos(), 150 ) ) do
if v:IsPlayer() or v:IsNPC() then
-- If player did not take the damage in TBC then deal it for 1 second and then stop
if (!self.damageReceivers or self.damageReceivers and !self.damageReceivers[v]) then
damage = DamageInfo()
damage:SetDamage( math.random( 3, 7 ) )
damage:SetAttacker( self:GetOwner() )
damage:SetInflictor( self:GetCreator() )
damage:SetDamageType( DMG_BURN )
v:TakeDamageInfo( damage )
if (self.damageReceivers and self.damageReceivers[v] == nil) then
self.damageReceivers[v] = false
timer.Simple(1, function()
if (IsValid(self) and IsValid(v)) then
self.damageReceivers[v] = true
end
end)
end
end
end
end
if (self.nextFires and CurTime() > self.nextFires) then
self:CreateFires()
end
end
if self:GetNWBool("extinguished",true) then
if not self.PlayedSound then
self:EmitSound("TFA_CSGO_Molotov.Extinguish")
self.PlayedSound = true
end
if SERVER then
SafeRemoveEntity( self )
end
end
self:NextThink( CurTime() + math.Rand( 0.2, 0.7 ) )
end

View File

@@ -0,0 +1,47 @@
--[[
| 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()
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.Spawnable = false
ENT.AdminSpawnable = false
function ENT:Draw()
end
function ENT:Initialize()
self:SetNWBool("extinguished",false)
if SERVER then
self:SetModel( "models/weapons/tfa_csgo/w_eq_incendiarygrenade_thrown.mdl" )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_NONE )
self:SetCollisionGroup( COLLISION_GROUP_DEBRIS )
self:DrawShadow( false )
end
ParticleEffect( "molotov_explosion", self:GetPos(), self:GetAngles() )
self:EmitSound( "TFA_CSGO_Inferno.Loop" )
end
function ENT:Think()
if self:GetNWBool("extinguished",true) then
//ParticleEffect( "extinguish_fire", self:GetPos(), self:GetAngles() )
if SERVER then
self:Remove()
end
end
end
function ENT:OnRemove()
self:EmitSound( "TFA_CSGO_Inferno.FadeOut" )
self:StopSound( "TFA_CSGO_Inferno.Loop" )
end

View File

@@ -0,0 +1,27 @@
--[[
| 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')
/*---------------------------------------------------------
Draw
---------------------------------------------------------*/
function ENT:Draw()
self.Entity:DrawModel()
end
/*---------------------------------------------------------
IsTranslucent
---------------------------------------------------------*/
function ENT:IsTranslucent()
return true
end

View File

@@ -0,0 +1,173 @@
--[[
| 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 ENT:Initialize()
self:SetModel("models/weapons/arccw_go/w_eq_flashbang_thrown.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
--self:PhysicsInitSphere( ( self:OBBMaxs() - self:OBBMins() ):Length()/4, "metal" )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self:DrawShadow( false )
self:SetCollisionGroup( COLLISION_GROUP_NONE )
self:EmitSound("TFA_CSGO_Flashbang.Throw")
local curTime = CurTime()
self.timeleft = curTime + 2 -- HOW LONG BEFORE EXPLOSION
self.removeTime = curTime + 30
self:Think()
end
function ENT:Think()
local curTime = CurTime()
if self.timeleft < curTime and !self.deactivated then
self:Explosion()
end
if (self.removeTime < curTime and !self.noRemove) then
SafeRemoveEntity(self)
end
self:NextThink( curTime )
return true
end
function ENT:EntityFacingFactor( theirent )
local dir = theirent:EyeAngles():Forward()
local facingdir = (self:GetPos() - (theirent.GetShootPos and theirent:GetShootPos() or theirent:GetPos())):GetNormalized()
return (facingdir:Dot(dir)+1)/2
end
function ENT:EntityFacingUs( theirent )
local dir = theirent:EyeAngles():Forward()
local facingdir = (self:GetPos()-(theirent.GetShootPos and theirent:GetShootPos() or theirent:GetPos())):GetNormalized()
if facingdir:Dot(dir)>-0.25 then return true end
end
function ENT:Explosion()
self:EmitSound("TFA_CSGO_FLASHGRENADE.BOOM")
local tr = {}
tr.start = self:GetPos()
tr.mask = MASK_SOLID
for _, v in ipairs(player.GetAll()) do
tr.endpos = v:GetShootPos()
tr.filter = { self, v, v:GetActiveWeapon() }
local traceres = util.TraceLine(tr)
if !traceres.Hit or traceres.Fraction>=1 or traceres.Fraction<=0 then
local factor = self:EntityFacingFactor(v)
local distance = v:GetShootPos():Distance(self:GetPos())
v:SetNWFloat("TFACSGO_LastFlash", CurTime())
v:SetNWEntity("TFACSGO_LastFlashBy", self:GetOwner())
v:SetNWFloat("TFACSGO_FlashDistance", distance)
v:SetNWFloat("TFACSGO_FlashFactor", factor)
hook.Run("PlayerFlashed", v, self:GetOwner(), self, distance, factor)
if v:GetNWFloat("TFACSGO_FlashDistance",distance) < 1500 and v:GetNWFloat("FlashFactor",factor) < tr.endpos:Distance(self:GetPos(v)) then
if v:GetNWFloat("TFACSGO_FlashDistance",distance) < 1000 then
v:SetDSP( 37 , false )
elseif v:GetNWFloat("TFACSGO_FlashDistance",distance) < 800 then
v:SetDSP( 36 , false )
elseif v:GetNWFloat("TFACSGO_FlashDistance",distance) < 600 then
v:SetDSP( 35, false )
end
end
end
end
--[[
for _, v in ipairs(ents.GetAll()) do
if v:IsNPC() and self:EntityFacingUs(v) then
tr.endpos = v.GetShootPos and v:GetShootPos() or v:GetPos()
tr.filter = { self, v, v.GetActiveWeapon and v:GetActiveWeapon() or v}
local traceres = util.TraceLine(tr)
if !traceres.Hit or traceres.Fraction>=1 or traceres.Fraction<=0 then
local flashdistance = tr.endpos:Distance(self:GetPos())
local flashtime = CurTime()
local distancefac = ( 1-math.Clamp((flashdistance-csgo_flashdistance+csgo_flashdistancefade)/csgo_flashdistancefade,0,1) )
local intensity = ( 1-math.Clamp(((CurTime()-flashtime)/distancefac-csgo_flashtime+csgo_flashfade)/csgo_flashfade,0,1) )
if intensity>0.8 then
v:SetNWFloat("TFACSGO_LastFlash", CurTime())
v:SetNWEntity("TFACSGO_LastFlashBy", self:GetOwner())
v:SetNWFloat("TFACSGO_FlashDistance", v:GetShootPos():Distance(self:GetPos()))
v:SetNWFloat("TFACSGO_FlashFactor", self:EntityFacingFactor(v))
if v.ClearSchedule then
v:ClearSchedule()
end
if v.SetEnemy then
v:SetEnemy(nil)
end
if v.AddEntityRelationship and IsValid(self.Owner) then
local oldrel = v.GetRelationship and v:GetRelationship(self.Owner) or ( ( IsFriendEntityName( v:GetClass() ) and !game.GetMap()=="gm_raid" ) and D_LI or D_HT )
v:AddEntityRelationship( self.Owner, D_NU, 99)
timer.Simple(csgo_flashtime/2, function()
if IsValid(v) and v:IsNPC() and IsValid(self) and IsValid(self.Owner) then
v:AddEntityRelationship( self.Owner, oldrel, 99)
end
end)
end
if v.ClearEnemyMemory then
v:ClearEnemyMemory()
end
end
end
end
end
]]
self.deactivated = true
end
/*---------------------------------------------------------
OnTakeDamage
---------------------------------------------------------*/
function ENT:OnTakeDamage( dmginfo )
end
/*---------------------------------------------------------
Use
---------------------------------------------------------*/
function ENT:Use( activator, caller, type, value )
end
/*---------------------------------------------------------
StartTouch
---------------------------------------------------------*/
function ENT:StartTouch( entity )
end
/*---------------------------------------------------------
EndTouch
---------------------------------------------------------*/
function ENT:EndTouch( entity )
end
/*---------------------------------------------------------
Touch
---------------------------------------------------------*/
function ENT:Touch( entity )
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/
--]]
ENT.Type = "anim"
ENT.PrintName = "explosive Grenade"
ENT.Author = ""
ENT.Contact = ""
ENT.Purpose = ""
ENT.Instructions = ""
ENT.DoNotDuplicate = true
ENT.DisableDuplicator = true
/*---------------------------------------------------------
OnRemove
---------------------------------------------------------*/
function ENT:OnRemove()
end
/*---------------------------------------------------------
PhysicsUpdate
---------------------------------------------------------*/
function ENT:PhysicsUpdate()
end
/*---------------------------------------------------------
PhysicsCollide
---------------------------------------------------------*/
function ENT:PhysicsCollide(data,phys)
if data.Speed > 60 then
self.Entity:EmitSound(Sound("TFA_CSGO_SmokeGrenade.Bounce"))
local impulse = (data.OurOldVelocity - 2 * data.OurOldVelocity:Dot(data.HitNormal) * data.HitNormal)*0.25
phys:ApplyForceCenter(impulse)
end
end

View File

@@ -0,0 +1,74 @@
--[[
| 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()
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.Spawnable = false
function ENT:Draw()
self:DrawModel()
end
function ENT:Initialize()
if SERVER then
self:SetModel( "models/weapons/tfa_csgo/w_eq_fraggrenade_thrown.mdl" )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self:PhysicsInit( SOLID_VPHYSICS )
self:SetCollisionGroup( COLLISION_GROUP_NONE )
self:DrawShadow( false )
end
self:EmitSound("TFA_CSGO_HEGrenade.Throw")
self.ExplodeTimer = CurTime() + 1.5
end
function ENT:Think()
if SERVER and self.ExplodeTimer <= CurTime() then
self:Explode()
self:Remove()
end
end
function ENT:PhysicsCollide( data )
if SERVER and data.Speed > 150 then
self:EmitSound( "TFA_CSGO_HEGrenade.Bounce" )
end
end
function ENT:OnRemove()
end
function ENT:Explode()
if SERVER then
local explode = ents.Create( "info_particle_system" )
explode:SetKeyValue( "effect_name", "explosion_hegrenade_brief" )
explode:SetOwner( self.Owner )
explode:SetPos( self:GetPos() )
explode:Spawn()
explode:Activate()
explode:Fire( "start", "", 0 )
explode:Fire( "kill", "", 15 )
local explode2 = ents.Create( "info_particle_system" )
explode2:SetKeyValue( "effect_name", "explosion_hegrenade_interior" )
explode2:SetOwner( self.Owner )
explode2:SetPos( self:GetPos() )
explode2:Spawn()
explode2:Activate()
explode2:Fire( "start", "", 0 )
explode2:Fire( "kill", "", 15 )
self:EmitSound( "TFA_CSGO_BaseGrenade.Explode" )
end
util.BlastDamage( self, self.Owner, self:GetPos(), 354, 98 )
local spos = self:GetPos()
local trs = util.TraceLine({start=spos + Vector(0,0,64), endpos=spos + Vector(0,0,-32), filter=self})
util.Decal("Scorch", trs.HitPos + trs.HitNormal, trs.HitPos - trs.HitNormal)
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/
--]]
AddCSLuaFile()
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.Spawnable = false
function ENT:Draw()
self:DrawModel()
end
function ENT:Initialize()
if SERVER then
self:SetModel( "models/weapons/tfa_csgo/w_eq_incendiarygrenade_thrown.mdl" )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self:PhysicsInit( SOLID_VPHYSICS )
self:SetCollisionGroup( COLLISION_GROUP_NONE )
self:DrawShadow( false )
self.fireEntities = {}
end
self:EmitSound("TFA_CSGO_IncGrenade.Throw")
self.ActiveTimer = CurTime() + 1.5
self.IgniteEnd = 0
self.IgniteEndTimer = CurTime()
self.IgniteStage = 0
self.IgniteStageTimer = CurTime()
ParticleEffectAttach("incgrenade_thrown_trail",PATTACH_POINT_FOLLOW,self,1)
self:PhysicsInitSphere( 8 )
end
function ENT:PhysicsCollide( data,phys )
if SERVER and self.ActiveTimer > CurTime() || data.Speed >= 150 then
self:EmitSound( "TFA_CSGO_SmokeGrenade.Bounce" )
end
local ang = data.HitNormal:Angle()
ang.p = math.abs( ang.p )
ang.y = math.abs( ang.y )
ang.r = math.abs( ang.r )
if ang.p > 90 or ang.p < 60 then
self.Entity:EmitSound(Sound("TFA_CSGO_SmokeGrenade.Bounce"))
local impulse = (data.OurOldVelocity - 2 * data.OurOldVelocity:Dot(data.HitNormal) * data.HitNormal)*0.25
phys:ApplyForceCenter(impulse)
else
if SERVER then
local delayedTrigger = false
local client = self.Owner
for k, v in pairs(ents.FindInSphere(self:GetPos(), 150)) do
if ((v:IsPlayer() or v:IsNPC())) then
hook.Run("InitializeGrenade", client, self, true)
delayedTrigger = true
break
end
end
local molotovfire = ents.Create( "tfa_csgo_fire_2" )
molotovfire:SetPos( self:GetPos() )
molotovfire:SetOwner( self.Owner )
molotovfire:Spawn()
if (!self.noRemove) then
SafeRemoveEntityDelayed(molotovfire, 8)
end
table.insert(self.fireEntities, molotovfire)
local molotovfire = ents.Create( "tfa_csgo_fire_1" )
local pos = self:GetPos()
molotovfire:SetPos( self:GetPos() )
molotovfire:SetOwner( self.Owner )
molotovfire:SetCreator( self )
molotovfire:Spawn()
if (!self.noRemove) then
SafeRemoveEntityDelayed(molotovfire, 8)
end
table.insert(self.fireEntities, molotovfire)
self:SetMoveType( MOVETYPE_NONE )
self:SetSolid( SOLID_NONE )
self:PhysicsInit( SOLID_NONE )
self:SetCollisionGroup( COLLISION_GROUP_NONE )
self:SetRenderMode( RENDERMODE_TRANSALPHA )
self:SetColor( Color( 255, 255, 255, 0 ) )
self:DrawShadow( false )
self:StopParticles()
if (delayedTrigger) then
ix.fights:TriggerGrenadesExplode(client)
end
end
self:EmitSound("TFA_CSGO_IncGrenade.Start")
self.IgniteEnd = 1
self.IgniteEndTimer = CurTime() + 7
self.IgniteStage = 1
self.IgniteStageTimer = CurTime() + 0.1
end
if (!self.noRemove) then
SafeRemoveEntityDelayed(self, 8)
end
end
function ENT:OnRemove()
if (self.fireEntities and !table.IsEmpty(self.fireEntities)) then
for k, v in pairs(self.fireEntities) do
if (IsValid(v)) then
v:Remove()
end
end
end
if (timer.Exists("GrenadesCleanup"..self:EntIndex())) then
timer.Remove("GrenadesCleanup"..self:EntIndex())
end
end

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/
--]]
AddCSLuaFile()
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.Spawnable = false
function ENT:Draw()
self:DrawModel()
end
function ENT:Initialize()
if SERVER then
self:SetModel( "models/weapons/w_eq_incendiarygrenade_dropped.mdl" )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self:PhysicsInit( SOLID_VPHYSICS )
self:SetCollisionGroup( COLLISION_GROUP_NONE )
self:DrawShadow( false )
self.fireEntities = {}
end
self:EmitSound("TFA_CSGO_IncGrenade.Throw")
self.ActiveTimer = CurTime() + 1.5
self.IgniteEnd = 0
self.IgniteEndTimer = CurTime()
self.IgniteStage = 0
self.IgniteStageTimer = CurTime()
ParticleEffectAttach("incgrenade_thrown_trail",PATTACH_POINT_FOLLOW,self,1)
self:PhysicsInitSphere( 8 )
end
function ENT:PhysicsCollide(data, phys)
if (SERVER and self.ActiveTimer > CurTime() or data.Speed >= 150) then
self:EmitSound("TFA_CSGO_SmokeGrenade.Bounce")
end
local ang = data.HitNormal:Angle()
ang.p = math.abs(ang.p)
ang.y = math.abs(ang.y)
ang.r = math.abs(ang.r)
if (ang.p > 90 or ang.p < 60) then
self.Entity:EmitSound(Sound("TFA_CSGO_SmokeGrenade.Bounce"))
local impulse = (data.OurOldVelocity - 2 * data.OurOldVelocity:Dot(data.HitNormal) * data.HitNormal) * 0.25
phys:ApplyForceCenter(impulse)
else
if (SERVER) then
local delayedTrigger = false
local client = self.Owner
for k, v in pairs(ents.FindInSphere(self:GetPos(), 150)) do
if (v:IsPlayer() or v:IsNPC()) then
hook.Run("InitializeGrenade", client, self, true)
delayedTrigger = true
break
end
end
local molotovfire = ents.Create("arccw_go_fire")
molotovfire:SetPos(self:GetPos())
molotovfire:SetOwner(self.Owner)
molotovfire:Spawn()
if (!self.noRemove) then
SafeRemoveEntityDelayed(molotovfire, 8)
end
table.insert(self.fireEntities, molotovfire)
ParticleEffectAttach("fire_large_01", PATTACH_ABSORIGIN_FOLLOW, molotovfire, 0)
-- Schedule the removal of physics and collision settings after a short delay
timer.Simple(0.1, function()
if (IsValid(self)) then
self:SetMoveType(MOVETYPE_NONE)
self:SetSolid(SOLID_NONE)
self:PhysicsInit(SOLID_NONE)
self:SetCollisionGroup(COLLISION_GROUP_NONE)
self:SetRenderMode(RENDERMODE_TRANSALPHA)
self:SetColor(Color(255, 255, 255, 0))
self:DrawShadow(false)
self:StopParticles()
end
end)
end
self:EmitSound("TFA_CSGO_IncGrenade.Start")
self.IgniteEnd = 1
self.IgniteEndTimer = CurTime() + 7
self.IgniteStage = 1
self.IgniteStageTimer = CurTime() + 0.1
end
if (!self.noRemove) then
SafeRemoveEntityDelayed(self, 8)
end
end
function ENT:OnRemove()
if (self.fireEntities and !table.IsEmpty(self.fireEntities)) then
for k, v in pairs(self.fireEntities) do
if (IsValid(v)) then
v:Remove()
end
end
end
if (timer.Exists("GrenadesCleanup"..self:EntIndex())) then
timer.Remove("GrenadesCleanup"..self:EntIndex())
end
end

View File

@@ -0,0 +1,230 @@
--[[
| 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/
--]]
if (CLIENT) then
local EFFECT = {}
--Thanks Inconceivable/Generic Default
function EFFECT:Init(data)
self.Entity = data:GetEntity()
pos = data:GetOrigin()
self.Emitter = ParticleEmitter(pos)
local cloud = ents.CreateClientside( "arccw_smoke" )
if !IsValid(cloud) then return end
cloud:SetPos(pos)
cloud:Spawn()
-- for i = 1, 100 do
-- local particle = self.Emitter:Add("arccw/particle/particle_smokegrenade", pos)
-- if (particle) then
-- particle:SetVelocity(VectorRand():GetNormalized() * math.Rand(150, 300))
-- if i <= 5 then
-- particle:SetDieTime(25)
-- else
-- particle:SetDieTime(math.Rand(20, 25))
-- end
-- particle:SetStartAlpha(math.Rand(150, 255))
-- particle:SetEndAlpha(0)
-- particle:SetStartSize(44)
-- particle:SetEndSize(144)
-- particle:SetRoll(math.Rand(0, 360))
-- particle:SetRollDelta(math.Rand(-1, 1) / 3)
-- particle:SetColor(65, 65, 65)
-- particle:SetAirResistance(100)
-- particle:SetCollide(true)
-- particle:SetBounce(1)
-- end
-- end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end
effects.Register(EFFECT, "tfa_csgo_smokenade")
end
AddCSLuaFile()
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.PrintName = "Smoke Grenade"
ENT.Author = ""
ENT.Information = ""
ENT.Spawnable = false
ENT.AdminSpawnable = false
ENT.BounceSound = Sound("TFA_CSGO_SmokeGrenade.Bounce")
ENT.ExplodeSound = Sound("TFA_CSGO_BaseSmokeEffect.Sound")
function ENT:Draw()
self:DrawModel()
end
function ENT:Initialize()
if SERVER then
self:SetModel( "models/weapons/arccw_go/w_eq_smokegrenade_thrown.mdl" )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self:PhysicsInit( SOLID_VPHYSICS )
self:SetCollisionGroup( COLLISION_GROUP_NONE )
self:DrawShadow( false )
self.Delay = CurTime() + 3
self.NextParticle = 0
self.ParticleCount = 0
self.First = true
self.IsDetonated = false
end
self:EmitSound("TFA_CSGO_SmokeGrenade.Throw")
end
function ENT:PhysicsCollide(data, physobj)
if SERVER then
self.HitP = data.HitPos
self.HitN = data.HitNormal
if self:GetVelocity():Length() > 60 then
self:EmitSound(self.BounceSound)
end
if self:GetVelocity():Length() < 5 then
self:SetMoveType(MOVETYPE_NONE)
end
for k, v in pairs( ents.FindInSphere( self:GetPos(), 155 ) ) do
if v:GetClass() == "tfa_csgo_fire_1" or v:GetClass() == "tfa_csgo_fire_2" and self.IsDetonated == false then
self:Detonate(self,self:GetPos())
self.IsDetonated = true
end
end
end
end
function ENT:Think()
if SERVER then
local curTime = CurTime()
if curTime > self.Delay then
if self.IsDetonated == false then
self:Detonate(self,self:GetPos())
self.IsDetonated = true
end
end
if (self.nextSmoke and curTime > self.nextSmoke) then
self:CreateSmoke()
end
end
for k, v in pairs (ents.GetAll()) do
local SmokeHidden2 = v:GetNWBool( "IsInsideSmoke", false )
if IsValid(v) and v:IsPlayer() or v:IsNPC() and v.SmokeHidden2 != nil or v.SmokeHidden2 == true then
v:SetNWBool("IsInsideSmoke", false)
v:RemoveFlags(FL_NOTARGET)
end
end
if self.IsDetonated then
for k, v in pairs( ents.FindInSphere( self:GetPos(), 155 ) ) do
if (v:GetClass("tfa_csgo_fire_1") or v:GetClass("tfa_csgo_fire_2")) and v:IsValid() then
v:SetNWBool("extinguished",true)
end
if v:GetNWBool("extinguished",true) and self.ParticleCreated == false then
//ParticleEffect( "extinguish_fire", self:GetPos(), self:GetAngles() )
self.ExtinguishParticleCreated = true
end
if IsValid(v) and v:IsPlayer() or v:IsNPC() then
local SmokeHidden = v:GetNWBool( "IsInsideSmoke", false )
if v.SmokeHidden != false or v.SmokeHidden == nil then
v:SetNWBool("IsInsideSmoke", true)
v:AddFlags(FL_NOTARGET)
end
end
if IsValid(v) and v:IsNPC() and v.SmokeHidden == true then
if v.OldProfiecency == nil then
v.OldProfiecency = v:GetCurrentWeaponProficiency()
end
v:SetCurrentWeaponProficiency(WEAPON_PROFICIENCY_POOR)
v:ClearSchedule()
v:SetState(NPC_STATE_ALERT)
end
end
end
end
function ENT:Detonate(self,pos)
self.ParticleCreated = false
self.ExtinguishParticleCreated = false
if SERVER then
if not self:IsValid() then return end
self:SetNWBool("IsDetonated",true)
self:EmitSound(self.ExplodeSound)
self:CreateSmoke(pos)
end
if self.ParticleCreated != true then
ParticleEffectAttach("explosion_child_smoke03e",PATTACH_ABSORIGIN_FOLLOW,self,0)
ParticleEffectAttach("explosion_child_core06b",PATTACH_POINT_FOLLOW,self,0)
ParticleEffectAttach("explosion_child_smoke07b",PATTACH_ABSORIGIN_FOLLOW,self,0)
ParticleEffectAttach("explosion_child_smoke07c",PATTACH_POINT_FOLLOW,self,0)
ParticleEffectAttach("explosion_child_distort01c",PATTACH_POINT_FOLLOW,self,0)
self.ParticleCreated = true
end
for k, v in pairs( ents.FindInSphere( self:GetPos(), 155 ) ) do
if (v:GetClass("tfa_csgo_fire_1") or v:GetClass("tfa_csgo_fire_2")) and v:IsValid() then
v:SetNWBool("extinguished",true)
end
if v:GetNWBool("extinguished",true) and self.ParticleCreated == false then
//ParticleEffect( "extinguish_fire", self:GetPos(), self:GetAngles() )
self.ExtinguishParticleCreated = true
end
end
self:SetMoveType( MOVETYPE_NONE )
if SERVER and !self.noRemove then
SafeRemoveEntityDelayed(self, 60)
end
end
function ENT:CreateSmoke(pos)
local gas = EffectData()
gas:SetOrigin(pos or self:GetPos())
gas:SetEntity(self.Owner) //i dunno, just use it!
util.Effect("tfa_csgo_smokenade", gas)
self.nextSmoke = CurTime() + 20
end
function ENT:OnRemove()
for k, v in pairs (ents.GetAll()) do
local SmokeHidden = v:GetNWBool( "IsInsideSmoke", false )
if v:IsPlayer() or v:IsNPC() and v.SmokeHidden2 != nil or v.SmokeHidden2 == true then
v:SetNWBool("IsInsideSmoke", false)
v:RemoveFlags(FL_NOTARGET)
end
if v:IsNPC() and v.OldProfiecency != nil then
v:SetCurrentWeaponProficiency(v.OldProfiecency)
end
end
if (timer.Exists("GrenadesCleanup"..self:EntIndex())) then
timer.Remove("GrenadesCleanup"..self:EntIndex())
end
end

View File

@@ -0,0 +1,232 @@
--[[
| 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")
function ENT:Think()
local CT = CurTime()
local FT = FrameTime()
local attach = self:LookupAttachment("Wick")
local data = self:GetAttachment(attach)
local attpos,attangs
attpos = data.Pos
attangs = data.Ang
if self:GetNWBool("Fused") then
ParticleEffect("weapon_sensorgren_beeplight",attpos,attangs,self)
self.ParticleCreated = true
self:StopParticles()
if self.FuseTime then
if self.FuseTime <= CT then
if not self.NextBeep then
self.DetonateTime = CT + 1.5
self.NextBeep = 0
end
self.NextBeep = self.NextBeep - FT * 6
self:StopParticles()
self.ParticleCreated = false
if self.NextBeep <= 0 and self.ParticleCreated == false then
self.NextBeep = 1
end
end
else
self.FuseTime = CT + 0.65
self:StopParticles()
end
end
end
local tr, col = {}, Color(255, 25, 25)
local glow = Material("tfa_csgo/sprites/flare_sprite_02")
function ENT:Draw()
local ply = LocalPlayer()
local attach = self:LookupAttachment("Wick")
local data = self:GetAttachment(attach)
local attpos,attangs
attpos = data.Pos
attangs = data.Ang
self:DrawModel()
local CT = CurTime()
if self.NextBeep then
if self.NextBeep > 0 then
tr.start = self:GetPos()
tr.endpos = ply:EyePos()
tr.mask = MASK_SOLID
tr.filter = { self, ply, ply:GetActiveWeapon() }
local trace = util.TraceLine(tr)
local fraction = trace.Fraction
if self.DetonateTime > CT then
self:StopParticles()
end
end
end
end
local TFA_HaloManager = {}
TFA_HaloManager.EVENT_NAME = "TFA_SONAR"
-- Taken from Sakarias88's Intelligent HUD
local function GetEntityAABB(ent)
local mins = ent:OBBMins()
local maxs = ent:OBBMaxs()
local pos = {
ent:LocalToWorld(Vector(maxs.x, maxs.y, maxs.z)):ToScreen(),
ent:LocalToWorld(Vector(maxs.x, mins.y, maxs.z)):ToScreen(),
ent:LocalToWorld(Vector(maxs.x, maxs.y, mins.z)):ToScreen(),
ent:LocalToWorld(Vector(maxs.x, mins.y, mins.z)):ToScreen(),
ent:LocalToWorld(Vector(mins.x, maxs.y, maxs.z)):ToScreen(),
ent:LocalToWorld(Vector(mins.x, mins.y, maxs.z)):ToScreen(),
ent:LocalToWorld(Vector(mins.x, maxs.y, mins.z)):ToScreen(),
ent:LocalToWorld(Vector(mins.x, mins.y, mins.z)):ToScreen()
}
local minX = pos[1].x
local minY = pos[1].y
local maxX = pos[1].x
local maxY = pos[1].y
for k = 2, 8 do
if pos[k].x > maxX then
maxX = pos[k].x
end
if pos[k].y > maxY then
maxY = pos[k].y
end
if pos[k].x < minX then
minX = pos[k].x
end
if pos[k].y < minY then
minY = pos[k].y
end
end
return Vector(minX, minY), Vector(maxX, maxY)
end
local function TFA_SONAR_CREATE_HALOS(len, ply)
local entnum = net.ReadInt(14)
for i = 1, entnum do
TFA_HaloManager:Add(net.ReadEntity(), 3)
end
end
net.Receive("TFA_CSGO_SONAR_EXPLODE", TFA_SONAR_CREATE_HALOS)
function TFA_HaloManager:Add(ent, t)
if not IsValid(ent) then return end
table.insert(self, {ent = ent, t = CurTime() + t})
self:Enable()
end
local _ents = {}
local halo_color = Color(255, 0, 0)
function TFA_HaloManager:Enable()
local events = hook.GetTable()
local tab = events["PreDrawHalos"]
if tab and not tab[self.EVENT_NAME] or not tab then
hook.Add("PreDrawHalos", self.EVENT_NAME, function()
self:DrawHalo()
end)
end
local tab = events["PostDrawOpaqueRenderables"]
if tab and not tab[self.EVENT_NAME] or not tab then
hook.Add("PostDrawOpaqueRenderables", self.EVENT_NAME, function()
self:Draw()
end)
end
end
function TFA_HaloManager:Disable()
hook.Remove("PreDrawHalos", self.EVENT_NAME)
hook.Remove("PostDrawOpaqueRenderables", self.EVENT_NAME)
end
local mat1 = Material("models/debug/debugwhite")
function TFA_HaloManager:Draw()
for k, v in ipairs(self) do
if not IsValid(v.ent) then self[k] = nil continue end
render.ClearStencil()
render.SetStencilEnable(true)
render.SetStencilWriteMask(255)
render.SetStencilTestMask(255)
render.SetStencilReferenceValue(1)
render.SetStencilCompareFunction(STENCILCOMPARISONFUNCTION_ALWAYS)
render.SetStencilFailOperation(STENCILOPERATION_KEEP)
render.SetStencilPassOperation(STENCILOPERATION_REPLACE)
render.SetStencilZFailOperation(STENCILOPERATION_REPLACE)
v.ent:DrawModel()
render.SetStencilCompareFunction(STENCILCOMPARISONFUNCTION_EQUAL)
local mins, maxs = GetEntityAABB(v.ent)
cam.Start2D()
local health = v.ent:Health()
local maxHealth = v.ent:GetMaxHealth()
local mul = math.Clamp(health / maxHealth, 0, 1)
local x = mins.x
local y = mins.y + (maxs.y - mins.y) * mul
local w = maxs.x - x
local h = maxs.y - y
surface.SetDrawColor(255, 0, 0, 32)
surface.DrawRect(x, y, w, h)
cam.End2D()
render.SetStencilEnable(false)
end
end
function TFA_HaloManager:DrawHalo()
local CT = CurTime()
for i = 1, #_ents do
_ents[i] = nil
end
for k, v in ipairs(self) do
if (not IsValid(v.ent) or v.ent:Health() <= 0) or v.t <= CT then
table.remove(self, k)
else
table.insert(_ents, v.ent)
end
end
halo.Add(_ents, halo_color, 2, 2, 2, true, true )
if #self <= 0 then
self:Disable()
end
end

View File

@@ -0,0 +1,140 @@
--[[
| 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")
util.AddNetworkString("TFA_CSGO_SONAR_EXPLODE")
local function EntityFacingFactor(ent1, ent2)
local dir = ent2:EyeAngles():Forward()
local facingdir = (ent1:GetPos() - (ent2.EyePos and ent2:EyePos() or ent2:GetPos())):GetNormalized()
return (facingdir:Dot(dir) + 1) / 2
end
local tr = {}
function ENT:Detonate()
local origin = self:GetPos()
if IsValid(self.Owner) then
local _ents = ents.FindInSphere(origin, self.FindRadius)
local tab = {}
for _, v in ipairs(_ents) do
if v:IsNPC() or v:IsPlayer() and v ~= self.Owner then
table.insert(tab, v)
end
end
if #tab <= 0 then return end
net.Start("TFA_CSGO_SONAR_EXPLODE", true)
net.WriteInt(#tab, 14)
for i = 1, #tab do
net.WriteEntity(tab[i])
end
net.Send(self.Owner)
end
tr.start = origin
tr.mask = MASK_SOLID
for k, v in ipairs(player.GetAll()) do
tr.endpos = v:EyePos()
tr.filter = { self, v, v:GetActiveWeapon() }
local trace = util.TraceLine(tr)
if not trace.Hit or trace.Fraction >= 1 or trace.Fraction <= 0 then
v:SetNWFloat("TFACSGO_LastFlash", CurTime() - 4)
v:SetNWFloat("TFACSGO_FlashDistance", tr.endpos:Distance(origin))
v:SetNWFloat("TFACSGO_FlashFactor", EntityFacingFactor(self, v) * 0.5)
end
end
self:EmitSound("TFA_CSGO_Sensor.Detonate")
local explode = ents.Create( "info_particle_system" )
explode:SetKeyValue( "effect_name", "weapon_sensorgren_detonate" )
explode:SetOwner( self.Owner )
explode:SetPos( self:GetPos() )
explode:Spawn()
explode:Activate()
explode:Fire( "start", "", 0 )
explode:Fire( "kill", "", 30 )
SafeRemoveEntity(self)
end
function ENT:Fuse(ent)
if SERVER then
self.WeldEnt = constraint.Weld(self, ent, 0, 0, 0, true, false)
self:EmitSound("TFA_CSGO_Sensor.Activate")
timer.Simple(3, function()
if IsValid(self) then
self:StopParticles()
self:Detonate()
end
end)
end
end
function ENT:PhysicsCollide(data, physObj)
if not self:GetNWBool("Fused") then
if data.HitEntity then
if not (data.HitEntity:IsNPC() or data.HitEntity:IsPlayer()) then
self:SetNWBool("Fused", true)
timer.Simple(0, function()
if IsValid(self) then
self:EmitSound("TFA_CSGO_Sensor.Land")
self:Fuse(data.HitEntity)
end
end)
end
end
end
orient_angles(physObj,data)
end
function ENT:OnRemove()
if (timer.Exists("GrenadesCleanup"..self:EntIndex())) then
timer.Remove("GrenadesCleanup"..self:EntIndex())
end
end
function orient_angles(obj, data) --this function juts takes in the hitnormal of the collision and rotates the angles accordingly
if data.HitNormal.z < -.5 then
obj:SetAngles((data.HitNormal + Vector(0,90,0) ):Angle())
return
end
if data.HitNormal.z > .5 then
obj:SetAngles((data.HitNormal + Vector(-90,0,0) ):Angle())
return
end
if data.HitNormal.y < -.5 then
obj:SetAngles((data.HitNormal + Vector(0,0,90) ):Angle())
return
end
if data.HitNormal.y > .5 then
obj:SetAngles((data.HitNormal + Vector(0,0,90) ):Angle())
return
end
if data.HitNormal.x < -.5 then
obj:SetAngles((data.HitNormal + Vector(0,0,90) ):Angle())
return
end
if data.HitNormal.x > .5 then
obj:SetAngles((data.HitNormal + Vector(0,0,90) ):Angle())
return
end
end

View File

@@ -0,0 +1,43 @@
--[[
| 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/
--]]
ENT.Type = "anim"
ENT.Spawnable = false
ENT.FindRadius = 250
ENT.Model = "models/weapons/tfa_csgo/w_eq_sensorgrenade_thrown.mdl"
function ENT:Initialize()
if SERVER then
self:SetModel(self.Model)
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:SetCollisionGroup(COLLISION_GROUP_NONE)
self:DrawShadow( false )
local phys = self:GetPhysicsObject()
if IsValid(phys) then
phys:Wake()
end
end
self:EmitSound("TFA_CSGO_HEGrenade.Throw")
end
function ENT:Use(activator, caller)
return false
end
function ENT:OnRemove()
return false
end

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

View File

@@ -0,0 +1,133 @@
--[[
| 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/
--]]
ITEM.name = "TFA Weapons"
ITEM.base = "base_weapons"
ITEM.description = "A Weapon."
ITEM.category = "Armes de mêlées"
ITEM.model = "models/weapons/w_pistol.mdl"
ITEM.class = "weapon_pistol"
ITEM.width = 2
ITEM.height = 2
ITEM.isWeapon = true
ITEM.isGrenade = false
ITEM.weaponCategory = "sidearm"
ITEM.useSound = "items/ammo_pickup.wav"
ITEM.atts = {}
function ITEM:GetDescription()
local description = {self.description}
return table.concat(description, "")
end
function ITEM:GetBaseInfo()
local baseInfo = {}
if (self.balanceCat) then
baseInfo[#baseInfo + 1] = "Catégorie : "
if (self.isMelee) then
baseInfo[#baseInfo + 1] = "Mêlée"
end
if (CLIENT) then
baseInfo[#baseInfo + 1] = "\nChance de critique : "
if (self.isMelee) then
baseInfo[#baseInfo + 1] = math.max(math.floor(ix.weapons:GetMeleeWeaponBaseHitChance(LocalPlayer():GetCharacter(), self.class) * ix.weapons:GetWeaponAimPenalty(self.class) * 100), 0)
else
baseInfo[#baseInfo + 1] = math.floor(ix.weapons:GetWeaponSkillMod(LocalPlayer():GetCharacter(), self.class) * ix.weapons:GetWeaponAimPenalty(self.class) * 100)
end
baseInfo[#baseInfo + 1] = "%%"
end
end
return table.concat(baseInfo, "")
end
function ITEM:GetExtendedInfo()
local extendedInfo = {}
if (self.balanceCat) then
if (self.isMelee) then
extendedInfo[#extendedInfo + 1] = "Dégats : "
extendedInfo[#extendedInfo + 1] = ix.weapons:GetMeleeWeaponBaseDamage(self.class)
else
extendedInfo[#extendedInfo + 1] = "Dégats : "
extendedInfo[#extendedInfo + 1] = ix.weapons:GetWeaponBaseDamage(self.class)
local min, max, bFlat = ix.weapons:GetWeaponSkillRequired(self.class)
if (!bFlat) then
extendedInfo[#extendedInfo + 1] = "\nSkill range : "
extendedInfo[#extendedInfo + 1] = min.."-"..max
else
extendedInfo[#extendedInfo + 1] = "\nSkill required : "
extendedInfo[#extendedInfo + 1] = min
end
local minR, effR = ix.weapons:GetWeaponEffectiveRanges(self.class)
extendedInfo[#extendedInfo + 1] = "\nMinimum effective range: "
extendedInfo[#extendedInfo + 1] = minR.."m"
extendedInfo[#extendedInfo + 1] = "\nMaximum effective range: "
extendedInfo[#extendedInfo + 1] = effR.."m"
extendedInfo[#extendedInfo + 1] = "\nShots per action point: "
extendedInfo[#extendedInfo + 1] = ix.weapons:GetWeaponNumShots(self.class)
extendedInfo[#extendedInfo + 1] = "\nArmor Penetration: "
extendedInfo[#extendedInfo + 1] = math.floor(ix.weapons:GetArmorPen(self.class) * 100).."%%"
end
end
return table.concat(extendedInfo, "")
end
function ITEM:GetColorAppendix()
if self.balanceCat then
return {["blue"] = self:GetBaseInfo(), ["red"] = self:GetExtendedInfo()}
end
end
function ITEM:OnRegistered()
if (self.balanceCat and ix.weapons) then
if (self.isMelee) then
ix.weapons:RegisterMeleeWeapon(self.class, self.balanceCat)
else
ix.weapons:RegisterWeapon(self.class, self.balanceCat)
end
ix.weapons:RegisterWeaponExceptions(self.class, self.baseDamage, self.armorPen, self.aimPenalty, self.numShots)
end
end
function ITEM:OnEquipWeapon(client, weapon)
if (self:GetData("BioLocked") or self:GetData("tfa_atts") or !table.IsEmpty(self.atts)) then
timer.Simple(0.5, function()
weapon:SetNetVar("ixItemAtts", self.atts)
if (!IsValid(weapon)) then return end
weapon:InitAttachments()
for _, v in pairs(self.atts) do
if (self:GetData("tfa_default_atts_uneq", {})[v]) then continue end
weapon:Attach(v)
end
if (self:GetData("tfa_atts")) then
for _, v in pairs(self:GetData("tfa_atts")) do
if (istable(v) and v.att) then
weapon:Attach(v.att)
end
end
end
if (self:GetData("BioLocked")) then
weapon:SetNetVar("BioLocked", true)
end
end)
end
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/
--]]
ITEM.name = "Batte de baseball"
ITEM.description = "Un instrument de puissance entre vos mains, la batte de baseball respire la détermination et la force. Sa forme effilée et son manche robuste en bois vous offrent une prise ferme et confortable. Chaque rainure et chaque éclat sur sa surface racontent une histoire de coups précis et puissants. Son poids équilibré vous confère un sentiment de contrôle et de confiance, prêt à affronter n'importe quel défi sur le terrain."
ITEM.model = "models/weapons/tfa_nmrih/w_me_bat_metal.mdl"
ITEM.class = "tfa_nmrih_bat"
ITEM.isMelee = true
ITEM.baseDamage = 15
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "medium"
ITEM.width = 1
ITEM.height = 4
ITEM.iconCam = {
pos = Vector(-509.64, -427.61, 310.24),
ang = Angle(24.62, 400.03, 0),
fov = 0.58
}

View File

@@ -0,0 +1,26 @@
--[[
| 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/
--]]
ITEM.name = "Marteau"
ITEM.description = "Un outil de construction robuste et polyvalent conçu pour enlever les clous de manière efficace."
ITEM.model = "models/weapons/tfa_nmrih/w_tool_barricade.mdl"
ITEM.class = "tfa_nmrih_bcd"
ITEM.isMelee = true
ITEM.baseDamage = 13
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "light"
ITEM.width = 1
ITEM.height = 3
ITEM.iconCam = {
pos = Vector(-509.64, -427.61, 310.24),
ang = Angle(24.69, 400, 0),
fov = 0.35
}

View File

@@ -0,0 +1,154 @@
--[[
| 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/
--]]
ITEM.name = "Couperet"
ITEM.description = "Un outil tranchant et robuste doté d'une lame lourde et coupante, montée sur un manche solide en bois."
ITEM.model = "models/weapons/tfa_nmrih/w_me_cleaver.mdl"
ITEM.class = "tfa_nmrih_cleaver"
ITEM.isMelee = true
ITEM.baseDamage = 20
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "light"
ITEM.width = 1
ITEM.height = 3
ITEM.iconCam = {
pos = Vector(-509.64, -427.61, 310.24),
ang = Angle(24.73, 400.09, 0),
fov = 0.35
}
ITEM.maxDurability = 20
ITEM.isTool = true
local color_green = Color(100, 255, 100)
local color_red = Color(200, 25, 25)
if (CLIENT) then
function ITEM:PaintOver(item, w, h)
if (item:GetData("equip")) then
surface.SetDrawColor(110, 255, 110, 100)
surface.DrawRect(w - 14, h - 20, 8, 8)
end
local maxDurability = item:GetMaxDurability()
local durability = item:GetDurability()
local width = w - 8
local cellWidth = math.Round(width / maxDurability)
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
surface.SetDrawColor(color)
for i = 0, durability - 1 do
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
end
end
end
ITEM.functions.SetMaxDurability = {
name = "Définir durabilité max",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter max durability value", itemTable:GetMaxDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0) then
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
ITEM.functions.SetDurability = {
name = "Définir durabilité",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter durability value for this tool here", itemTable:GetDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
function ITEM:GetDescription()
local maxDurability = self:GetMaxDurability()
local durability = self:GetDurability()
return self.description .. "\n\nDurabilité : " .. durability .. "/" .. maxDurability
end
function ITEM:OnInstanced(index, x, y, item)
self:SetData("durability", self:GetMaxDurability())
end
function ITEM:DamageDurability(amount)
self:SetData("durability", math.max(0, self:GetDurability() - 1))
if (self:GetDurability() == 0) then
self:OnBreak()
end
end
function ITEM:GetBreakSound()
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
end
function ITEM:OnBreak()
local breakSound = self:GetBreakSound()
if (IsValid(self.player)) then
self.player:EmitSound(breakSound, 65)
elseif (IsValid(self.entity)) then
self.entity:EmitSound(breakSound, 65)
end
self:Remove()
end
function ITEM:GetDurability()
return self:GetData("durability", self:GetMaxDurability())
end
function ITEM:GetMaxDurability()
return self:GetData("maxDurability", self.maxDurability)
end

View File

@@ -0,0 +1,153 @@
--[[
| 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/
--]]
ITEM.name = "Pied de biche"
ITEM.description = "Cet outil robuste et polyvalent est composé d'une longue tige en acier solide munie d'une extrémité plate et pointue."
ITEM.model = "models/weapons/tfa_nmrih/w_me_crowbar.mdl"
ITEM.class = "tfa_nmrih_crowbar"
ITEM.isMelee = true
ITEM.baseDamage = 20
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "medium"
ITEM.width = 1
ITEM.height = 4
ITEM.iconCam = {
pos = Vector(-509.64, -427.61, 310.24),
ang = Angle(25.07, 400.05, 0),
fov = 0.58
}
ITEM.maxDurability = 25
ITEM.isTool = true
local color_green = Color(100, 255, 100)
local color_red = Color(200, 25, 25)
if (CLIENT) then
function ITEM:PaintOver(item, w, h)
if (item:GetData("equip")) then
surface.SetDrawColor(110, 255, 110, 100)
surface.DrawRect(w - 14, h - 20, 8, 8)
end
local maxDurability = item:GetMaxDurability()
local durability = item:GetDurability()
local width = w - 8
local cellWidth = math.Round(width / maxDurability)
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
surface.SetDrawColor(color)
for i = 0, durability - 1 do
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
end
end
end
ITEM.functions.SetMaxDurability = {
name = "Définir durabilité max",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter max durability value", itemTable:GetMaxDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0) then
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
ITEM.functions.SetDurability = {
name = "Définir durabilité",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter durability value for this tool here", itemTable:GetDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
function ITEM:GetDescription()
local maxDurability = self:GetMaxDurability()
local durability = self:GetDurability()
return self.description .. "\n\nDurabilité : " .. durability .. "/" .. maxDurability
end
function ITEM:OnInstanced(index, x, y, item)
self:SetData("durability", self:GetMaxDurability())
end
function ITEM:DamageDurability(amount)
self:SetData("durability", math.max(0, self:GetDurability() - 1))
if (self:GetDurability() == 0) then
self:OnBreak()
end
end
function ITEM:GetBreakSound()
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
end
function ITEM:OnBreak()
local breakSound = self:GetBreakSound()
if (IsValid(self.player)) then
self.player:EmitSound(breakSound, 65)
elseif (IsValid(self.entity)) then
self.entity:EmitSound(breakSound, 65)
end
self:Remove()
end
function ITEM:GetDurability()
return self:GetData("durability", self:GetMaxDurability())
end
function ITEM:GetMaxDurability()
return self:GetData("maxDurability", self.maxDurability)
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/
--]]
ITEM.name = "Hache d'incendie"
ITEM.description = "Dotée d'une tête en acier robuste et d'un manche en bois résistant, cette hache offre une combinaison idéale de puissance et de maniabilité."
ITEM.model = "models/weapons/tfa_nmrih/w_me_axe_fire.mdl"
ITEM.class = "tfa_nmrih_fireaxe"
ITEM.isMelee = true
ITEM.baseDamage = 20
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "heavy"
ITEM.width = 1
ITEM.height = 4
ITEM.iconCam = {
pos = Vector(-509.64, -427.61, 310.24),
ang = Angle(24.94, 400.02, 0),
fov = 0.68
}

View File

@@ -0,0 +1,153 @@
--[[
| 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/
--]]
ITEM.name = "Fubar"
ITEM.description = "Un outil robuste et polyvalent, le fubar est une combinaison entre une masse et une barre à pied. "
ITEM.model = "models/weapons/tfa_nmrih/w_me_fubar.mdl"
ITEM.class = "tfa_nmrih_fubar"
ITEM.isMelee = true
ITEM.baseDamage = 24
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "heavy"
ITEM.width = 1
ITEM.height = 4
ITEM.iconCam = {
pos = Vector(-509.64, -427.61, 310.24),
ang = Angle(24.82, 400.04, 0),
fov = 0.84
}
ITEM.maxDurability = 40
ITEM.isTool = true
local color_green = Color(100, 255, 100)
local color_red = Color(200, 25, 25)
if (CLIENT) then
function ITEM:PaintOver(item, w, h)
if (item:GetData("equip")) then
surface.SetDrawColor(110, 255, 110, 100)
surface.DrawRect(w - 14, h - 20, 8, 8)
end
local maxDurability = item:GetMaxDurability()
local durability = item:GetDurability()
local width = w - 8
local cellWidth = math.Round(width / maxDurability)
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
surface.SetDrawColor(color)
for i = 0, durability - 1 do
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
end
end
end
ITEM.functions.SetMaxDurability = {
name = "Définir durabilité max",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter max durability value", itemTable:GetMaxDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0) then
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
ITEM.functions.SetDurability = {
name = "Définir durabilité",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter durability value for this tool here", itemTable:GetDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
function ITEM:GetDescription()
local maxDurability = self:GetMaxDurability()
local durability = self:GetDurability()
return self.description .. "\n\nDurabilité : " .. durability .. "/" .. maxDurability
end
function ITEM:OnInstanced(index, x, y, item)
self:SetData("durability", self:GetMaxDurability())
end
function ITEM:DamageDurability(amount)
self:SetData("durability", math.max(0, self:GetDurability() - 1))
if (self:GetDurability() == 0) then
self:OnBreak()
end
end
function ITEM:GetBreakSound()
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
end
function ITEM:OnBreak()
local breakSound = self:GetBreakSound()
if (IsValid(self.player)) then
self.player:EmitSound(breakSound, 65)
elseif (IsValid(self.entity)) then
self.entity:EmitSound(breakSound, 65)
end
self:Remove()
end
function ITEM:GetDurability()
return self:GetData("durability", self:GetMaxDurability())
end
function ITEM:GetMaxDurability()
return self:GetData("maxDurability", self.maxDurability)
end

View File

@@ -0,0 +1,155 @@
--[[
| 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/
--]]
ITEM.name = "Hachette"
ITEM.description = "La hachette est un outil polyvalent et redoutable dans un monde post-apocalyptique. Avec son manche court en bois résistant et sa tête en acier forgé, elle incarne la force brute et l'efficacité. Les marques d'usure sur la lame témoignent de son utilisation intensive et des combats menés avec détermination. "
ITEM.model = "models/weapons/tfa_nmrih/w_me_hatchet.mdl"
ITEM.class = "tfa_nmrih_hatchet"
ITEM.isMelee = true
ITEM.baseDamage = 18
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "light"
ITEM.model = "models/weapons/tfa_nmrih/w_me_hatchet.mdl"
ITEM.width = 1
ITEM.height = 3
ITEM.iconCam = {
pos = Vector(-509.64, -427.61, 310.24),
ang = Angle(24.97, 400.05, 0),
fov = 0.48
}
ITEM.maxDurability = 12
ITEM.isTool = true
local color_green = Color(100, 255, 100)
local color_red = Color(200, 25, 25)
if (CLIENT) then
function ITEM:PaintOver(item, w, h)
if (item:GetData("equip")) then
surface.SetDrawColor(110, 255, 110, 100)
surface.DrawRect(w - 14, h - 20, 8, 8)
end
local maxDurability = item:GetMaxDurability()
local durability = item:GetDurability()
local width = w - 8
local cellWidth = math.Round(width / maxDurability)
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
surface.SetDrawColor(color)
for i = 0, durability - 1 do
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
end
end
end
ITEM.functions.SetMaxDurability = {
name = "Définir durabilité max",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter max durability value", itemTable:GetMaxDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0) then
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
ITEM.functions.SetDurability = {
name = "Définir durabilité",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter durability value for this tool here", itemTable:GetDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
function ITEM:GetDescription()
local maxDurability = self:GetMaxDurability()
local durability = self:GetDurability()
return self.description .. "\n\nDurabilité : " .. durability .. "/" .. maxDurability
end
function ITEM:OnInstanced(index, x, y, item)
self:SetData("durability", self:GetMaxDurability())
end
function ITEM:DamageDurability(amount)
self:SetData("durability", math.max(0, self:GetDurability() - 1))
if (self:GetDurability() == 0) then
self:OnBreak()
end
end
function ITEM:GetBreakSound()
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
end
function ITEM:OnBreak()
local breakSound = self:GetBreakSound()
if (IsValid(self.player)) then
self.player:EmitSound(breakSound, 65)
elseif (IsValid(self.entity)) then
self.entity:EmitSound(breakSound, 65)
end
self:Remove()
end
function ITEM:GetDurability()
return self:GetData("durability", self:GetMaxDurability())
end
function ITEM:GetMaxDurability()
return self:GetData("maxDurability", self.maxDurability)
end

View File

@@ -0,0 +1,154 @@
--[[
| 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/
--]]
ITEM.name = "Couteau de cuisine (aiguisé)"
ITEM.description = "Un couteau de cuisine aiguisé, comparé au couteau standard proposé par l'Union. Celui-ci n'est certainement pas autorisé."
ITEM.model = "models/weapons/tfa_nmrih/w_me_kitknife.mdl"
ITEM.class = "tfa_nmrih_kknife"
ITEM.isMelee = true
ITEM.baseDamage = 16
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "light"
ITEM.width = 1
ITEM.height = 2
ITEM.iconCam = {
pos = Vector(0.77, -5.3, 199.95),
ang = Angle(91.56, 278.2, 0),
fov = 1.73
}
ITEM.maxDurability = 9
ITEM.isTool = true
local color_green = Color(100, 255, 100)
local color_red = Color(200, 25, 25)
if (CLIENT) then
function ITEM:PaintOver(item, w, h)
if (item:GetData("equip")) then
surface.SetDrawColor(110, 255, 110, 100)
surface.DrawRect(w - 14, h - 20, 8, 8)
end
local maxDurability = item:GetMaxDurability()
local durability = item:GetDurability()
local width = w - 8
local cellWidth = math.Round(width / maxDurability)
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
surface.SetDrawColor(color)
for i = 0, durability - 1 do
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
end
end
end
ITEM.functions.SetMaxDurability = {
name = "Définir durabilité max",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter max durability value", itemTable:GetMaxDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0) then
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
ITEM.functions.SetDurability = {
name = "Définir durabilité",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter durability value for this tool here", itemTable:GetDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
function ITEM:GetDescription()
local maxDurability = self:GetMaxDurability()
local durability = self:GetDurability()
return self.description .. "\n\nDurabilité : " .. durability .. "/" .. maxDurability
end
function ITEM:OnInstanced(index, x, y, item)
self:SetData("durability", self:GetMaxDurability())
end
function ITEM:DamageDurability(amount)
self:SetData("durability", math.max(0, self:GetDurability() - 1))
if (self:GetDurability() == 0) then
self:OnBreak()
end
end
function ITEM:GetBreakSound()
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
end
function ITEM:OnBreak()
local breakSound = self:GetBreakSound()
if (IsValid(self.player)) then
self.player:EmitSound(breakSound, 65)
elseif (IsValid(self.entity)) then
self.entity:EmitSound(breakSound, 65)
end
self:Remove()
end
function ITEM:GetDurability()
return self:GetData("durability", self:GetMaxDurability())
end
function ITEM:GetMaxDurability()
return self:GetData("maxDurability", self.maxDurability)
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/
--]]
ITEM.name = "Tuyau de plomb"
ITEM.description = "Ce long tube cylindrique en métal lourd est fabriqué en plomb solide et résistant."
ITEM.model = "models/weapons/tfa_nmrih/w_me_pipe_lead.mdl"
ITEM.class = "tfa_nmrih_lpipe"
ITEM.baseDamage = 11
ITEM.isMelee = true
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "medium"
ITEM.width = 1
ITEM.height = 4
ITEM.iconCam = {
pos = Vector(-509.64, -427.61, 310.24),
ang = Angle(25, 400.02, 0),
fov = 0.53
}

View File

@@ -0,0 +1,154 @@
--[[
| 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/
--]]
ITEM.name = "Machette"
ITEM.description = "La machette est un outil de coupe emblématique, à la lame longue et tranchante. Sa présence dans l'inventaire évoque l'esprit de l'aventure et de la survie en terrain sauvage. Sa lame en acier brillant est striée de marques d'utilisation, témoignant de sa résistance et de sa capacité à s'attaquer aux tâches les plus ardues. "
ITEM.model = "models/weapons/tfa_nmrih/w_me_machete.mdl"
ITEM.class = "tfa_nmrih_machete"
ITEM.isMelee = true
ITEM.baseDamage = 13
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "medium"
ITEM.width = 1
ITEM.height = 4
ITEM.iconCam = {
pos = Vector(0, 200, 0),
ang = Angle(-0.01, 270.06, 0),
fov = 2.51
}
ITEM.maxDurability = 15
ITEM.isTool = true
local color_green = Color(100, 255, 100)
local color_red = Color(200, 25, 25)
if (CLIENT) then
function ITEM:PaintOver(item, w, h)
if (item:GetData("equip")) then
surface.SetDrawColor(110, 255, 110, 100)
surface.DrawRect(w - 14, h - 20, 8, 8)
end
local maxDurability = item:GetMaxDurability()
local durability = item:GetDurability()
local width = w - 8
local cellWidth = math.Round(width / maxDurability)
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
surface.SetDrawColor(color)
for i = 0, durability - 1 do
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
end
end
end
ITEM.functions.SetMaxDurability = {
name = "Définir durabilité max",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter max durability value", itemTable:GetMaxDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0) then
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
ITEM.functions.SetDurability = {
name = "Définir durabilité",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter durability value for this tool here", itemTable:GetDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
function ITEM:GetDescription()
local maxDurability = self:GetMaxDurability()
local durability = self:GetDurability()
return self.description .. "\n\nDurabilité : " .. durability .. "/" .. maxDurability
end
function ITEM:OnInstanced(index, x, y, item)
self:SetData("durability", self:GetMaxDurability())
end
function ITEM:DamageDurability(amount)
self:SetData("durability", math.max(0, self:GetDurability() - 1))
if (self:GetDurability() == 0) then
self:OnBreak()
end
end
function ITEM:GetBreakSound()
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
end
function ITEM:OnBreak()
local breakSound = self:GetBreakSound()
if (IsValid(self.player)) then
self.player:EmitSound(breakSound, 65)
elseif (IsValid(self.entity)) then
self.entity:EmitSound(breakSound, 65)
end
self:Remove()
end
function ITEM:GetDurability()
return self:GetData("durability", self:GetMaxDurability())
end
function ITEM:GetMaxDurability()
return self:GetData("maxDurability", self.maxDurability)
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/
--]]
ITEM.name = "Pioche"
ITEM.description = "Cet outil robuste est composé d'un manche en bois solide, prolongé par une tête en métal dotée de deux extrémités distinctes."
ITEM.model = "models/weapons/tfa_nmrih/w_me_pickaxe.mdl"
ITEM.class = "tfa_nmrih_pickaxe"
ITEM.isMelee = true
ITEM.baseDamage = 16
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "heavy"
ITEM.width = 1
ITEM.height = 4
ITEM.iconCam = {
pos = Vector(-509.64, -427.61, 310.24),
ang = Angle(24.57, 400.01, 0),
fov = 0.86
}

View File

@@ -0,0 +1,24 @@
--[[
| 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/
--]]
ITEM.name = "Bouclier anti-émeutes"
ITEM.description = "Un dispositif de protection solide et imposant conçu pour faire face aux situations de turbulence et de désordre."
ITEM.model = "models/weapons/tfa_mw2cr/riotshield/w_riotshield.mdl"
ITEM.class = "tfa_mw2cr_riotshield"
ITEM.isMelee = true
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "heavy"
ITEM.width = 2
ITEM.height = 4
ITEM.iconCam = {
pos = Vector(-509.64, -427.61, 310.24),
ang = Angle(24.57, 400.01, 0),
fov = 0.86
}

View File

@@ -0,0 +1,153 @@
--[[
| 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/
--]]
ITEM.name = "Masse"
ITEM.description = "La masse est un outil essentiel dans l'art ancestral de la forge. Fabriqué avec soin et précision, ce marteau présente une tête en métal lourd, souvent en acier, fixée solidement à un manche en bois ou en métal. Son poids et sa forme sont parfaitement équilibrés pour permettre des frappes puissantes et précises lors de la manipulation du métal chauffé à haute température. "
ITEM.model = "models/weapons/tfa_nmrih/w_me_sledge.mdl"
ITEM.class = "tfa_nmrih_sledge"
ITEM.isMelee = true
ITEM.baseDamage = 24
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "heavy"
ITEM.width = 1
ITEM.height = 4
ITEM.iconCam = {
pos = Vector(-509.64, -427.61, 310.24),
ang = Angle(24.76, 400, 0),
fov = 0.77
}
ITEM.maxDurability = 50
ITEM.isTool = true
local color_green = Color(100, 255, 100)
local color_red = Color(200, 25, 25)
if (CLIENT) then
function ITEM:PaintOver(item, w, h)
if (item:GetData("equip")) then
surface.SetDrawColor(110, 255, 110, 100)
surface.DrawRect(w - 14, h - 20, 8, 8)
end
local maxDurability = item:GetMaxDurability()
local durability = item:GetDurability()
local width = w - 8
local cellWidth = math.Round(width / maxDurability)
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
surface.SetDrawColor(color)
for i = 0, durability - 1 do
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
end
end
end
ITEM.functions.SetMaxDurability = {
name = "Définir durabilité max",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter max durability value", itemTable:GetMaxDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0) then
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
ITEM.functions.SetDurability = {
name = "Définir durabilité",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter durability value for this tool here", itemTable:GetDurability(), function(text)
local amount = tonumber(text)
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
else
client:Notify("Invalid number")
end
end)
end,
OnRun = function(itemTable)
return false
end,
OnCanRun = function(itemTable)
if (IsValid(itemTable.entity)) then
return false
end
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
return false
end
return true
end
}
function ITEM:GetDescription()
local maxDurability = self:GetMaxDurability()
local durability = self:GetDurability()
return self.description .. "\n\nDurabilité : " .. durability .. "/" .. maxDurability
end
function ITEM:OnInstanced(index, x, y, item)
self:SetData("durability", self:GetMaxDurability())
end
function ITEM:DamageDurability(amount)
self:SetData("durability", math.max(0, self:GetDurability() - 1))
if (self:GetDurability() == 0) then
self:OnBreak()
end
end
function ITEM:GetBreakSound()
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
end
function ITEM:OnBreak()
local breakSound = self:GetBreakSound()
if (IsValid(self.player)) then
self.player:EmitSound(breakSound, 65)
elseif (IsValid(self.entity)) then
self.entity:EmitSound(breakSound, 65)
end
self:Remove()
end
function ITEM:GetDurability()
return self:GetData("durability", self:GetMaxDurability())
end
function ITEM:GetMaxDurability()
return self:GetData("maxDurability", self.maxDurability)
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/
--]]
ITEM.name = "Pelle"
ITEM.description = "Cet outil indispensable est composé d'un manche en bois solide et d'une tête en métal tranchante et incurvée."
ITEM.model = "models/weapons/tfa_nmrih/w_me_spade.mdl"
ITEM.class = "tfa_nmrih_spade"
ITEM.isMelee = true
ITEM.baseDamage = 10
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "medium"
ITEM.width = 1
ITEM.height = 4
ITEM.iconCam = {
pos = Vector(0, -200, 0),
ang = Angle(-0.66, 449.91, 0),
fov = 3.36
}

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/
--]]
ITEM.name = "Clé Anglaise"
ITEM.description = "Un outil qui se compose d'une poignée solide et d'une mâchoire ajustable qui peut être fixée à différentes tailles de pièces."
ITEM.model = "models/weapons/tfa_nmrih/w_me_wrench.mdl"
ITEM.class = "tfa_nmrih_wrench"
ITEM.isMelee = true
ITEM.baseDamage = 11
ITEM.weaponCategory = "melee"
ITEM.balanceCat = "light"
ITEM.width = 1
ITEM.height = 3
ITEM.iconCam = {
pos = Vector(-509.64, -427.61, 310.24),
ang = Angle(24.64, 400.03, 0),
fov = 0.38
}

View File

@@ -0,0 +1,20 @@
--[[
| 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/
--]]
ITEM.name = "Grenade Flash"
ITEM.description = "Un dispositif explosif conçu pour désorienter temporairement les ennemis avec une puissante explosion de lumière et de bruit. "
ITEM.model = "models/weapons/w_eq_flashbang_dropped.mdl"
ITEM.class = "tfa_csgo_flash"
ITEM.grenadeEntityClass = "tfa_csgo_thrownflash"
ITEM.weaponCategory = "grenade"
ITEM.isGrenade = true
ITEM.width = 1
ITEM.height = 1

Some files were not shown because too many files have changed in this diff Show More