diff options
| author | Scott <scotth0828@gmail.com> | 2016-04-30 20:31:37 -0400 |
|---|---|---|
| committer | Scott <scotth0828@gmail.com> | 2016-04-30 20:31:37 -0400 |
| commit | e8fc8b5bf824ed3283dede946e66f5fd843d54ff (patch) | |
| tree | cf935647c5c5ae0c44b30e8a1256df7799c41a5a /ftp_gmstranded/entities | |
| parent | 6f6cce0561c19e7af14bcc6e6b1c7de2d5efc530 (diff) | |
| download | gmstranded-e8fc8b5bf824ed3283dede946e66f5fd843d54ff.tar.gz gmstranded-e8fc8b5bf824ed3283dede946e66f5fd843d54ff.tar.bz2 gmstranded-e8fc8b5bf824ed3283dede946e66f5fd843d54ff.zip | |
Some changes
Diffstat (limited to 'ftp_gmstranded/entities')
182 files changed, 13814 insertions, 0 deletions
diff --git a/ftp_gmstranded/entities/effects/gms_loot_effect.lua b/ftp_gmstranded/entities/effects/gms_loot_effect.lua new file mode 100644 index 0000000..0b8d1ef --- /dev/null +++ b/ftp_gmstranded/entities/effects/gms_loot_effect.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +function EFFECT:Init( data ) + local pos = data:GetOrigin() + local NumParticles = 8 + local emitter = ParticleEmitter( pos, true ) + local color = Color( 255, 255, 100, 255 ) + + for i = 0, NumParticles do + local offset = Vector( math.random( -16, 16 ), math.random( -16, 16 ), 0 ) + local particle = emitter:Add( "particle/fire", pos + offset ) + if ( particle ) then + particle:SetLifeTime( 0 ) + particle:SetDieTime( 3 ) + + particle:SetGravity( Vector( 0, 0, 32 ) ) + particle:SetVelocity( Vector( math.random( -16, 16 ), math.random( -16, 16 ), 0 ) ) + + particle:SetStartSize( math.Rand( 3, 6 ) ) + particle:SetEndSize( 0 ) + + particle:SetRoll( math.Rand( 0, 360 ) ) + particle:SetRollDelta( math.Rand( -4, 4 ) ) + + local RandDarkness = math.Rand( 0, 0.5 ) + particle:SetColor( color.r * RandDarkness, color.g * RandDarkness, color.b * RandDarkness ) + particle:SetAngleVelocity( Angle( math.Rand( -180, 180 ), math.Rand( -180, 180 ), math.Rand( -180, 180 ) ) ) + //particle:SetLighting( true ) + end + end + + emitter:Finish() +end + +function EFFECT:Think() + return false +end + +function EFFECT:Render() +end diff --git a/ftp_gmstranded/entities/effects/m9k_effect_mad_penetration_trace/init.lua b/ftp_gmstranded/entities/effects/m9k_effect_mad_penetration_trace/init.lua new file mode 100644 index 0000000..24a23e8 --- /dev/null +++ b/ftp_gmstranded/entities/effects/m9k_effect_mad_penetration_trace/init.lua @@ -0,0 +1,45 @@ +EFFECT.Mat = Material( "effects/spark" ) + +/*--------------------------------------------------------- + EFFECT:Init(data) +---------------------------------------------------------*/ +function EFFECT:Init(data) + + self.StartPos = data:GetStart() + self.EndPos = data:GetOrigin() + self.Dir = self.EndPos - self.StartPos + self.Entity:SetRenderBoundsWS(self.StartPos, self.EndPos) + + self.TracerTime = 0.4 + + // Die when it reaches its target + self.DieTime = CurTime() + self.TracerTime + +end + +/*--------------------------------------------------------- + THINK +---------------------------------------------------------*/ +function EFFECT:Think() + + if (CurTime() > self.DieTime) then return false end + + return true +end + +/*--------------------------------------------------------- + Draw the effect +---------------------------------------------------------*/ +function EFFECT:Render() + + local fDelta = (self.DieTime - CurTime()) / self.TracerTime + fDelta = math.Clamp(fDelta, 0, 1) + + render.SetMaterial(self.Mat) + + local sinWave = math.sin(fDelta * math.pi) + + local color = Color(255, 255, 255, 255 * fDelta) + + render.DrawBeam(self.StartPos, self.EndPos, 8 * fDelta, 1, 0, color) +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/effects/m9k_effect_mad_ricochet_trace/init.lua b/ftp_gmstranded/entities/effects/m9k_effect_mad_ricochet_trace/init.lua new file mode 100644 index 0000000..1a9ebaf --- /dev/null +++ b/ftp_gmstranded/entities/effects/m9k_effect_mad_ricochet_trace/init.lua @@ -0,0 +1,100 @@ +EFFECT.Mat = Material("effects/yellowflare") + +/*--------------------------------------------------------- + EFFECT:Init(data) +---------------------------------------------------------*/ +function EFFECT:Init(data) + + self.StartPos = data:GetStart() + self.EndPos = data:GetOrigin() + self.Dir = self.EndPos - self.StartPos + self.Entity:SetRenderBoundsWS(self.StartPos, self.EndPos) + + self.TracerTime = 0.4 + + // Die when it reaches its target + self.DieTime = CurTime() + self.TracerTime + + // Play ricochet sound with random pitch + + local vGrav = Vector(0, 0, -450) + local Dir = self.Dir:GetNormalized() + + local emitter = ParticleEmitter(self.StartPos) + + for i = 1, 10 do + + local particle = emitter:Add("effects/yellowflare", self.StartPos) + + particle:SetVelocity((Dir + VectorRand() * 0.5) * math.Rand(50, 150)) + particle:SetDieTime(math.Rand(0.5, 2)) + particle:SetStartAlpha(255) + particle:SetStartSize(math.Rand(2, 4)) + particle:SetEndSize(0) + particle:SetRoll(0) + particle:SetGravity(vGrav * 0.4) + particle:SetCollide(true) + particle:SetBounce(0.8) + particle:SetAirResistance(50) + particle:SetStartLength(0.2) + particle:SetEndLength(0) + particle:SetVelocityScale(true) + particle:SetCollide(true) + end + + local particle = emitter:Add("effects/yellowflare", self.StartPos) + + particle:SetDieTime(0.1) + particle:SetStartAlpha(255) + particle:SetStartSize(128) + particle:SetEndSize(0) + particle:SetRoll(math.Rand(0, 360)) + + local particle = emitter:Add("effects/yellowflare", self.StartPos) + + particle:SetDieTime(0.4) + particle:SetStartAlpha(255) + particle:SetStartSize(32) + particle:SetEndSize(0) + particle:SetRoll(math.Rand(0, 360)) + + emitter:Finish() + + local dlight = DynamicLight(0) + if (dlight) then + dlight.Pos = self.StartPos + dlight.r = 255 + dlight.g = 255 + dlight.b = 255 + dlight.Brightness = 4 + dlight.size = 64 + dlight.DieTime = CurTime() + 0.1 + end +end + +/*--------------------------------------------------------- + THINK +---------------------------------------------------------*/ +function EFFECT:Think() + + if (CurTime() > self.DieTime) then return false end + + return true +end + +/*--------------------------------------------------------- + Draw the effect +---------------------------------------------------------*/ +function EFFECT:Render() + + local fDelta = (self.DieTime - CurTime()) / self.TracerTime + fDelta = math.Clamp(fDelta, 0, 1) + + render.SetMaterial(self.Mat) + + local sinWave = math.sin(fDelta * math.pi) + + local color = Color(255, 255, 255, 255 * fDelta) + + render.DrawBeam(self.StartPos, self.EndPos, 8 * fDelta, 0.5, 0.5, color) +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/effects/m9k_rg_muzzle_rifle/init.lua b/ftp_gmstranded/entities/effects/m9k_rg_muzzle_rifle/init.lua new file mode 100644 index 0000000..2b9b210 --- /dev/null +++ b/ftp_gmstranded/entities/effects/m9k_rg_muzzle_rifle/init.lua @@ -0,0 +1,117 @@ +function EFFECT:Init(data) + + if not IsValid(data:GetEntity()) then return end + if not IsValid(data:GetEntity():GetOwner()) then return end + self.WeaponEnt = data:GetEntity() + self.Attachment = data:GetAttachment() + + if self.WeaponEnt == nil or self.WeaponEnt:GetOwner() == nil or self.WeaponEnt:GetOwner():GetVelocity() == nil then + return + else + + self.Position = self:GetTracerShootPos(data:GetOrigin(), self.WeaponEnt, self.Attachment) + self.Forward = data:GetNormal() + self.Angle = self.Forward:Angle() + self.Right = self.Angle:Right() + + local AddVel = self.WeaponEnt:GetOwner():GetVelocity() + + local emitter = ParticleEmitter(self.Position) + if emitter != nil then + local particle = emitter:Add( "sprites/heatwave", self.Position - self.Forward * 4 ) + if particle != nil then + + particle:SetVelocity( 80 * self.Forward + 20 * VectorRand() + 1.05 * AddVel ) + particle:SetGravity( Vector( 0, 0, 100 ) ) + particle:SetAirResistance( 160 ) + + particle:SetDieTime( math.Rand( 0.2, 0.25 ) ) + + particle:SetStartSize( math.random( 25, 40 ) ) + particle:SetEndSize( 10 ) + + particle:SetRoll( math.Rand( 180, 480 ) ) + particle:SetRollDelta( math.Rand( -1, 1 ) ) + + for i = 1,4 do + local particle = emitter:Add( "particle/particle_smokegrenade", self.Position ) + + particle:SetVelocity( 120 * i * self.Forward + 8 * VectorRand() + AddVel ) + particle:SetAirResistance( 400 ) + particle:SetGravity( Vector(0, 0, math.Rand(100, 200) ) ) + + particle:SetDieTime( math.Rand( 0.5, 1.0 ) ) + + particle:SetStartAlpha( math.Rand( 25, 70 ) ) + particle:SetEndAlpha( 0 ) + + particle:SetStartSize( math.Rand( 3, 7 ) ) + particle:SetEndSize( math.Rand( 20, 50 ) ) + + particle:SetRoll( math.Rand( -25, 25 ) ) + particle:SetRollDelta( math.Rand( -0.05, 0.05 ) ) + + particle:SetColor( 120, 120, 120 ) + end + + if math.random( 1, 2 ) == 1 then + + for j = 1,2 do + + for i = -1,1,2 do + + local particle = emitter:Add( "effects/muzzleflash"..math.random( 1, 4 ), self.Position - 3 * self.Forward + 2 * j * i * self.Right) + + particle:SetVelocity( 60 * j * i * self.Right + AddVel ) + particle:SetGravity( AddVel ) + + particle:SetDieTime( 0.1 ) + + particle:SetStartAlpha( 150 ) + + particle:SetStartSize( j ) + particle:SetEndSize( 4 * j ) + + particle:SetRoll( math.Rand( 180, 480 ) ) + particle:SetRollDelta( math.Rand( -1, 1 ) ) + + particle:SetColor( 255, 255, 255 ) + end + end + + for i = 1,2 do + + local particle = emitter:Add( "effects/muzzleflash"..math.random( 1, 4 ), self.Position + 8 * self.Forward ) + + particle:SetVelocity( 350 * self.Forward + 1.1 * AddVel ) + particle:SetAirResistance( 160 ) + + particle:SetDieTime( 0.1 ) + + particle:SetStartAlpha( 160 ) + particle:SetEndAlpha( 0 ) + + particle:SetStartSize( 6 * i ) + particle:SetEndSize( 5 * i ) + + particle:SetRoll( math.Rand( 180, 480 ) ) + particle:SetRollDelta( math.Rand( -1, 1) ) + + particle:SetColor( 255, 255, 255 ) + end + end + end + emitter:Finish() + end + end +end + + +function EFFECT:Think() + + return false +end + + +function EFFECT:Render() +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/entities/gms_advancedtransmutator.lua b/ftp_gmstranded/entities/entities/gms_advancedtransmutator.lua new file mode 100644 index 0000000..c939201 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_advancedtransmutator.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Advanced Transmutator" + +ENT.Model = "models/props_wasteland/kitchen_fridge001a.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_advancedtransmutator" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_antlionbarrow.lua b/ftp_gmstranded/entities/entities/gms_antlionbarrow.lua new file mode 100644 index 0000000..9c6000d --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_antlionbarrow.lua @@ -0,0 +1,101 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Antlion Barrow" + +ENT.Model = "models/props_wasteland/antlionhill.mdl" +ENT.DoWake = true + +if ( CLIENT ) then return end + +function ENT:OnInitialize() + self:SetNetworkedString( "Owner", "World" ) + + self:SetMoveType( MOVETYPE_NONE ) + + self.Antlions = {} + self.MaxAntlions = 5 + self.Spawning = false + + timer.Create( "CheckSurroundings_" .. self:EntIndex(), 2, 0, function() self:CheckSurroundings() end ) +end + +function ENT:SpawnAntlion() + local offset = Vector( math.random( -500, 500 ), math.random( -500, 500 ), 100 ) + local retries = 100 + + while ( ( !util.IsInWorld( offset ) && retries > 0 ) || self:LocalToWorld( offset ):Distance( self:GetPos() ) < 100 ) do + offset = Vector( math.random( -500, 500 ), math.random( -500, 500 ), 100 ) + retries = retries - 1 + end + + local tr = util.TraceLine( { + start = self:GetPos() + offset, + endpos = self:GetPos() + offset + Vector( 0, 0, -10000 ), + mask = MASK_SOLID, + filter = self + } ) + + local ant = ents.Create( "npc_antlion" ) + ant:SetPos( tr.HitPos + Vector( 0, 0, 16 ) ) + ant:SetNWString( "Owner", "World" ) + ant:SetKeyValue( "startburrowed", "1" ) + ant:Spawn() + ant:SetHealth( 75 ) + ant:Fire( "Unburrow" ) + + table.insert( self.Antlions, ant ) +end + +function ENT:CheckSurroundings() + local max = self.MaxAntlions + if ( IsNight ) then max = math.ceil( max * 1.4 ) end + + for k, v in pairs( self.Antlions ) do + if ( !IsValid( v ) or ( !IsNight && #self.Antlions > max ) ) then + if ( IsValid( v ) ) then v:Fire( "BurrowAway" ) end + table.remove( self.Antlions, k ) + elseif ( v:WaterLevel() > 2 ) then + timer.Simple( 8, function() if ( IsValid( v ) ) then v:SetHealth( 0 ) end end) + table.remove( self.Antlions, k ) + else + local enemy = v:GetEnemy() + if ( ( IsValid( enemy ) && enemy:GetPos():Distance( self:GetPos() ) > 1500 ) or v:GetPos():Distance( self:GetPos() ) > 1500 ) then + v:SetEnemy( nil ) + v:ClearEnemyMemory() + local pos = self:GetPos() + Vector( math.random( -500, 500 ), math.random( -500, 500 ), 0 ) + while ( self:LocalToWorld( pos ):Distance( self:GetPos() ) < 100 ) do + pos = self:GetPos() + Vector( math.random( -500, 500 ), math.random( -500, 500 ), 0 ) + end + v:SetLastPosition( pos ) + v:SetSchedule( 71 ) + end + end + end + + if ( #self.Antlions < max and !self.Spawning ) then + timer.Create( "gms_antlionspawntimers_" .. self:EntIndex(), math.random( 20, 60 ), 1, function() self:AddAntlion() end) + self.Spawning = true + end +end + +function ENT:AddAntlion() + self:SpawnAntlion() + self.Spawning = false +end + +function ENT:KeyValue( k, v ) + if ( k == "MaxAntlions" ) then + self.MaxAntlions = tonumber( v ) or 5 + end +end + +function ENT:OnRemove() + for k, ant in pairs( self.Antlions ) do + if ( IsValid( ant ) ) then ant:Fadeout() end + end + + timer.Destroy( "CheckSurroundings_" .. self:EntIndex() ) + timer.Destroy( "gms_antlionspawntimers_" .. self:EntIndex() ) +end diff --git a/ftp_gmstranded/entities/entities/gms_base_entity.lua b/ftp_gmstranded/entities/entities/gms_base_entity.lua new file mode 100644 index 0000000..074633e --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_base_entity.lua @@ -0,0 +1,54 @@ + +AddCSLuaFile() + +ENT.Type = "anim" +ENT.Base = "base_gmodentity" + +ENT.PrintName = "GMS Base Entity" +ENT.Author = "Stranded Team" +ENT.Spawnable = false + +ENT.Model = "models/props/de_inferno/ClayOven.mdl" + +function ENT:Initialize() + if ( SERVER ) then + self:SetModel( self.Model ) + self:PhysicsInit( SOLID_VPHYSICS ) + self:SetMoveType( MOVETYPE_VPHYSICS ) + self:SetSolid( SOLID_VPHYSICS ) + + if ( self.Color ) then self:SetColor( self.Color ) end + if ( self.DoWake ) then self:Wake() end + if ( self.DoFreeze ) then self:DoFreeze() end + end + + self:OnInitialize() +end + +function ENT:OnInitialize() +end + +if ( CLIENT ) then return end + +function ENT:Use( ply ) + if ( !ply:KeyPressed( IN_USE ) ) then return end + if ( !SPropProtection.PlayerCanTouch( ply, self ) && GetConVarNumber( "spp_use" ) >= 1 ) then return end + self:OnUse( ply ) +end + +function ENT:Wake() + local phys = self:GetPhysicsObject() + if ( IsValid( phys ) ) then phys:Wake() end +end + +function ENT:Freeze() + local phys = self:GetPhysicsObject() + if ( IsValid( phys ) ) then phys:EnableMotion( false ) end +end + +function ENT:OnTakeDamage( dmg ) + self:TakePhysicsDamage( dmg ) +end + +function ENT:OnUse( ply ) +end diff --git a/ftp_gmstranded/entities/entities/gms_buildsite.lua b/ftp_gmstranded/entities/entities/gms_buildsite.lua new file mode 100644 index 0000000..5fb4698 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_buildsite.lua @@ -0,0 +1,117 @@ + +AddCSLuaFile() + +ENT.Type = "anim" +ENT.Base = "gms_base_entity" +ENT.PrintName = "Buildsite" +ENT.Purpose = "To build." +ENT.Instructions = "Press use to add resources." + +ENT.Model = "" +ENT.Color = Color( 90, 167, 243, 255 ) + +if ( CLIENT ) then return end + +function ENT:OnInitialize() + self:DropToFloor() + self:SetMoveType( MOVETYPE_NONE ) + self:SetCollisionGroup( COLLISION_GROUP_WEAPON ) + self:SetMaterial( "models/wireframe" ) + self.LastUsed = CurTime() +end + +function ENT:AddResource( res, int ) + self.Costs[ res ] = self.Costs[ res ] - int + if ( self.Costs[ res ] <= 0 ) then self.Costs[ res ] = nil end + + local str = ":" + for k, v in pairs( self.Costs ) do + str = str .. "\n" .. string.Replace( k, "_", " " ) .. " ( " .. v .. "x )" + end + self:SetNetworkedString( "Resources", str ) +end + +function ENT:Setup( model, class ) + self:SetModel( model ) + self.ResultClass = class + + self:PhysicsInit( SOLID_VPHYSICS ) + self:SetMoveType( MOVETYPE_VPHYSICS ) + self:SetSolid( SOLID_VPHYSICS ) + + local phys = self:GetPhysicsObject() + if ( phys != NULL && phys ) then phys:EnableMotion( false ) end +end + +function ENT:Finish() + if ( self.ResultClass ) then + local ent = ents.Create( self.ResultClass ) + if ( self.NormalProp == true ) then ent.NormalProp = true end + ent:SetPos( self:GetPos() ) + ent:SetAngles( self:GetAngles() ) + ent:SetModel( self:GetModel() ) + ent.Player = self.Player + ent:SetNWString( "Name", self.Name ) + ent:Spawn() + + local owner = ent.Player + if ( !IsValid( owner ) ) then + owner = Entity( self:GetNWInt( "OwnerID" ) ) + if ( IsValid( owner ) && self:GetNWString( "Owner" ) != owner:Nick() ) then owner = NULL end + end + if ( !IsValid( owner ) ) then owner = self.OwnerTable end + SPropProtection.PlayerMakePropOwner( owner, ent ) + + ent:Fadein() + end + + if ( IsValid( self ) ) then + if ( IsValid( self.Player ) ) then self.Player.HasBuildingSite = false end + self:Remove() + end +end + +function ENT:OnUse( ply ) + if ( CurTime() - self.LastUsed < 0.5 ) then return end + self.LastUsed = CurTime() + + -- Prevent fools from trapping other players inside just-built structures/props + for id, ply in pairs( player.GetAll() ) do + local mindist = self:OBBMaxs() - self:OBBMins() + mindist = ( mindist.x + mindist.y + mindist.z ) / 3 + + if ( ply:GetPos():Distance( self:LocalToWorld( self:OBBCenter() ) ) < mindist ) then + ply:SendMessage( "Too close to other players!", 3, Color( 200, 10, 10, 255 ) ) + return + end + end + + if ( self.Costs ) then + for k, v in pairs( self.Costs ) do + if ( ply:GetResource( k ) >= 0 ) then + if ( ply:GetResource( k ) < v ) then + self:AddResource( k, ply:GetResource( k ) ) + ply:DecResource( k, ply:GetResource( k ) ) + else + self:AddResource( k, v ) + ply:DecResource( k, v ) + end + end + end + + if ( table.Count( self.Costs ) > 0 ) then + local str = "You need:" + for k, v in pairs( self.Costs ) do + str = str .. " " .. string.Replace( k, "_", " " ) .. " ( " .. v .. "x )" + end + str = str .. " to finish." + ply:SendMessage( str, 5, Color( 255, 255, 255, 255 ) ) + else + self:Finish() + ply:SendMessage( "Finished!", 3, Color( 10, 200, 10, 255 ) ) + end + else + self:Finish() + ply:SendMessage( "Finished!", 3, Color( 10, 200, 10, 255 ) ) + end +end diff --git a/ftp_gmstranded/entities/entities/gms_clock_big.lua b/ftp_gmstranded/entities/entities/gms_clock_big.lua new file mode 100644 index 0000000..4fe66e2 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_clock_big.lua @@ -0,0 +1,71 @@ + +AddCSLuaFile() + +ENT.Type = "anim" +ENT.Base = "base_anim" + +ENT.PrintName = "Clock" +ENT.Category = "Robotboy655's Entities" + +ENT.Spawnable = true + +function ENT:Initialize() + if ( CLIENT ) then return end + self:SetModel( "models/props_trainstation/trainstation_clock001.mdl" ) + self:PhysicsInit( SOLID_VPHYSICS ) + self:SetMoveType( MOVETYPE_VPHYSICS ) + self:SetSolid( SOLID_VPHYSICS ) +end + +function ENT:SpawnFunction( ply, tr ) + if ( !tr.Hit ) then return end + + local ent = ents.Create( ClassName ) + ent:SetPos( tr.HitPos + tr.HitNormal * 2 ) + ent:Spawn() + ent:Activate() + + local phys = ent:GetPhysicsObject() + if ( IsValid( phys ) ) then phys:Wake() end + + return ent +end + +if ( SERVER ) then return end + +surface.CreateFont( "Default_Clock", { + font="Tahoma", + size = 70, + weight = 800 +} ) + +function ENT:Draw() + + self:DrawModel() + + local ang = self:GetAngles() + + ang:RotateAroundAxis( ang:Right(), -90 ) + ang:RotateAroundAxis( ang:Up(), 90 ) + + local pos = self:GetPos() + self:GetRight() * 15.5 + self:GetUp() * 15.5 + self:GetForward() * -0.9 + + local hours = os.date( "%M", Time ) + local mins = os.date( "%S", Time ) + + cam.Start3D2D( pos, ang, 0.0604 ) + + draw.RoundedBox( 4, 100, 350, 305, 105, Color( 0, 0, 0, 255 ) ) + draw.SimpleText( hours .. ":" .. mins, "Default_Clock", 250, 400, Color( 255, 255, 255, 255 ) , 1, 1 ) + + surface.SetDrawColor( Color( 0, 0, 0, 255 ) ) + + -- Trigonometry, bitch + mins = ( mins - 15 ) / 30 * math.pi + hours = ( hours - 3 ) / 6 * math.pi + surface.DrawLine( 256, 256, 256 + math.cos( mins ) * 350, 256 + math.sin( mins ) * 350 ) + surface.DrawLine( 256, 256, 256 + math.cos( hours ) * 250, 256 + math.sin( hours ) * 250 ) + + cam.End3D2D() + +end diff --git a/ftp_gmstranded/entities/entities/gms_copperfurnace.lua b/ftp_gmstranded/entities/entities/gms_copperfurnace.lua new file mode 100644 index 0000000..1aaa970 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_copperfurnace.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Copper Furnace" + +ENT.Model = "models/props/cs_militia/furnace01.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_copperfurnace" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_copperworkbench.lua b/ftp_gmstranded/entities/entities/gms_copperworkbench.lua new file mode 100644 index 0000000..ab6e8c4 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_copperworkbench.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Copper Workbench" + +ENT.Model = "models/props_combine/breendesk.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_copperworkbench" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_factory.lua b/ftp_gmstranded/entities/entities/gms_factory.lua new file mode 100644 index 0000000..7de9677 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_factory.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Factory" + +ENT.Model = "models/props_c17/factorymachine01.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_factory" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_food.lua b/ftp_gmstranded/entities/entities/gms_food.lua new file mode 100644 index 0000000..2ad1297 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_food.lua @@ -0,0 +1,99 @@ + +AddCSLuaFile() + +ENT.Type = "anim" +ENT.Base = "gms_base_entity" +ENT.PrintName = "Food" +ENT.Purpose = "To eat." +ENT.Instructions = "Press use to eat." + +ENT.Model = "models/props_c17/metalpot002a.mdl" + +if ( CLIENT ) then + +local PendingFoodDrops = PendingFoodDrops or {} + +usermessage.Hook( "gms_SetFoodDropInfo", function( um ) + local index = um:ReadString() + local type = um:ReadString() + local ent = ents.GetByIndex( index ) + + if ( ent == NULL or !ent ) then + local tbl = {} + tbl.Type = type + tbl.Index = index + table.insert( PendingFoodDrops, tbl ) + + //error("This happened: PendingFoodDrops") + else + ent.Food = type + end +end ) + +hook.Add( "Think", "gms_CheckForPendingFoodDrops", function() + for k, tbl in pairs( PendingFoodDrops ) do + local ent = ents.GetByIndex( tbl.Index ) + if ( ent != NULL ) then + ent.Food = tbl.Type + table.remove( PendingFoodDrops, k ) + end + end +end ) + +if ( !GMS ) then return end + +local texLogo = surface.GetTextureID("vgui/modicon") +function ENT:OnInitialize() + self.AddAngle = Angle( 0, 0, 90 ) + self.FoodIcons = {} + for k, v in pairs( GMS.Combinations[ "Cooking" ] ) do + if ( v.Texture ) then self.FoodIcons[ k ] = surface.GetTextureID( v.Texture ) end + end +end + + +function ENT:Draw() + self:DrawModel() + + local food = self.Food or "Loading..." + local tex = self.FoodIcons[ string.gsub( food, " ", "_" ) ] or texLogo + + cam.Start3D2D( self:GetPos() + Vector( 0, 0, 20 ), self.AddAngle, 0.01 ) + surface.SetDrawColor( Color( 255, 255, 255, 255 ) ) + surface.SetTexture( tex ) + surface.DrawTexturedRect( -500, -500, 1000, 1000 ) + cam.End3D2D() + + cam.Start3D2D( self:GetPos() + Vector( 0, 0, 20 ), self.AddAngle + Angle( 0, 180, 0 ), 0.01 ) + surface.SetDrawColor( Color( 255, 255, 255, 255 ) ) + surface.SetTexture( tex ) + surface.DrawTexturedRect( -500, -500, 1000, 1000 ) + cam.End3D2D() + + cam.Start3D2D( self:GetPos() + Vector( 0, 0, 25 ), self.AddAngle, 0.2) + draw.SimpleText( food, "ScoreboardText", 0, 0, Color( 255, 255, 255, 255 ), 1, 1 ) + cam.End3D2D() + + cam.Start3D2D(self:GetPos() + Vector( 0, 0, 25 ), self.AddAngle + Angle( 0, 180, 0 ), 0.2 ) + draw.SimpleText( food, "ScoreboardText", 0, 0, Color( 255, 255, 255, 255 ), 1, 1 ) + cam.End3D2D() +end + +function ENT:Think() + self.AddAngle = self.AddAngle + Angle( 0, 2, 0 ) +end + +return end + +function ENT:OnInitialize() + self.Food = "Food" +end + +function ENT:StartTouch( ent ) + if ( ent:GetClass() == "gms_resourcedrop" ) then + big_gms_combineresourcepack( self, ent ) + end + if ( ent:GetClass() == "gms_buildsite" ) then + gms_addbuildsiteresourcePack( self, ent ) + end +end diff --git a/ftp_gmstranded/entities/entities/gms_fridge.lua b/ftp_gmstranded/entities/entities/gms_fridge.lua new file mode 100644 index 0000000..14bf3d1 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_fridge.lua @@ -0,0 +1,22 @@ + +AddCSLuaFile() + +ENT.Type = "anim" +ENT.Base = "gms_base_entity" +ENT.PrintName = "Fridge" +ENT.Purpose = "To store food." +ENT.Instructions = "Press use to open food menu." + +ENT.Model = "models/props_c17/FurnitureFridge001a.mdl" + +function ENT:OnInitialize() + self.Resources = {} +end + +if ( CLIENT ) then return end + +function ENT:StartTouch( ent ) + if ( ent:GetClass() == "gms_food" ) then + big_gms_combinefood( self, ent ) + end +end diff --git a/ftp_gmstranded/entities/entities/gms_goldfurnace.lua b/ftp_gmstranded/entities/entities/gms_goldfurnace.lua new file mode 100644 index 0000000..1302d67 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_goldfurnace.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Gold Furnace" + +ENT.Model = "models/props_industrial/oil_storage.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_goldfurnace" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_goldworkbench.lua b/ftp_gmstranded/entities/entities/gms_goldworkbench.lua new file mode 100644 index 0000000..647bc69 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_goldworkbench.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Gold Workbench" + +ENT.Model = "models/props/cs_office/file_cabinet1.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_goldworkbench" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_gravestone.lua b/ftp_gmstranded/entities/entities/gms_gravestone.lua new file mode 100644 index 0000000..267d165 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_gravestone.lua @@ -0,0 +1,88 @@ + +AddCSLuaFile() + +ENT.Type = "anim" +ENT.Base = "gms_base_entity" +ENT.PrintName = "GraveStone" +ENT.Purpose = "Store items on death" +ENT.Instructions = "Press e to get back your items." + +ENT.Model = "models/props_c17/gravestone004a.mdl" + +ENT.deathResources = {} +ENT.deathWeapons = {} + +function ENT:SetupDataTables() + + self:NetworkVar( "String", 0, "plName" ) + +end + +function ENT:OnInitialize() + local phys = self:GetPhysicsObject() + if (phys:IsValid()) then phys:EnableMotion(false) end +end + + + +if ( CLIENT ) then + + surface.CreateFont( "GraveFont", { + font = "Arial", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name + size = 80, + weight = 500, + blursize = 0, + scanlines = 0, + antialias = true, + underline = false, + italic = false, + strikeout = false, + symbol = false, + rotary = false, + shadow = false, + additive = false, + outline = true, +} ) + + + + function ENT:Draw() + + self:DrawModel() + + local angles = self:GetAngles(); + local position = self:GetPos(); + local offset = angles:Up() * 8 + angles:Forward() * -5 + angles:Right() * - 8; + + angles:RotateAroundAxis(angles:Forward(), 180); + angles:RotateAroundAxis(angles:Right(), 90); + angles:RotateAroundAxis(angles:Up(), 90); + + local plName = self:GetplName() + + cam.Start3D2D(position + offset, angles, 0.1); + + draw.SimpleText(plName, "GraveFont", 80.5, 46, Color(255, 255, 255, 255), 1, 1); + + cam.End3D2D(); + end + +end + + +function ENT:Use( ply ) + table.sort(self.deathWeapons) + table.sort(self.deathResources) + ply:CancelProcess() + ply:DeathMenu(self.deathResources, self.deathWeapons) +end + +if ( SERVER ) then + +function ENT:Think() + if (table.Count(self.deathWeapons) == 0 and table.Count(self.deathResources) == 0) then + self:Remove() + end +end + +end diff --git a/ftp_gmstranded/entities/entities/gms_grindingstone.lua b/ftp_gmstranded/entities/entities/gms_grindingstone.lua new file mode 100644 index 0000000..0e394d6 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_grindingstone.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Grinding Stone" + +ENT.Model = "models/props_combine/combine_mine01.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_grindingstone" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_gunchunks.lua b/ftp_gmstranded/entities/entities/gms_gunchunks.lua new file mode 100644 index 0000000..3218bc0 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_gunchunks.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Gun Chunks" + +ENT.Model = "models/Gibs/airboat_broken_engine.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_gunchunks" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_hightechgunlab.lua b/ftp_gmstranded/entities/entities/gms_hightechgunlab.lua new file mode 100644 index 0000000..bd5f8c2 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_hightechgunlab.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "High Tech Gun Lab" + +ENT.Model = "models/props_wasteland/laundry_washer003.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_hightechgunlab" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_ironfurnace.lua b/ftp_gmstranded/entities/entities/gms_ironfurnace.lua new file mode 100644 index 0000000..7769e83 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_ironfurnace.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Iron Furnace" + +ENT.Model = "models/props_c17/furniturefireplace001a.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_ironfurnace" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_ironworkbench.lua b/ftp_gmstranded/entities/entities/gms_ironworkbench.lua new file mode 100644 index 0000000..5204f47 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_ironworkbench.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Iron Workbench" + +ENT.Model = "models/props_wasteland/controlroom_desk001b.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_ironworkbench" ) +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/entities/gms_loot.lua b/ftp_gmstranded/entities/entities/gms_loot.lua new file mode 100644 index 0000000..7588d4c --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_loot.lua @@ -0,0 +1,24 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Loot" + +ENT.Model = "models/weapons/w_bugbait.mdl" +ENT.DoWake = true +ENT.Color = Color( 255, 0, 0, 255 ) + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:DoProcess( "Loot", 5, { + Entity = self, + Resources = self.Resources + } ) +end + +function ENT:Think() + local effectdata = EffectData() + effectdata:SetOrigin( self:GetPos() ) + util.Effect( "gms_loot_effect", effectdata ) +end diff --git a/ftp_gmstranded/entities/entities/gms_mithrilfactory.lua b/ftp_gmstranded/entities/entities/gms_mithrilfactory.lua new file mode 100644 index 0000000..8b3ce3a --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_mithrilfactory.lua @@ -0,0 +1,17 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Mithril Factory" + +ENT.Model = "models/props_wasteland/laundry_washer001a.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_mithrilfactory" ) +end + + + + diff --git a/ftp_gmstranded/entities/entities/gms_mithrilworkbench.lua b/ftp_gmstranded/entities/entities/gms_mithrilworkbench.lua new file mode 100644 index 0000000..18b849f --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_mithrilworkbench.lua @@ -0,0 +1,17 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Mithril WorkBench" + +ENT.Model = "models/props_wasteland/kitchen_counter001c.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_mithrilworkbench" ) +end + + + + diff --git a/ftp_gmstranded/entities/entities/gms_obelisk.lua b/ftp_gmstranded/entities/entities/gms_obelisk.lua new file mode 100644 index 0000000..7a415ac --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_obelisk.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Obelisk" + +ENT.Model = "models/props_c17/gravestone_cross001b.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_obelisk" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_pistolgunlab.lua b/ftp_gmstranded/entities/entities/gms_pistolgunlab.lua new file mode 100644 index 0000000..c55afa0 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_pistolgunlab.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Pistol Gun Lab" + +ENT.Model = "models/props/cs_militia/gun_cabinet.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_pistolgunlab" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_platinumfurnace.lua b/ftp_gmstranded/entities/entities/gms_platinumfurnace.lua new file mode 100644 index 0000000..1b974c6 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_platinumfurnace.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Platinum Furnace" + +ENT.Model = "models/xeon133/slider/slider_stand_12x12x24.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_platinumfurnace" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_platinumworkbench.lua b/ftp_gmstranded/entities/entities/gms_platinumworkbench.lua new file mode 100644 index 0000000..fd22f8c --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_platinumworkbench.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Platinum Workbench" + +ENT.Model = "models/xqm/boxfull.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_platinumworkbench" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_renbuyshop.lua b/ftp_gmstranded/entities/entities/gms_renbuyshop.lua new file mode 100644 index 0000000..f6f4f2b --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_renbuyshop.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Ren Buy Shop" + +ENT.Model = "models/props_lab/monitor02.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_renbuyshop" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_rensellshop.lua b/ftp_gmstranded/entities/entities/gms_rensellshop.lua new file mode 100644 index 0000000..75e43f4 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_rensellshop.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Ren Sell Shop" + +ENT.Model = "models/props_c17/consolebox01a.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_rensellshop" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_resourcedrop.lua b/ftp_gmstranded/entities/entities/gms_resourcedrop.lua new file mode 100644 index 0000000..ea02813 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_resourcedrop.lua @@ -0,0 +1,63 @@ + +AddCSLuaFile() + +ENT.Type = "anim" +ENT.Base = "gms_base_entity" +ENT.PrintName = "Resource Drop" +ENT.Purpose = "To store resources." +ENT.Instructions = "Press use to pick up." + +ENT.Model = "models/items/item_item_crate.mdl" + +if ( CLIENT ) then + +local PendingRDrops = PendingRDrops or {} + +usermessage.Hook( "gms_SetResourceDropInfo", function( um ) + local index = um:ReadString() + local type = um:ReadString() + local int = um:ReadShort() + local ent = ents.GetByIndex( index ) + + if ( int <= 0 ) then int = nil end + + if ( ent == NULL or !ent ) then + local tbl = {} + tbl.Type = type + tbl.Amount = int + tbl.Index = index + table.insert( PendingRDrops, tbl ) + + //error("This happened: PendingRDrops") + else + ent.Res = type + ent.Amount = int + end +end ) + +hook.Add( "Think", "gms_CheckForPendingRDrops", function() + for k, tbl in pairs( PendingRDrops ) do + local ent = ents.GetByIndex( tbl.Index ) + if ( ent != NULL ) then + ent.Res = tbl.Type + ent.Amount = tbl.Amount + table.remove( PendingRDrops, k ) + end + end +end ) + +return end + +function ENT:OnInitialize() + self.Type = "Resource" + self.Amount = 0 +end + +function ENT:StartTouch( ent ) + if ( ent:GetClass() == "gms_resourcedrop" && ent.Type == self.Type ) then + big_gms_combineresource( self, ent ) + end + if ( ent:GetClass() == "gms_buildsite" && ( ent.Costs[ self.Type ] != nil && ent.Costs[ self.Type ] > 0 ) ) then + gms_addbuildsiteresource( self, ent ) + end +end diff --git a/ftp_gmstranded/entities/entities/gms_resourcepack.lua b/ftp_gmstranded/entities/entities/gms_resourcepack.lua new file mode 100644 index 0000000..deae2e2 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_resourcepack.lua @@ -0,0 +1,70 @@ + +AddCSLuaFile() + +ENT.Type = "anim" +ENT.Base = "gms_base_entity" +ENT.PrintName = "Resource Pack" +ENT.Purpose = "To store resources." +ENT.Instructions = "Press use to open menu." + +ENT.Model = "models/items/item_item_crate.mdl" + +function ENT:OnInitialize() + self.Resources = {} +end + +if ( CLIENT ) then + +local PendingRPDrops = PendingRPDrops or {} + +usermessage.Hook( "gms_SetResPackInfo", function( um ) + local index = um:ReadString() + local type = um:ReadString() + local int = um:ReadShort() + local ent = ents.GetByIndex( index ) + + if ( int <= 0 ) then int = nil end + + if ( ent == NULL or !ent ) then + local tbl = {} + tbl.Type = type + tbl.Amount = int + tbl.Index = index + table.insert( PendingRPDrops, tbl ) + + //error("This happened: PendingRPDrops") + else + if ( !ent.Resources ) then ent.Resources = {} end + ent.Resources[ type ] = int + + if ( IsValid( GAMEMODE.ResourcePackFrame ) ) then + GAMEMODE.ResourcePackFrame:Update() + end + end +end ) + +hook.Add( "Think", "gms_CheckForPendingRPDrops", function() + for k, tbl in pairs( PendingRPDrops ) do + local ent = ents.GetByIndex( tbl.Index ) + if ( IsValid( ent ) ) then + if ( !ent.Resources ) then ent.Resources = {} end + ent.Resources[ tbl.Type ] = tbl.Amount + table.remove( PendingRPDrops, k ) + + if ( IsValid( GAMEMODE.ResourcePackFrame ) ) then + GAMEMODE.ResourcePackFrame:Update() + end + end + end +end ) + +return end + +function ENT:StartTouch( ent ) + if ( ent:GetClass() == "gms_resourcedrop" ) then + big_gms_combineresourcepack( self, ent ) + end + if ( ent:GetClass() == "gms_buildsite" ) then + gms_addbuildsiteresourcePack( self, ent ) + end +end diff --git a/ftp_gmstranded/entities/entities/gms_runealtar.lua b/ftp_gmstranded/entities/entities/gms_runealtar.lua new file mode 100644 index 0000000..357ea06 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_runealtar.lua @@ -0,0 +1,17 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Rune Altar" + +ENT.Model = "models/xqm/rails/cap.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_runealtar" ) +end + + + + diff --git a/ftp_gmstranded/entities/entities/gms_runicinfuser.lua b/ftp_gmstranded/entities/entities/gms_runicinfuser.lua new file mode 100644 index 0000000..68a7e9a --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_runicinfuser.lua @@ -0,0 +1,17 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Runic Infuser" + +ENT.Model = "models/maxofs2d/hover_rings.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_runicinfuser" ) +end + + + + diff --git a/ftp_gmstranded/entities/entities/gms_seed.lua b/ftp_gmstranded/entities/entities/gms_seed.lua new file mode 100644 index 0000000..626669f --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_seed.lua @@ -0,0 +1,160 @@ + +AddCSLuaFile() + +ENT.Type = "anim" +ENT.Base = "gms_base_entity" +ENT.PrintName = "Seed" + +ENT.Model = "models/weapons/w_bugbait.mdl" +ENT.Color = Color( 0, 255, 0, 255 ) + +if ( CLIENT ) then return end + +function ENT:OnInitialize() + self:SetMoveType( MOVETYPE_NONE ) +end + +function ENT:Setup( plantType, time, ply ) + self.Type = plantType + if ( plantType != "tree" ) then ply:SetNWInt( "plants", ply:GetNWInt( "plants" ) + 1 ) end + self:SetOwner( ply ) + + timer.Create( "GMS_SeedTimers_" .. self:EntIndex(), time, 1, function() self:Grow() end ) +end + +function ENT:Grow() + local ply = self:GetOwner() + local pos = self:GetPos() + + local num = 1 + if ( IsValid( ply ) && ply:HasUnlock( "Adept_Farmer" ) ) then num = num + math.random( 0, 1 ) end + if ( IsValid( ply ) && ply:HasUnlock( "Expert_Farmer" ) ) then num = num + math.random( 0, 2 ) end + + if ( self.Type == "tree" ) then + GAMEMODE.MakeTree( pos ) + elseif ( self.Type == "melon" ) then + GAMEMODE.MakeMelon( pos, num, ply ) + elseif ( self.Type == "banana" ) then + GAMEMODE.MakeBanana( pos, num, ply ) + elseif ( self.Type == "orange" ) then + GAMEMODE.MakeOrange( pos, num, ply ) + elseif ( self.Type == "grain" ) then + GAMEMODE.MakeGrain( pos, ply ) + elseif ( self.Type == "berry" ) then + GAMEMODE.MakeBush( pos, ply ) + end + + self.Grown = true + self:Fadeout() +end + +function ENT:OnRemove() + if ( !self.Grown && self.Type != "tree" && IsValid( self:GetOwner() ) ) then + self:GetOwner():SetNWInt( "plants", self:GetOwner():GetNWInt( "plants" ) - 1 ) + end + timer.Destroy( "GMS_SeedTimers_" .. self:EntIndex() ) +end + +function GAMEMODE.MakeGenericPlant( ply, pos, mdl, isTree ) + local ent = ents.Create( "prop_dynamic" ) + ent:SetAngles( Angle( 0, math.random( 0, 360 ), 0 ) ) + ent:SetSolid( SOLID_VPHYSICS ) + ent:SetModel( mdl ) + ent:SetPos( pos ) + ent:Spawn() + ent.IsPlant = true + ent:SetName( "gms_plant" .. ent:EntIndex() ) + + ent:Fadein() + ent:RiseFromGround( 1, 50 ) + + if ( !isTree && IsValid( ply ) ) then + ent:SetNWEntity( "plantowner", ply ) + SPropProtection.PlayerMakePropOwner( ply, ent ) + else + ent:SetNWString( "Owner", "World" ) + end + + local phys = ent:GetPhysicsObject() + if ( IsValid( phys ) ) then phys:EnableMotion( false ) end + ent.PhysgunDisabled = true + + return ent +end + +function GAMEMODE.MakeGenericPlantChild( ply, pos, mdl, parent ) + local ent = ents.Create( "prop_physics" ) + ent:SetAngles( Angle( 0, math.random( 0, 360 ) , 0 ) ) + ent:SetModel( mdl ) + ent:SetPos( pos ) + ent:Spawn() + ent.IsPlantChild = true + + ent:SetHealth( 99999 ) + ent:Fadein() + + local phys = ent:GetPhysicsObject() + if ( phys ) then phys:EnableMotion( false ) end + + ent.PlantParent = parent + ent.PlantParentName = parent:GetName() + parent.Children = parent.Children + 1 + + if ( IsValid( ply ) ) then + SPropProtection.PlayerMakePropOwner( ply, ent ) + else + ent:SetNWString( "Owner", "World" ) + end + + ent.PhysgunDisabled = true + + return ent +end + +function GAMEMODE.MakeTree( pos ) + //GAMEMODE.MakeGenericPlant( ply, pos, GMS.TreeModels[ math.random( 1, #GMS.TreeModels ) ], true ) + local ent = ents.Create( "gms_tree" ) + ent:SetPos( pos ) + ent:Spawn() + ent.GMSAutoSpawned = true + ent:SetNetworkedString( "Owner", "World" ) +end + +function GAMEMODE.MakeGrain( pos, ply ) + GAMEMODE.MakeGenericPlant( ply, pos + Vector( math.random( -10, 10 ), math.random( -10, 10 ), 0 ), "models/props_foliage/cattails.mdl" ) +end + +function GAMEMODE.MakeBush( pos, ply ) + GAMEMODE.MakeGenericPlant( ply, pos + Vector( math.random( -10, 10 ), math.random( -10, 10 ), 16 ), "models/props/pi_shrub.mdl" ) +end + +function GAMEMODE.MakeBanana( pos, num, ply ) + local plant = GAMEMODE.MakeGenericPlant( ply, pos + Vector( 0, 0, -3 ), "models/props/de_dust/du_palm_tree01_skybx.mdl" ) + plant.Children = 0 + + for i = 1, num do + GAMEMODE.MakeGenericPlantChild( ply, pos + Vector( math.random( -7, 7 ), math.random( -7, 7 ), math.random( 48, 55 ) ), "models/props/cs_italy/bananna_bunch.mdl", plant ) + end +end + +function GAMEMODE.MakeMelon( pos, num, ply ) + local plant = GAMEMODE.MakeGenericPlant( ply, pos + Vector( 0, 0, 13 ), "models/props/CS_militia/fern01.mdl" ) + plant.Children = 0 + + for i = 1, num do + GAMEMODE.MakeGenericPlantChild( ply, pos + Vector( math.random( -25, 25 ), math.random( -25, 25 ), math.random( 5, 7 ) ), "models/props_junk/watermelon01.mdl", plant ) + end +end + +function GAMEMODE.MakeOrange( pos, num, ply ) + local plant = GAMEMODE.MakeGenericPlant( ply, pos + Vector( 0, 0, -12 ), "models/props/cs_office/plant01_p1.mdl" ) + plant.Children = 0 + + plant:SetCollisionGroup( 0 ) + plant:SetSolid( SOLID_NONE ) + plant.Children = 0 + + for i = 1, num do + GAMEMODE.MakeGenericPlantChild( ply, pos + Vector( math.random( -5, 5 ), math.random( -5, 5 ), math.random( 13, 30 ) ), "models/props/cs_italy/orange.mdl", plant ) + end +end diff --git a/ftp_gmstranded/entities/entities/gms_silverfurnace.lua b/ftp_gmstranded/entities/entities/gms_silverfurnace.lua new file mode 100644 index 0000000..bd29e69 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_silverfurnace.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Silver Furnace" + +ENT.Model = "models/props_wasteland/laundry_basket001.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_silverfurnace" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_silverworkbench.lua b/ftp_gmstranded/entities/entities/gms_silverworkbench.lua new file mode 100644 index 0000000..467e4b8 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_silverworkbench.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Tech Workbench" + +ENT.Model = "models/props/de_inferno/bench_concrete.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_silverworkbench" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_smggunlab.lua b/ftp_gmstranded/entities/entities/gms_smggunlab.lua new file mode 100644 index 0000000..c483e67 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_smggunlab.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "SMG Gun Lab" + +ENT.Model = "models/props_wasteland/controlroom_storagecloset001a.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_smggunlab" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_steelfurnace.lua b/ftp_gmstranded/entities/entities/gms_steelfurnace.lua new file mode 100644 index 0000000..1621a67 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_steelfurnace.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Steel Furnace" + +ENT.Model = "models/props_industrial/winch_deck.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_steelfurnace" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_steelworkbench.lua b/ftp_gmstranded/entities/entities/gms_steelworkbench.lua new file mode 100644 index 0000000..848ea43 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_steelworkbench.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Steel Workbench" + +ENT.Model = "models/props/de_nuke/equipment1.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_steelworkbench" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_stonefurnace.lua b/ftp_gmstranded/entities/entities/gms_stonefurnace.lua new file mode 100644 index 0000000..742b1d4 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_stonefurnace.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Stone Furnace" + +ENT.Model = "models/props/de_inferno/ClayOven.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_stonefurnace" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_stoneworkbench.lua b/ftp_gmstranded/entities/entities/gms_stoneworkbench.lua new file mode 100644 index 0000000..71f26e5 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_stoneworkbench.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Stone Workbench" + +ENT.Model = "models/props/de_piranesi/pi_merlon.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_stoneworkbench" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_stove.lua b/ftp_gmstranded/entities/entities/gms_stove.lua new file mode 100644 index 0000000..897ef73 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_stove.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Stove" + +ENT.Model = "models/props_c17/furniturestove001a.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "Cooking" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_techfurnace.lua b/ftp_gmstranded/entities/entities/gms_techfurnace.lua new file mode 100644 index 0000000..694d467 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_techfurnace.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Tech Furnace" + +ENT.Model = "models/props/cs_militia/dryer.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_techfurnace" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_techworkbench.lua b/ftp_gmstranded/entities/entities/gms_techworkbench.lua new file mode 100644 index 0000000..96d8c58 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_techworkbench.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Tech Workbench" + +ENT.Model = "models/props_lab/reciever_cart.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_techworkbench" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_transmutator.lua b/ftp_gmstranded/entities/entities/gms_transmutator.lua new file mode 100644 index 0000000..582622e --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_transmutator.lua @@ -0,0 +1,13 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Transmutator" + +ENT.Model = "models/props_wasteland/kitchen_stove002a.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "gms_transmutator" ) +end diff --git a/ftp_gmstranded/entities/entities/gms_tree.lua b/ftp_gmstranded/entities/entities/gms_tree.lua new file mode 100644 index 0000000..cd73761 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_tree.lua @@ -0,0 +1,22 @@ +//models/props_foliage/tree_springers_01a.mdl + + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Tree" + +ENT.Model = "models/props_foliage/tree_springers_01a.mdl" + +ENT.DoWake = true + +ENT.Uses = 100 + +if ( CLIENT ) then return end + +function ENT:OnInitialize() + self:SetNetworkedString( "Owner", "World" ) + + self:SetMoveType( MOVETYPE_NONE ) + +end diff --git a/ftp_gmstranded/entities/entities/gms_waterfountain.lua b/ftp_gmstranded/entities/entities/gms_waterfountain.lua new file mode 100644 index 0000000..1cbf275 --- /dev/null +++ b/ftp_gmstranded/entities/entities/gms_waterfountain.lua @@ -0,0 +1,29 @@ + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Water Fountain" + +ENT.Model = "models/props/de_inferno/fountain.mdl" + +if ( CLIENT ) then return end + +function ENT:OnUse( ply ) + if ( ply.Thirst >= 950 ) then + ply.Thirst = 1000 + ply:UpdateNeeds() + if ( ply.Hasdrunk == false or ply.Hasdrunk == nil ) then + ply:EmitSound( Sound( "npc/barnacle/barnacle_gulp" .. math.random( 1, 2 ) .. ".wav" ) ) + ply.Hasdrunk = true + timer.Simple( 0.9, function() ply.Hasdrunk = false end ) + end + elseif ( ply.Thirst < 950 ) then + ply.Thirst = ply.Thirst + 50 + if ( ply.Hasdrunk == false or ply.Hasdrunk == nil ) then + ply:EmitSound( Sound( "npc/barnacle/barnacle_gulp" .. math.random( 1, 2 ) .. ".wav" ) ) + ply.Hasdrunk = true + timer.Simple( 0.9, function() ply.Hasdrunk = false end ) + end + ply:UpdateNeeds() + end +end diff --git a/ftp_gmstranded/entities/weapons/bobs_blacklisted/shared.lua b/ftp_gmstranded/entities/weapons/bobs_blacklisted/shared.lua new file mode 100644 index 0000000..0ac5a6d --- /dev/null +++ b/ftp_gmstranded/entities/weapons/bobs_blacklisted/shared.lua @@ -0,0 +1,74 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("bobs_blacklisted") +SWEP.Category = "" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "you're holding a blacklisted weapon!" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 1 -- Position in the slot +SWEP.DrawAmmo = false -- 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 = 0 -- rank relative ot other weapons. bigger is better +SWEP.AutoSwitchTo = false -- Auto switch to if we pick it up +SWEP.AutoSwitchFrom = true -- Auto switch from if you pick up a better weapon +SWEP.HoldType = "normal" -- 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 crossbow make for good sniper rifles + +SWEP.SelectiveFire = false + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_hands.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_suitcase_passenger.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = false +SWEP.AdminSpawnable = false +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = ("") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 1 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 0 -- Size of a clip +SWEP.Primary.DefaultClip = 0 -- Bullets you start with +SWEP.Primary.KickUp = 0 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "false" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 0 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 0 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 0 -- Base damage per bullet +SWEP.Primary.Spread = 0 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = 0 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(0,0,0) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(0,0,0) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector (0,0,0) +SWEP.RunSightsAng = Vector (0,0,0) + +SWEP.BlackListed = true + +function SWEP:PrimaryAttack() +self.Owner:PrintMessage(HUD_PRINTCENTER, "THIS WEAPON HAS BEEN BLACKLISTED") +end +function SWEP:SecondaryAttack() +self.Owner:PrintMessage(HUD_PRINTCENTER, "THIS WEAPON HAS BEEN BLACKLISTED") +end + +function SWEP:Think() +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/bobs_gun_base/shared.lua b/ftp_gmstranded/entities/weapons/bobs_gun_base/shared.lua new file mode 100644 index 0000000..6e182de --- /dev/null +++ b/ftp_gmstranded/entities/weapons/bobs_gun_base/shared.lua @@ -0,0 +1,1359 @@ +-- //Variables that are used on both client and server +SWEP.Category = "" +SWEP.Gun = "" +SWEP.Author = "Generic Default, Worshipper, Clavus, and Bob" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.DrawCrosshair = true -- Hell no, crosshairs r 4 nubz! +SWEP.ViewModelFOV = 65 -- How big the gun will look +SWEP.ViewModelFlip = true -- True for CSS models, False for HL2 models + +SWEP.Spawnable = false +SWEP.AdminSpawnable = false + +SWEP.Primary.Sound = Sound("") -- Sound of the gun +SWEP.Primary.Round = ("") -- What kind of bullet? +SWEP.Primary.Cone = 0.2 -- Accuracy of NPCs +SWEP.Primary.Recoil = 10 +SWEP.Primary.Damage = 10 +SWEP.Primary.Spread = .01 --define from-the-hip accuracy (1 is terrible, .0001 is exact) +SWEP.Primary.NumShots = 1 +SWEP.Primary.RPM = 0 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 0 -- Size of a clip +SWEP.Primary.DefaultClip = 0 -- Default number of bullets in a clip +SWEP.Primary.KickUp = 0 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0 -- Maximum side recoil (koolaid) +SWEP.Primary.Automatic = true -- Automatic/Semi Auto +SWEP.Primary.Ammo = "none" -- What kind of ammo + +-- SWEP.Secondary.ClipSize = 0 -- Size of a clip +-- SWEP.Secondary.DefaultClip = 0 -- Default number of bullets in a clip +-- SWEP.Secondary.Automatic = false -- Automatic/Semi Auto +SWEP.Secondary.Ammo = "" +--//HAHA! GOTCHA, YA BASTARD! + +-- SWEP.Secondary.IronFOV = 0 -- How much you 'zoom' in. Less is more! + +SWEP.Penetration = true +SWEP.Ricochet = true +SWEP.MaxRicochet = 1 +SWEP.RicochetCoin = 1 +SWEP.BoltAction = false +SWEP.Scoped = false +SWEP.ShellTime = .35 +SWEP.Tracer = 0 +SWEP.CanBeSilenced = false +SWEP.Silenced = false +SWEP.NextSilence = 0 +SWEP.SelectiveFire = false +SWEP.NextFireSelect = 0 +SWEP.OrigCrossHair = true + +local PainMulti = 1 + +if GetConVar("M9KDamageMultiplier") == nil then + PainMulti = 1 + print("M9KDamageMultiplier is missing! You may have hit the lua limit! Reverting multiplier to 1.") +else + PainMulti = GetConVar("M9KDamageMultiplier"):GetFloat() + if PainMulti < 0 then + PainMulti = PainMulti * -1 + print("Your damage multiplier was in the negatives. It has been reverted to a positive number. Your damage multiplier is now "..PainMulti) + end +end + +function NewM9KDamageMultiplier(cvar, previous, new) + print("multiplier has been changed ") + if GetConVar("M9KDamageMultiplier") == nil then + PainMulti = 1 + print("M9KDamageMultiplier is missing! You may have hit the lua limit! Reverting multiplier to 1, you will notice no changes.") + else + PainMulti = GetConVar("M9KDamageMultiplier"):GetFloat() + if PainMulti < 0 then + PainMulti = PainMulti * -1 + print("Your damage multiplier was in the negatives. It has been reverted to a positive number. Your damage multiplier is now "..PainMulti) + end + end +end +cvars.AddChangeCallback("M9KDamageMultiplier", NewM9KDamageMultiplier) + +function NewDefClips(cvar, previous, new) + print("Default clip multiplier has changed. A server restart will be required for these changes to take effect.") +end +cvars.AddChangeCallback("M9KDefaultClip", NewDefClips) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() >= 0 then + print("M9K Weapons will now spawn with "..GetConVar("M9KDefaultClip"):GetFloat().." clips.") + else + print("Default clips will be not be modified") + end +end + +SWEP.IronSightsPos = Vector (2.4537, 1.0923, 0.2696) +SWEP.IronSightsAng = Vector (0.0186, -0.0547, 0) + +SWEP.VElements = {} +SWEP.WElements = {} + +function SWEP:Initialize() + self.Reloadaftershoot = 0 -- Can't reload when firing + self:SetHoldType(self.HoldType) + self.OrigCrossHair = self.DrawCrosshair + if SERVER and self.Owner:IsNPC() then + self:SetNPCMinBurst(3) + self:SetNPCMaxBurst(10) -- None of this really matters but you need it here anyway + self:SetNPCFireRate(1/(self.Primary.RPM/60)) + -- //self:SetCurrentWeaponProficiency( WEAPON_PROFICIENCY_VERY_GOOD ) + end + + if CLIENT then + + -- // Create a new table for every weapon instance + self.VElements = table.FullCopy( self.VElements ) + self.WElements = table.FullCopy( self.WElements ) + self.ViewModelBoneMods = table.FullCopy( self.ViewModelBoneMods ) + + self:CreateModels(self.VElements) -- create viewmodels + self:CreateModels(self.WElements) -- create worldmodels + + -- // init view model bone build function + if IsValid(self.Owner) and self.Owner:IsPlayer() then + if self.Owner:Alive() then + local vm = self.Owner:GetViewModel() + if IsValid(vm) then + self:ResetBonePositions(vm) + -- // Init viewmodel visibility + if (self.ShowViewModel == nil or self.ShowViewModel) then + vm:SetColor(Color(255,255,255,255)) + else + -- // however for some reason the view model resets to render mode 0 every frame so we just apply a debug material to prevent it from drawing + vm:SetMaterial("Debug/hsv") + end + end + + end + end + + end + + if CLIENT then + local oldpath = "vgui/hud/name" -- the path goes here + local newpath = string.gsub(oldpath, "name", self.Gun) + self.WepSelectIcon = surface.GetTextureID(newpath) + end + +end + +function SWEP:Equip() + self:SetHoldType(self.HoldType) +end + +function SWEP:Deploy() + self:SetIronsights(false, self.Owner) -- Set the ironsight false + self:SetHoldType(self.HoldType) + + if self.Silenced then + self.Weapon:SendWeaponAnim( ACT_VM_DRAW_SILENCED ) + else + self.Weapon:SendWeaponAnim( ACT_VM_DRAW ) + end + + self.Weapon:SetNWBool("Reloading", false) + + if !self.Owner:IsNPC() and self.Owner != nil then + if self.ResetSights and self.Owner:GetViewModel() != nil then + self.ResetSights = CurTime() + self.Owner:GetViewModel():SequenceDuration() + end + end + return true +end + +function SWEP:Holster() + + if CLIENT and IsValid(self.Owner) and not self.Owner:IsNPC() then + local vm = self.Owner:GetViewModel() + if IsValid(vm) then + self:ResetBonePositions(vm) + end + end + + return true +end + +function SWEP:OnRemove() + + if CLIENT and IsValid(self.Owner) and not self.Owner:IsNPC() then + local vm = self.Owner:GetViewModel() + if IsValid(vm) then + self:ResetBonePositions(vm) + end + end + +end + +function SWEP:GetCapabilities() + return CAP_WEAPON_RANGE_ATTACK1, CAP_INNATE_RANGE_ATTACK1 +end + +function SWEP:Precache() + util.PrecacheSound(self.Primary.Sound) + util.PrecacheModel(self.ViewModel) + util.PrecacheModel(self.WorldModel) +end + +function SWEP:PrimaryAttack() + OkaySoFar = true + if not IsValid(self) then + OkaySoFar = false + else if not IsValid(self.Weapon) then + OkaySoFar = false + else if not IsValid(self.Owner) then + OkaySoFar = false + end end end + + if not OkaySoFar then return end + + if self:CanPrimaryAttack() and self.Owner:IsPlayer() then + if !self.Owner:KeyDown(IN_SPEED) and !self.Owner:KeyDown(IN_RELOAD) then + self:ShootBulletInformation() + self.Weapon:TakePrimaryAmmo(1) + + if self.Silenced then + self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK_SILENCED ) + self.Weapon:EmitSound(self.Primary.SilencedSound) + else + self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) + self.Weapon:EmitSound(self.Primary.Sound) + end + + local fx = EffectData() + fx:SetEntity(self.Weapon) + fx:SetOrigin(self.Owner:GetShootPos()) + fx:SetNormal(self.Owner:GetAimVector()) + fx:SetAttachment(self.MuzzleAttachment) + if GetConVar("M9KGasEffect") != nil then + if GetConVar("M9KGasEffect"):GetBool() then + util.Effect("m9k_rg_muzzle_rifle",fx) + end + end + self.Owner:SetAnimation( PLAYER_ATTACK1 ) + self.Owner:MuzzleFlash() + self.Weapon:SetNextPrimaryFire(CurTime()+1/(self.Primary.RPM/60)) + self:CheckWeaponsAndAmmo() + self.RicochetCoin = (math.random(1,4)) + if self.BoltAction then self:BoltBack() end + end + elseif self:CanPrimaryAttack() and self.Owner:IsNPC() then + self:ShootBulletInformation() + self.Weapon:TakePrimaryAmmo(1) + self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) + self.Weapon:EmitSound(self.Primary.Sound) + self.Owner:SetAnimation( PLAYER_ATTACK1 ) + self.Owner:MuzzleFlash() + self.Weapon:SetNextPrimaryFire(CurTime()+1/(self.Primary.RPM/60)) + self.RicochetCoin = (math.random(1,4)) + end +end + +function SWEP:CheckWeaponsAndAmmo() + if SERVER and self.Weapon != nil and (GetConVar("M9KWeaponStrip"):GetBool()) then + if self.Weapon:Clip1() == 0 && self.Owner:GetAmmoCount( self.Weapon:GetPrimaryAmmoType() ) == 0 then + timer.Simple(.1, function() if SERVER then if not IsValid(self) then return end + if self.Owner == nil then return end + self.Owner:StripWeapon(self.Gun) + end end) + end + end +end + + +/*--------------------------------------------------------- + Name: SWEP:ShootBulletInformation() + Desc: This func add the damage, the recoil, the number of shots and the cone on the bullet. +-----------------------------------------------------*/ +function SWEP:ShootBulletInformation() + + local CurrentDamage + local CurrentRecoil + local CurrentCone + local basedamage + + if (self:GetIronsights() == true) and self.Owner:KeyDown(IN_ATTACK2) then + CurrentCone = self.Primary.IronAccuracy + else + CurrentCone = self.Primary.Spread + end + local damagedice = math.Rand(.85,1.3) + + basedamage = PainMulti * self.Primary.Damage + CurrentDamage = basedamage * damagedice + CurrentRecoil = self.Primary.Recoil + + -- //Player is aiming + if (self:GetIronsights() == true) and self.Owner:KeyDown(IN_ATTACK2) then + self:ShootBullet(CurrentDamage, CurrentRecoil / 6, self.Primary.NumShots, CurrentCone) + -- //Player is not aiming + else + if IsValid(self) then + if IsValid(self.Weapon) then + if IsValid(self.Owner) then + self:ShootBullet(CurrentDamage, CurrentRecoil, self.Primary.NumShots, CurrentCone) + end + end + end + end + +end + +/*--------------------------------------------------------- + Name: SWEP:ShootBullet() + Desc: A convenience func to shoot bullets. +-----------------------------------------------------*/ +local TracerName = "Tracer" + +function SWEP:ShootBullet(damage, recoil, num_bullets, aimcone) + + num_bullets = num_bullets or 1 + aimcone = aimcone or 0 + + self:ShootEffects() + + if self.Tracer == 1 then + TracerName = "Ar2Tracer" + elseif self.Tracer == 2 then + TracerName = "AirboatGunHeavyTracer" + else + TracerName = "Tracer" + end + + local bullet = {} + bullet.Num = num_bullets + bullet.Src = self.Owner:GetShootPos() -- Source + bullet.Dir = self.Owner:GetAimVector() -- Dir of bullet + bullet.Spread = Vector(aimcone, aimcone, 0) -- Aim Cone + bullet.Tracer = 3 -- Show a tracer on every x bullets + bullet.TracerName = TracerName + bullet.Force = damage * 0.25 -- Amount of force to give to phys objects + bullet.Damage = damage + bullet.Callback = function(attacker, tracedata, dmginfo) + return self:RicochetCallback(0, attacker, tracedata, dmginfo) + end + if IsValid(self) then + if IsValid(self.Weapon) then + if IsValid(self.Owner) then + self.Owner:FireBullets(bullet) + end + end + end + -- //if SERVER and !self.Owner:IsNPC() then + -- // local anglo = Angle(math.Rand(-self.Primary.KickDown,-self.Primary.KickUp), math.Rand(-self.Primary.KickHorizontal,self.Primary.KickHorizontal), 0) + -- // self.Owner:ViewPunch(anglo) + + -- // local eyes = self.Owner:EyeAngles() + -- // eyes.pitch = eyes.pitch + anglo.pitch + -- // eyes.yaw = eyes.yaw + anglo.yaw + -- // if game.SinglePlayer() then self.Owner:SetEyeAngles(eyes) end + -- //end + + local anglo1 = Angle(math.Rand(-self.Primary.KickDown,-self.Primary.KickUp), math.Rand(-self.Primary.KickHorizontal,self.Primary.KickHorizontal), 0) + self.Owner:ViewPunch(anglo1) + + if SERVER and game.SinglePlayer() and !self.Owner:IsNPC() then + local offlineeyes = self.Owner:EyeAngles() + offlineeyes.pitch = offlineeyes.pitch + anglo1.pitch + offlineeyes.yaw = offlineeyes.yaw + anglo1.yaw + if GetConVar("M9KDynamicRecoil"):GetBool() then + self.Owner:SetEyeAngles(offlineeyes) + end + end + + if CLIENT and !game.SinglePlayer() and !self.Owner:IsNPC() then + local anglo = Angle(math.Rand(-self.Primary.KickDown,-self.Primary.KickUp), math.Rand(-self.Primary.KickHorizontal,self.Primary.KickHorizontal), 0) + + local eyes = self.Owner:EyeAngles() + eyes.pitch = eyes.pitch + (anglo.pitch/3) + eyes.yaw = eyes.yaw + (anglo.yaw/3) + if GetConVar("M9KDynamicRecoil"):GetBool() then + self.Owner:SetEyeAngles(eyes) + end + end + +end + +/*--------------------------------------------------------- + Name: SWEP:RicochetCallback() +-----------------------------------------------------*/ + +function SWEP:RicochetCallback(bouncenum, attacker, tr, dmginfo) + + if not IsFirstTimePredicted() then + return {damage = false, effects = false} + end + + local PenetrationChecker = false + + if GetConVar("M9KDisablePenetration") == nil then + PenetrationChecker = false + else + PenetrationChecker = GetConVar("M9KDisablePenetration"):GetBool() + end + + if PenetrationChecker then return {damage = true, effects = DoDefaultEffect} end + + bulletmiss = {} + bulletmiss[1]=Sound("weapons/fx/nearmiss/bulletLtoR03.wav") + bulletmiss[2]=Sound("weapons/fx/nearmiss/bulletLtoR04.wav") + bulletmiss[3]=Sound("weapons/fx/nearmiss/bulletLtoR06.wav") + bulletmiss[4]=Sound("weapons/fx/nearmiss/bulletLtoR07.wav") + bulletmiss[5]=Sound("weapons/fx/nearmiss/bulletLtoR09.wav") + bulletmiss[6]=Sound("weapons/fx/nearmiss/bulletLtoR10.wav") + bulletmiss[7]=Sound("weapons/fx/nearmiss/bulletLtoR13.wav") + bulletmiss[8]=Sound("weapons/fx/nearmiss/bulletLtoR14.wav") + + local DoDefaultEffect = true + if (tr.HitSky) then return end + + // -- Can we go through whatever we hit? + if (self.Penetration) and (self:BulletPenetrate(bouncenum, attacker, tr, dmginfo)) then + return {damage = true, effects = DoDefaultEffect} + end + + // -- Your screen will shake and you'll hear the savage hiss of an approaching bullet which passing if someone is shooting at you. + if (tr.MatType != MAT_METAL) then + if (SERVER) then + util.ScreenShake(tr.HitPos, 5, 0.1, 0.5, 64) + sound.Play(table.Random(bulletmiss), tr.HitPos, 75, math.random(75,150), 1) + end + + if self.Tracer == 0 or self.Tracer == 1 or self.Tracer == 2 then + local effectdata = EffectData() + effectdata:SetOrigin(tr.HitPos) + effectdata:SetNormal(tr.HitNormal) + effectdata:SetScale(20) + util.Effect("AR2Impact", effectdata) + elseif self.Tracer == 3 then + local effectdata = EffectData() + effectdata:SetOrigin(tr.HitPos) + effectdata:SetNormal(tr.HitNormal) + effectdata:SetScale(20) + util.Effect("StunstickImpact", effectdata) + end + + return + end + + if (self.Ricochet == false) then return {damage = true, effects = DoDefaultEffect} end + + if self.Primary.Ammo == "SniperPenetratedRound" then -- .50 Ammo + self.MaxRicochet = 12 + elseif self.Primary.Ammo == "pistol" then -- pistols + self.MaxRicochet = 2 + elseif self.Primary.Ammo == "357" then -- revolvers with big ass bullets + self.MaxRicochet = 4 + elseif self.Primary.Ammo == "smg1" then -- smgs + self.MaxRicochet = 5 + elseif self.Primary.Ammo == "ar2" then -- assault rifles + self.MaxRicochet = 8 + elseif self.Primary.Ammo == "buckshot" then -- shotguns + self.MaxRicochet = 1 + elseif self.Primary.Ammo == "slam" then -- secondary shotguns + self.MaxRicochet = 1 + elseif self.Primary.Ammo == "AirboatGun" then -- metal piercing shotgun pellet + self.MaxRicochet = 8 + end + + if (bouncenum > self.MaxRicochet) then return end + + // -- Bounce vector + local trace = {} + trace.start = tr.HitPos + trace.endpos = trace.start + (tr.HitNormal * 16384) + + local trace = util.TraceLine(trace) + + local DotProduct = tr.HitNormal:Dot(tr.Normal * -1) + + local ricochetbullet = {} + ricochetbullet.Num = 1 + ricochetbullet.Src = tr.HitPos + (tr.HitNormal * 5) + ricochetbullet.Dir = ((2 * tr.HitNormal * DotProduct) + tr.Normal) + (VectorRand() * 0.05) + ricochetbullet.Spread = Vector(0, 0, 0) + ricochetbullet.Tracer = 1 + ricochetbullet.TracerName = "m9k_effect_mad_ricochet_trace" + ricochetbullet.Force = dmginfo:GetDamage() * 0.15 + ricochetbullet.Damage = dmginfo:GetDamage() * 0.5 + ricochetbullet.Callback = function(a, b, c) + if (self.Ricochet) then + local impactnum + if tr.MatType == MAT_GLASS then impactnum = 0 else impactnum = 1 end + return self:RicochetCallback(bouncenum + impactnum, a, b, c) end + end + + timer.Simple(0, function() attacker:FireBullets(ricochetbullet) end) + + return {damage = true, effects = DoDefaultEffect} +end + + +/*--------------------------------------------------------- + Name: SWEP:BulletPenetrate() +-----------------------------------------------------*/ +function SWEP:BulletPenetrate(bouncenum, attacker, tr, paininfo) + + local MaxPenetration + + if self.Primary.Ammo == "SniperPenetratedRound" then -- .50 Ammo + MaxPenetration = 20 + elseif self.Primary.Ammo == "pistol" then -- pistols + MaxPenetration = 9 + elseif self.Primary.Ammo == "357" then -- revolvers with big ass bullets + MaxPenetration = 12 + elseif self.Primary.Ammo == "smg1" then -- smgs + MaxPenetration = 14 + elseif self.Primary.Ammo == "ar2" then -- assault rifles + MaxPenetration = 16 + elseif self.Primary.Ammo == "buckshot" then -- shotguns + MaxPenetration = 5 + elseif self.Primary.Ammo == "slam" then -- secondary shotguns + MaxPenetration = 5 + elseif self.Primary.Ammo == "AirboatGun" then -- metal piercing shotgun pellet + MaxPenetration = 17 + else + MaxPenetration = 14 + end + + local DoDefaultEffect = true + // -- Don't go through metal, sand or player + + if self.Primary.Ammo == "pistol" or + self.Primary.Ammo == "buckshot" or + self.Primary.Ammo == "slam" then self.Ricochet = true + else + if self.RicochetCoin == 1 then + self.Ricochet = true + elseif self.RicochetCoin >= 2 then + self.Ricochet = false + end + end + + if self.Primary.Ammo == "SniperPenetratedRound" then self.Ricochet = true end + + if self.Primary.Ammo == "SniperPenetratedRound" then -- .50 Ammo + self.MaxRicochet = 10 + elseif self.Primary.Ammo == "pistol" then -- pistols + self.MaxRicochet = 2 + elseif self.Primary.Ammo == "357" then -- revolvers with big ass bullets + self.MaxRicochet = 5 + elseif self.Primary.Ammo == "smg1" then -- smgs + self.MaxRicochet = 4 + elseif self.Primary.Ammo == "ar2" then -- assault rifles + self.MaxRicochet = 5 + elseif self.Primary.Ammo == "buckshot" then -- shotguns + self.MaxRicochet = 0 + elseif self.Primary.Ammo == "slam" then -- secondary shotguns + self.MaxRicochet = 0 + elseif self.Primary.Ammo == "AirboatGun" then -- metal piercing shotgun pellet + self.MaxRicochet = 8 + end + + if (tr.MatType == MAT_METAL and self.Ricochet == true and self.Primary.Ammo != "SniperPenetratedRound" ) then return false end + + // -- Don't go through more than 3 times + if (bouncenum > self.MaxRicochet) then return false end + + // -- Direction (and length) that we are going to penetrate + local PenetrationDirection = tr.Normal * MaxPenetration + + if (tr.MatType == MAT_GLASS or tr.MatType == MAT_PLASTIC or tr.MatType == MAT_WOOD or tr.MatType == MAT_FLESH or tr.MatType == MAT_ALIENFLESH) then + PenetrationDirection = tr.Normal * (MaxPenetration * 2) + end + + local trace = {} + trace.endpos = tr.HitPos + trace.start = tr.HitPos + PenetrationDirection + trace.mask = MASK_SHOT + trace.filter = {self.Owner} + + local trace = util.TraceLine(trace) + + // -- Bullet didn't penetrate. + if (trace.StartSolid or trace.Fraction >= 1.0 or tr.Fraction <= 0.0) then return false end + + // -- Damage multiplier depending on surface + local fDamageMulti = 0.5 + + if self.Primary.Ammo == "SniperPenetratedRound" then + fDamageMulti = 1 + elseif(tr.MatType == MAT_CONCRETE or tr.MatType == MAT_METAL) then + fDamageMulti = 0.3 + elseif (tr.MatType == MAT_WOOD or tr.MatType == MAT_PLASTIC or tr.MatType == MAT_GLASS) then + fDamageMulti = 0.8 + elseif (tr.MatType == MAT_FLESH or tr.MatType == MAT_ALIENFLESH) then + fDamageMulti = 0.9 + end + + local damagedice = math.Rand(.85,1.3) + local newdamage = self.Primary.Damage * damagedice + + // -- Fire bullet from the exit point using the original trajectory + local penetratedbullet = {} + penetratedbullet.Num = 1 + penetratedbullet.Src = trace.HitPos + penetratedbullet.Dir = tr.Normal + penetratedbullet.Spread = Vector(0, 0, 0) + penetratedbullet.Tracer = 2 + penetratedbullet.TracerName = "m9k_effect_mad_penetration_trace" + penetratedbullet.Force = 5 + penetratedbullet.Damage = paininfo:GetDamage() * fDamageMulti + penetratedbullet.Callback = function(a, b, c) if (self.Ricochet) then + local impactnum + if tr.MatType == MAT_GLASS then impactnum = 0 else impactnum = 1 end + return self:RicochetCallback(bouncenum + impactnum, a,b,c) end end + + timer.Simple(0, function() if attacker != nil then attacker:FireBullets(penetratedbullet) end end) + + return true +end + + +function SWEP:SecondaryAttack() + return false +end + +function SWEP:Reload() + if not IsValid(self) then return end if not IsValid(self.Owner) then return end + + if self.Owner:IsNPC() then + self.Weapon:DefaultReload(ACT_VM_RELOAD) + return end + + if self.Owner:KeyDown(IN_USE) then return end + + if self.Silenced then + self.Weapon:DefaultReload(ACT_VM_RELOAD_SILENCED) + else + self.Weapon:DefaultReload(ACT_VM_RELOAD) + end + + if !self.Owner:IsNPC() then + if self.Owner:GetViewModel() == nil then self.ResetSights = CurTime() + 3 else + self.ResetSights = CurTime() + self.Owner:GetViewModel():SequenceDuration() + end + end + + if SERVER and self.Weapon != nil then + if ( self.Weapon:Clip1() < self.Primary.ClipSize ) and !self.Owner:IsNPC() then + -- //When the current clip < full clip and the rest of your ammo > 0, then + self.Owner:SetFOV( 0, 0.3 ) + -- //Zoom = 0 + self:SetIronsights(false) + -- //Set the ironsight to false + self.Weapon:SetNWBool("Reloading", true) + end + local waitdammit = (self.Owner:GetViewModel():SequenceDuration()) + timer.Simple(waitdammit + .1, + function() + if self.Weapon == nil then return end + self.Weapon:SetNWBool("Reloading", false) + if self.Owner:KeyDown(IN_ATTACK2) and self.Weapon:GetClass() == self.Gun then + if CLIENT then return end + if self.Scoped == false then + self.Owner:SetFOV( self.Secondary.IronFOV, 0.3 ) + self.IronSightsPos = self.SightsPos -- Bring it up + self.IronSightsAng = self.SightsAng -- Bring it up + self:SetIronsights(true, self.Owner) + self.DrawCrosshair = false + else return end + elseif self.Owner:KeyDown(IN_SPEED) and self.Weapon:GetClass() == self.Gun then + if self.Weapon:GetNextPrimaryFire() <= (CurTime() + .03) then + self.Weapon:SetNextPrimaryFire(CurTime()+0.3) -- Make it so you can't shoot for another quarter second + end + self.IronSightsPos = self.RunSightsPos -- Hold it down + self.IronSightsAng = self.RunSightsAng -- Hold it down + self:SetIronsights(true, self.Owner) -- Set the ironsight true + self.Owner:SetFOV( 0, 0.3 ) + else return end + end) + end +end + +function SWEP:PostReloadScopeCheck() + if self.Weapon == nil then return end + self.Weapon:SetNWBool("Reloading", false) + if self.Owner:KeyDown(IN_ATTACK2) and self.Weapon:GetClass() == self.Gun then + if CLIENT then return end + if self.Scoped == false then + self.Owner:SetFOV( self.Secondary.IronFOV, 0.3 ) + self.IronSightsPos = self.SightsPos -- Bring it up + self.IronSightsAng = self.SightsAng -- Bring it up + self:SetIronsights(true, self.Owner) + self.DrawCrosshair = false + else return end + elseif self.Owner:KeyDown(IN_SPEED) and self.Weapon:GetClass() == self.Gun then + if self.Weapon:GetNextPrimaryFire() <= (CurTime() + .03) then + self.Weapon:SetNextPrimaryFire(CurTime()+0.3) -- Make it so you can't shoot for another quarter second + end + self.IronSightsPos = self.RunSightsPos -- Hold it down + self.IronSightsAng = self.RunSightsAng -- Hold it down + self:SetIronsights(true, self.Owner) -- Set the ironsight true + self.Owner:SetFOV( 0, 0.3 ) + else return end +end + +function SWEP:Silencer() + + if self.NextSilence > CurTime() then return end + + if self.Weapon != nil then + self.Owner:SetFOV( 0, 0.3 ) + self:SetIronsights(false) + self.Weapon:SetNWBool("Reloading", true) -- i know we're not reloading but it works + end + + if self.Silenced then + self:SendWeaponAnim(ACT_VM_DETACH_SILENCER) + self.Silenced = false + elseif not self.Silenced then + self:SendWeaponAnim(ACT_VM_ATTACH_SILENCER) + self.Silenced = true + end + + siltimer = CurTime() + (self.Owner:GetViewModel():SequenceDuration()) + 0.1 + if self.Weapon:GetNextPrimaryFire() <= siltimer then + self.Weapon:SetNextPrimaryFire(siltimer) + end + self.NextSilence = siltimer + + timer.Simple( ((self.Owner:GetViewModel():SequenceDuration()) + 0.1), + function() + if self.Weapon != nil then + self.Weapon:SetNWBool("Reloading", false) + if self.Owner:KeyDown(IN_ATTACK2) and self.Weapon:GetClass() == self.Gun then + if CLIENT then return end + if self.Scoped == false then + self.Owner:SetFOV( self.Secondary.IronFOV, 0.3 ) + self.IronSightsPos = self.SightsPos -- Bring it up + self.IronSightsAng = self.SightsAng -- Bring it up + self:SetIronsights(true, self.Owner) + self.DrawCrosshair = false + else return end + elseif self.Owner:KeyDown(IN_SPEED) and self.Weapon:GetClass() == self.Gun then + if self.Weapon:GetNextPrimaryFire() <= (CurTime()+0.3) then + self.Weapon:SetNextPrimaryFire(CurTime()+0.3) -- Make it so you can't shoot for another quarter second + end + self.IronSightsPos = self.RunSightsPos -- Hold it down + self.IronSightsAng = self.RunSightsAng -- Hold it down + self:SetIronsights(true, self.Owner) -- Set the ironsight true + self.Owner:SetFOV( 0, 0.3 ) + else return end + end + end) + +end + +function SWEP:SelectFireMode() + + if self.Primary.Automatic then + self.Primary.Automatic = false + self.NextFireSelect = CurTime() + .5 + if CLIENT then + self.Owner:PrintMessage(HUD_PRINTTALK, "Semi-automatic selected.") + end + self.Weapon:EmitSound("Weapon_AR2.Empty") + else + self.Primary.Automatic = true + self.NextFireSelect = CurTime() + .5 + if CLIENT then + self.Owner:PrintMessage(HUD_PRINTTALK, "Automatic selected.") + end + self.Weapon:EmitSound("Weapon_AR2.Empty") + end +end + + +/*--------------------------------------------------------- +IronSight +-----------------------------------------------------*/ +function SWEP:IronSight() + + if not IsValid(self) then return end + if not IsValid(self.Owner) then return end + + if !self.Owner:IsNPC() then + if self.ResetSights and CurTime() >= self.ResetSights then + self.ResetSights = nil + + if self.Silenced then + self:SendWeaponAnim(ACT_VM_IDLE_SILENCED) + else + self:SendWeaponAnim(ACT_VM_IDLE) + end + end end + + if self.CanBeSilenced and self.NextSilence < CurTime() then + if self.Owner:KeyDown(IN_USE) and self.Owner:KeyPressed(IN_ATTACK2) then + self:Silencer() + end + end + + if self.SelectiveFire and self.NextFireSelect < CurTime() and not (self.Weapon:GetNWBool("Reloading")) then + if self.Owner:KeyDown(IN_USE) and self.Owner:KeyPressed(IN_RELOAD) then + self:SelectFireMode() + end + end + +-- //copy this... + if self.Owner:KeyPressed(IN_SPEED) and not (self.Weapon:GetNWBool("Reloading")) then -- If you are running + if self.Weapon:GetNextPrimaryFire() <= (CurTime()+0.3) then + self.Weapon:SetNextPrimaryFire(CurTime()+0.3) -- Make it so you can't shoot for another quarter second + end + self.IronSightsPos = self.RunSightsPos -- Hold it down + self.IronSightsAng = self.RunSightsAng -- Hold it down + self:SetIronsights(true, self.Owner) -- Set the ironsight true + self.Owner:SetFOV( 0, 0.3 ) + self.DrawCrosshair = false + end + + if self.Owner:KeyReleased (IN_SPEED) then -- If you release run then + self:SetIronsights(false, self.Owner) -- Set the ironsight true + self.Owner:SetFOV( 0, 0.3 ) + self.DrawCrosshair = self.OrigCrossHair + end -- Shoulder the gun + +-- //down to this + if !self.Owner:KeyDown(IN_USE) and !self.Owner:KeyDown(IN_SPEED) then + -- //If the key E (Use Key) is not pressed, then + + if self.Owner:KeyPressed(IN_ATTACK2) and not (self.Weapon:GetNWBool("Reloading")) then + self.Owner:SetFOV( self.Secondary.IronFOV, 0.3 ) + self.IronSightsPos = self.SightsPos -- Bring it up + self.IronSightsAng = self.SightsAng -- Bring it up + self:SetIronsights(true, self.Owner) + self.DrawCrosshair = false + -- //Set the ironsight true + + if CLIENT then return end + end + end + + if self.Owner:KeyReleased(IN_ATTACK2) and !self.Owner:KeyDown(IN_USE) and !self.Owner:KeyDown(IN_SPEED) then + -- //If the right click is released, then + self.Owner:SetFOV( 0, 0.3 ) + self.DrawCrosshair = self.OrigCrossHair + self:SetIronsights(false, self.Owner) + -- //Set the ironsight false + + if CLIENT then return end + end + + if self.Owner:KeyDown(IN_ATTACK2) and !self.Owner:KeyDown(IN_USE) and !self.Owner:KeyDown(IN_SPEED) then + self.SwayScale = 0.05 + self.BobScale = 0.05 + else + self.SwayScale = 1.0 + self.BobScale = 1.0 + end +end + +/*--------------------------------------------------------- +Think +-----------------------------------------------------*/ +function SWEP:Think() + +self:IronSight() + +end + +/*--------------------------------------------------------- +GetViewModelPosition +-----------------------------------------------------*/ +local IRONSIGHT_TIME = 0.3 +-- //Time to enter in the ironsight mod + +function SWEP:GetViewModelPosition(pos, ang) + + if (not self.IronSightsPos) then return pos, ang end + + local bIron = self.Weapon:GetNWBool("M9K_Ironsights") + + if (bIron != self.bLastIron) then + self.bLastIron = bIron + self.fIronTime = CurTime() + + end + + local fIronTime = self.fIronTime or 0 + + if (not bIron and fIronTime < CurTime() - IRONSIGHT_TIME) then + return pos, ang + end + + local Mul = 1.0 + + if (fIronTime > CurTime() - IRONSIGHT_TIME) then + Mul = math.Clamp((CurTime() - fIronTime) / IRONSIGHT_TIME, 0, 1) + + if not bIron then Mul = 1 - Mul end + end + + local Offset = self.IronSightsPos + + if (self.IronSightsAng) then + ang = ang * 1 + ang:RotateAroundAxis(ang:Right(), self.IronSightsAng.x * Mul) + ang:RotateAroundAxis(ang:Up(), self.IronSightsAng.y * Mul) + ang:RotateAroundAxis(ang:Forward(), self.IronSightsAng.z * Mul) + end + + local Right = ang:Right() + local Up = ang:Up() + local Forward = ang:Forward() + + pos = pos + Offset.x * Right * Mul + pos = pos + Offset.y * Forward * Mul + pos = pos + Offset.z * Up * Mul + + return pos, ang +end + +/*--------------------------------------------------------- +SetIronsights +-----------------------------------------------------*/ +function SWEP:SetIronsights(b) + self.Weapon:SetNWBool("M9K_Ironsights", b) +end + +function SWEP:GetIronsights() + return self.Weapon:GetNWBool("M9K_Ironsights") +end + + +if CLIENT then + + SWEP.vRenderOrder = nil + function SWEP:ViewModelDrawn() + + if not IsValid(self) then return end + if not IsValid(self.Owner) then return end + local vm = self.Owner:GetViewModel() + if !IsValid(vm) then return end + + if (!self.VElements) then return end + + self:UpdateBonePositions(vm) + + if (!self.vRenderOrder) then + + -- // we build a render order because sprites need to be drawn after models + self.vRenderOrder = {} + + for k, v in pairs( self.VElements ) do + if (v.type == "Model") then + table.insert(self.vRenderOrder, 1, k) + elseif (v.type == "Sprite" or v.type == "Quad") then + table.insert(self.vRenderOrder, k) + end + end + + end + + for k, name in ipairs( self.vRenderOrder ) do + + local v = self.VElements[name] + if (!v) then self.vRenderOrder = nil break end + if (v.hide) then continue end + + local model = v.modelEnt + local sprite = v.spriteMaterial + + if (!v.bone) then continue end + + local pos, ang = self:GetBoneOrientation( self.VElements, v, vm ) + + if (!pos) then continue end + + if (v.type == "Model" and IsValid(model)) then + + model:SetPos(pos + ang:Forward() * v.pos.x + ang:Right() * v.pos.y + ang:Up() * v.pos.z ) + ang:RotateAroundAxis(ang:Up(), v.angle.y) + ang:RotateAroundAxis(ang:Right(), v.angle.p) + ang:RotateAroundAxis(ang:Forward(), v.angle.r) + + model:SetAngles(ang) + -- //model:SetModelScale(v.size) + local matrix = Matrix() + matrix:Scale(v.size) + model:EnableMatrix( "RenderMultiply", matrix ) + + if (v.material == "") then + model:SetMaterial("") + elseif (model:GetMaterial() != v.material) then + model:SetMaterial( v.material ) + end + + if (v.skin and v.skin != model:GetSkin()) then + model:SetSkin(v.skin) + end + + if (v.bodygroup) then + for k, v in pairs( v.bodygroup ) do + if (model:GetBodygroup(k) != v) then + model:SetBodygroup(k, v) + end + end + end + + if (v.surpresslightning) then + render.SuppressEngineLighting(true) + end + + render.SetColorModulation(v.color.r/255, v.color.g/255, v.color.b/255) + render.SetBlend(v.color.a/255) + model:DrawModel() + render.SetBlend(1) + render.SetColorModulation(1, 1, 1) + + if (v.surpresslightning) then + render.SuppressEngineLighting(false) + end + + elseif (v.type == "Sprite" and sprite) then + + local drawpos = pos + ang:Forward() * v.pos.x + ang:Right() * v.pos.y + ang:Up() * v.pos.z + render.SetMaterial(sprite) + render.DrawSprite(drawpos, v.size.x, v.size.y, v.color) + + elseif (v.type == "Quad" and v.draw_func) then + + local drawpos = pos + ang:Forward() * v.pos.x + ang:Right() * v.pos.y + ang:Up() * v.pos.z + ang:RotateAroundAxis(ang:Up(), v.angle.y) + ang:RotateAroundAxis(ang:Right(), v.angle.p) + ang:RotateAroundAxis(ang:Forward(), v.angle.r) + + cam.Start3D2D(drawpos, ang, v.size) + v.draw_func( self ) + cam.End3D2D() + + end + + end + + end + + SWEP.wRenderOrder = nil + function SWEP:DrawWorldModel() + + if (self.ShowWorldModel == nil or self.ShowWorldModel) then + self:DrawModel() + end + + if (!self.WElements) then return end + + if (!self.wRenderOrder) then + + self.wRenderOrder = {} + + for k, v in pairs( self.WElements ) do + if (v.type == "Model") then + table.insert(self.wRenderOrder, 1, k) + elseif (v.type == "Sprite" or v.type == "Quad") then + table.insert(self.wRenderOrder, k) + end + end + + end + + if (IsValid(self.Owner)) then + bone_ent = self.Owner + else + -- // when the weapon is dropped + bone_ent = self + end + + for k, name in pairs( self.wRenderOrder ) do + + local v = self.WElements[name] + if (!v) then self.wRenderOrder = nil break end + if (v.hide) then continue end + + local pos, ang + + if (v.bone) then + pos, ang = self:GetBoneOrientation( self.WElements, v, bone_ent ) + else + pos, ang = self:GetBoneOrientation( self.WElements, v, bone_ent, "ValveBiped.Bip01_R_Hand" ) + end + + if (!pos) then continue end + + local model = v.modelEnt + local sprite = v.spriteMaterial + + if (v.type == "Model" and IsValid(model)) then + + model:SetPos(pos + ang:Forward() * v.pos.x + ang:Right() * v.pos.y + ang:Up() * v.pos.z ) + ang:RotateAroundAxis(ang:Up(), v.angle.y) + ang:RotateAroundAxis(ang:Right(), v.angle.p) + ang:RotateAroundAxis(ang:Forward(), v.angle.r) + + model:SetAngles(ang) + -- //model:SetModelScale(v.size) + local matrix = Matrix() + matrix:Scale(v.size) + model:EnableMatrix( "RenderMultiply", matrix ) + + if (v.material == "") then + model:SetMaterial("") + elseif (model:GetMaterial() != v.material) then + model:SetMaterial( v.material ) + end + + if (v.skin and v.skin != model:GetSkin()) then + model:SetSkin(v.skin) + end + + if (v.bodygroup) then + for k, v in pairs( v.bodygroup ) do + if (model:GetBodygroup(k) != v) then + model:SetBodygroup(k, v) + end + end + end + + if (v.surpresslightning) then + render.SuppressEngineLighting(true) + end + + render.SetColorModulation(v.color.r/255, v.color.g/255, v.color.b/255) + render.SetBlend(v.color.a/255) + model:DrawModel() + render.SetBlend(1) + render.SetColorModulation(1, 1, 1) + + if (v.surpresslightning) then + render.SuppressEngineLighting(false) + end + + elseif (v.type == "Sprite" and sprite) then + + local drawpos = pos + ang:Forward() * v.pos.x + ang:Right() * v.pos.y + ang:Up() * v.pos.z + render.SetMaterial(sprite) + render.DrawSprite(drawpos, v.size.x, v.size.y, v.color) + + elseif (v.type == "Quad" and v.draw_func) then + + local drawpos = pos + ang:Forward() * v.pos.x + ang:Right() * v.pos.y + ang:Up() * v.pos.z + ang:RotateAroundAxis(ang:Up(), v.angle.y) + ang:RotateAroundAxis(ang:Right(), v.angle.p) + ang:RotateAroundAxis(ang:Forward(), v.angle.r) + + cam.Start3D2D(drawpos, ang, v.size) + v.draw_func( self ) + cam.End3D2D() + + end + + end + + end + + function SWEP:GetBoneOrientation( basetab, tab, ent, bone_override ) + + local bone, pos, ang + if (tab.rel and tab.rel != "") then + + local v = basetab[tab.rel] + + if (!v) then return end + + -- // Technically, if there exists an element with the same name as a bone + -- // you can get in an infinite loop. Let's just hope nobody's that stupid. + pos, ang = self:GetBoneOrientation( basetab, v, ent ) + + if (!pos) then return end + + pos = pos + ang:Forward() * v.pos.x + ang:Right() * v.pos.y + ang:Up() * v.pos.z + ang:RotateAroundAxis(ang:Up(), v.angle.y) + ang:RotateAroundAxis(ang:Right(), v.angle.p) + ang:RotateAroundAxis(ang:Forward(), v.angle.r) + + else + + bone = ent:LookupBone(bone_override or tab.bone) + + if (!bone) then return end + + pos, ang = Vector(0,0,0), Angle(0,0,0) + local m = ent:GetBoneMatrix(bone) + if (m) then + pos, ang = m:GetTranslation(), m:GetAngles() + end + + if (IsValid(self.Owner) and self.Owner:IsPlayer() and + ent == self.Owner:GetViewModel() and self.ViewModelFlip) then + ang.r = -ang.r --// Fixes mirrored models + end + + end + + return pos, ang + end + + function SWEP:CreateModels( tab ) + + if (!tab) then return end + + -- // Create the clientside models here because Garry says we can't do it in the render hook + for k, v in pairs( tab ) do + if (v.type == "Model" and v.model and v.model != "" and (!IsValid(v.modelEnt) or v.createdModel != v.model) and + string.find(v.model, ".mdl") and file.Exists (v.model, "GAME") ) then + + v.modelEnt = ClientsideModel(v.model, RENDER_GROUP_VIEW_MODEL_OPAQUE) + if (IsValid(v.modelEnt)) then + v.modelEnt:SetPos(self:GetPos()) + v.modelEnt:SetAngles(self:GetAngles()) + v.modelEnt:SetParent(self) + v.modelEnt:SetNoDraw(true) + v.createdModel = v.model + else + v.modelEnt = nil + end + + elseif (v.type == "Sprite" and v.sprite and v.sprite != "" and (!v.spriteMaterial or v.createdSprite != v.sprite) + and file.Exists ("materials/"..v.sprite..".vmt", "GAME")) then + + local name = v.sprite.."-" + local params = { ["$basetexture"] = v.sprite } + -- // make sure we create a unique name based on the selected options + local tocheck = { "nocull", "additive", "vertexalpha", "vertexcolor", "ignorez" } + for i, j in pairs( tocheck ) do + if (v[j]) then + params["$"..j] = 1 + name = name.."1" + else + name = name.."0" + end + end + + v.createdSprite = v.sprite + v.spriteMaterial = CreateMaterial(name,"UnlitGeneric",params) + + end + end + + end + + local allbones + local hasGarryFixedBoneScalingYet = false + + function SWEP:UpdateBonePositions(vm) + + if self.ViewModelBoneMods then + + if (!vm:GetBoneCount()) then return end + + -- // !! WORKAROUND !! --// + -- // We need to check all model names :/ + local loopthrough = self.ViewModelBoneMods + if (!hasGarryFixedBoneScalingYet) then + allbones = {} + for i=0, vm:GetBoneCount() do + local bonename = vm:GetBoneName(i) + if (self.ViewModelBoneMods[bonename]) then + allbones[bonename] = self.ViewModelBoneMods[bonename] + else + allbones[bonename] = { + scale = Vector(1,1,1), + pos = Vector(0,0,0), + angle = Angle(0,0,0) + } + end + end + + loopthrough = allbones + end + //!! ----------- !! -- + + for k, v in pairs( loopthrough ) do + local bone = vm:LookupBone(k) + if (!bone) then continue end + + -- // !! WORKAROUND !! --// + local s = Vector(v.scale.x,v.scale.y,v.scale.z) + local p = Vector(v.pos.x,v.pos.y,v.pos.z) + local ms = Vector(1,1,1) + if (!hasGarryFixedBoneScalingYet) then + local cur = vm:GetBoneParent(bone) + while(cur >= 0) do + local pscale = loopthrough[vm:GetBoneName(cur)].scale + ms = ms * pscale + cur = vm:GetBoneParent(cur) + end + end + + s = s * ms + //!! ----------- !! -- + + if vm:GetManipulateBoneScale(bone) != s then + vm:ManipulateBoneScale( bone, s ) + end + if vm:GetManipulateBoneAngles(bone) != v.angle then + vm:ManipulateBoneAngles( bone, v.angle ) + end + if vm:GetManipulateBonePosition(bone) != p then + vm:ManipulateBonePosition( bone, p ) + end + end + else + self:ResetBonePositions(vm) + end + + end + + function SWEP:ResetBonePositions(vm) + + if (!vm:GetBoneCount()) then return end + for i=0, vm:GetBoneCount() do + vm:ManipulateBoneScale( i, Vector(1, 1, 1) ) + vm:ManipulateBoneAngles( i, Angle(0, 0, 0) ) + vm:ManipulateBonePosition( i, Vector(0, 0, 0) ) + end + + end + + /************************** + Global utility code + **************************/ + + -- // Fully copies the table, meaning all tables inside this table are copied too and so on (normal table.Copy copies only their reference). + -- // Does not copy entities of course, only copies their reference. + -- // WARNING: do not use on tables that contain themselves somewhere down the line or you'll get an infinite loop + function table.FullCopy( tab ) + + if (!tab) then return nil end + + local res = {} + for k, v in pairs( tab ) do + if (type(v) == "table") then + res[k] = table.FullCopy(v) --// recursion ho! + elseif (type(v) == "Vector") then + res[k] = Vector(v.x, v.y, v.z) + elseif (type(v) == "Angle") then + res[k] = Angle(v.p, v.y, v.r) + else + res[k] = v + end + end + + return res + + end + +end + diff --git a/ftp_gmstranded/entities/weapons/bobs_scoped_base/cl_init.lua b/ftp_gmstranded/entities/weapons/bobs_scoped_base/cl_init.lua new file mode 100644 index 0000000..cb3dfa3 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/bobs_scoped_base/cl_init.lua @@ -0,0 +1,9 @@ +include('shared.lua') + +SWEP.PrintName = "" // 'Nice' Weapon name (Shown on HUD) +SWEP.Slot = 4 // Slot in the weapon selection menu +SWEP.SlotPos = 1 // Position in the slot +SWEP.DrawAmmo = true // Should draw the default HL2 ammo counter // Should draw the default crosshair +SWEP.DrawWeaponInfoBox = true // Should draw the weapon info box +SWEP.BounceWeaponIcon = true // Should the weapon icon bounce? +SWEP.CSMuzzleFlashes = true
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/bobs_scoped_base/init.lua b/ftp_gmstranded/entities/weapons/bobs_scoped_base/init.lua new file mode 100644 index 0000000..3f157ab --- /dev/null +++ b/ftp_gmstranded/entities/weapons/bobs_scoped_base/init.lua @@ -0,0 +1,17 @@ +AddCSLuaFile( "cl_init.lua" ) +AddCSLuaFile( "shared.lua" ) + +include('shared.lua') + +SWEP.Weight = 30 // Decides whether we should switch from/to this +SWEP.AutoSwitchTo = true // Auto switch to if we pick it up +SWEP.AutoSwitchFrom = true // Auto switch from if you pick up a better weapon + +-- function SWEP:Initialize() +-- end + +function SWEP:OnRemove() +end + + + diff --git a/ftp_gmstranded/entities/weapons/bobs_scoped_base/shared.lua b/ftp_gmstranded/entities/weapons/bobs_scoped_base/shared.lua new file mode 100644 index 0000000..762ca4c --- /dev/null +++ b/ftp_gmstranded/entities/weapons/bobs_scoped_base/shared.lua @@ -0,0 +1,461 @@ +-- Variables that are used on both client and server +SWEP.Category = "" +SWEP.Author = "Generic Default, Worshipper, Clavus, and Bob" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.DrawCrosshair = true +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = true + +SWEP.Base = "bobs_gun_base" + +SWEP.Spawnable = false +SWEP.AdminSpawnable = false + +SWEP.Primary.Sound = Sound("") -- Sound of the gun +SWEP.Primary.Round = ("") -- What kind of bullet? +SWEP.Primary.RPM = 0 -- This is in Rounds Per Minute +SWEP.Primary.Cone = 0.15 -- Accuracy of NPCs +SWEP.Primary.Recoil = 10 +SWEP.Primary.Damage = 10 +SWEP.Primary.Spread = .01 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.NumShots = 1 +SWEP.Primary.ClipSize = 0 -- Size of a clip +SWEP.Primary.DefaultClip = 0 -- Default number of bullets in a clip +SWEP.Primary.KickUp = 0 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic/Semi Auto +SWEP.Primary.Ammo = "none" -- What kind of ammo + +-- SWEP.Secondary.ClipSize = 0 -- Size of a clip +-- SWEP.Secondary.DefaultClip = 0 -- Default number of bullets in a clip +-- SWEP.Secondary.Automatic = false -- Automatic/Semi Auto if +SWEP.Secondary.Ammo = "" + +SWEP.Secondary.ScopeZoom = 0 +SWEP.Secondary.UseACOG = false +SWEP.Secondary.UseMilDot = false +SWEP.Secondary.UseSVD = false +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false + +SWEP.Scoped = true + +SWEP.BoltAction = false + +SWEP.Penetration = true +SWEP.Ricochet = true +SWEP.MaxRicochet = 10 + +SWEP.Tracer = 0 + +SWEP.data = {} -- The starting firemode +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.5 +SWEP.ReticleScale = 0.5 +SWEP.IronSightsPos = Vector (2.4537, 1.0923, 0.2696) +SWEP.IronSightsAng = Vector (0.0186, -0.0547, 0) + +function SWEP:Initialize() + self.Weapon:SetNWBool("Reloading", false) + util.PrecacheSound(self.Primary.Sound) + if CLIENT then + + -- We need to get these so we can scale everything to the player's current resolution. + local iScreenWidth = surface.ScreenWidth() + local iScreenHeight = surface.ScreenHeight() + + -- The following code is only slightly riped off from Night Eagle + -- These tables are used to draw things like scopes and crosshairs to the HUD. + -- so DONT GET RID OF IT! + + self.ScopeTable = {} + self.ScopeTable.l = iScreenHeight*self.ScopeScale + self.ScopeTable.x1 = 0.5*(iScreenWidth + self.ScopeTable.l) + self.ScopeTable.y1 = 0.5*(iScreenHeight - self.ScopeTable.l) + self.ScopeTable.x2 = self.ScopeTable.x1 + self.ScopeTable.y2 = 0.5*(iScreenHeight + self.ScopeTable.l) + self.ScopeTable.x3 = 0.5*(iScreenWidth - self.ScopeTable.l) + self.ScopeTable.y3 = self.ScopeTable.y2 + self.ScopeTable.x4 = self.ScopeTable.x3 + self.ScopeTable.y4 = self.ScopeTable.y1 + self.ScopeTable.l = (iScreenHeight + 1)*self.ScopeScale -- I don't know why this works, but it does. + + self.QuadTable = {} + self.QuadTable.x1 = 0 + self.QuadTable.y1 = 0 + self.QuadTable.w1 = iScreenWidth + self.QuadTable.h1 = 0.5*iScreenHeight - self.ScopeTable.l + self.QuadTable.x2 = 0 + self.QuadTable.y2 = 0.5*iScreenHeight + self.ScopeTable.l + self.QuadTable.w2 = self.QuadTable.w1 + self.QuadTable.h2 = self.QuadTable.h1 + self.QuadTable.x3 = 0 + self.QuadTable.y3 = 0 + self.QuadTable.w3 = 0.5*iScreenWidth - self.ScopeTable.l + self.QuadTable.h3 = iScreenHeight + self.QuadTable.x4 = 0.5*iScreenWidth + self.ScopeTable.l + self.QuadTable.y4 = 0 + self.QuadTable.w4 = self.QuadTable.w3 + self.QuadTable.h4 = self.QuadTable.h3 + + self.LensTable = {} + self.LensTable.x = self.QuadTable.w3 + self.LensTable.y = self.QuadTable.h1 + self.LensTable.w = 2*self.ScopeTable.l + self.LensTable.h = 2*self.ScopeTable.l + + self.ReticleTable = {} + self.ReticleTable.wdivider = 3.125 + self.ReticleTable.hdivider = 1.7579/self.ReticleScale -- Draws the texture at 512 when the resolution is 1600x900 + self.ReticleTable.x = (iScreenWidth/2)-((iScreenHeight/self.ReticleTable.hdivider)/2) + self.ReticleTable.y = (iScreenHeight/2)-((iScreenHeight/self.ReticleTable.hdivider)/2) + self.ReticleTable.w = iScreenHeight/self.ReticleTable.hdivider + self.ReticleTable.h = iScreenHeight/self.ReticleTable.hdivider + + self.FilterTable = {} + self.FilterTable.wdivider = 3.125 + self.FilterTable.hdivider = 1.7579/1.35 + self.FilterTable.x = (iScreenWidth/2)-((iScreenHeight/self.FilterTable.hdivider)/2) + self.FilterTable.y = (iScreenHeight/2)-((iScreenHeight/self.FilterTable.hdivider)/2) + self.FilterTable.w = iScreenHeight/self.FilterTable.hdivider + self.FilterTable.h = iScreenHeight/self.FilterTable.hdivider + + + end + if SERVER then + self:SetNPCMinBurst(3) + self:SetNPCMaxBurst(10) + self:SetNPCFireRate(1) + --self:SetCurrentWeaponProficiency( WEAPON_PROFICIENCY_VERY_GOOD ) + end + self:SetHoldType(self.HoldType) + + if CLIENT then + + -- // Create a new table for every weapon instance + self.VElements = table.FullCopy( self.VElements ) + self.WElements = table.FullCopy( self.WElements ) + self.ViewModelBoneMods = table.FullCopy( self.ViewModelBoneMods ) + + self:CreateModels(self.VElements) -- create viewmodels + self:CreateModels(self.WElements) -- create worldmodels + + -- // init view model bone build function + if IsValid(self.Owner) and self.Owner:IsPlayer() then + if self.Owner:Alive() then + local vm = self.Owner:GetViewModel() + if IsValid(vm) then + self:ResetBonePositions(vm) + -- // Init viewmodel visibility + if (self.ShowViewModel == nil or self.ShowViewModel) then + vm:SetColor(Color(255,255,255,255)) + else + -- // however for some reason the view model resets to render mode 0 every frame so we just apply a debug material to prevent it from drawing + vm:SetMaterial("Debug/hsv") + end + end + + end + end + + end + + if CLIENT then + local oldpath = "vgui/hud/name" -- the path goes here + local newpath = string.gsub(oldpath, "name", self.Gun) + self.WepSelectIcon = surface.GetTextureID(newpath) + end + +end + +function SWEP:BoltBack() + if self.Weapon:Clip1() > 0 or self.Owner:GetAmmoCount( self.Weapon:GetPrimaryAmmoType() ) > 0 then + timer.Simple(.25, function() + if SERVER and self.Weapon != nil then + self.Weapon:SetNWBool("Reloading", true) + if self.Weapon:GetClass() == self.Gun then + if(self:GetIronsights() == true) then + self.Owner:SetFOV( 0, 0.3 ) + self:SetIronsights(false) + self.Owner:DrawViewModel(true) + end + local boltactiontime = (self.Owner:GetViewModel():SequenceDuration()) + timer.Simple(boltactiontime + .1, + function() if SERVER and self.Weapon != nil then + self.Weapon:SetNWBool("Reloading", false) + if self.Owner:KeyDown(IN_ATTACK2) and self.Weapon:GetClass() == self.Gun then + self.Owner:SetFOV( 75/self.Secondary.ScopeZoom, 0.15 ) + self.IronSightsPos = self.SightsPos -- Bring it up + self.IronSightsAng = self.SightsAng -- Bring it up + self.DrawCrosshair = false + self:SetIronsights(true, self.Owner) + self.Owner:DrawViewModel(false) + end + end + end) + end + else return end end ) + end +end + +function SWEP:Reload() + + if self.Owner:KeyDown(IN_USE) then return end + + self.Weapon:DefaultReload(ACT_VM_RELOAD) + if !self.Owner:IsNPC() then + self.Idle = CurTime() + self.Owner:GetViewModel():SequenceDuration() end + + if ( self.Weapon:Clip1() < self.Primary.ClipSize ) and !self.Owner:IsNPC() then + -- When the current clip < full clip and the rest of your ammo > 0, then + + self.Owner:SetFOV( 0, 0.3 ) + -- Zoom = 0 + + self:SetIronsights(false) + -- Set the ironsight to false + self.Weapon:SetNWBool("Reloading", true) + if CLIENT then return end + self.Owner:DrawViewModel(true) + end + + local waitdammit + if self.Owner:GetViewModel() == nil then + waitdammit = 3 + else + waitdammit = (self.Owner:GetViewModel():SequenceDuration()) + end + timer.Simple(waitdammit + .1, function() + if self.Weapon != nil then + self.Weapon:SetNWBool("Reloading", false) + if self.Owner:KeyDown(IN_ATTACK2) and self.Weapon:GetClass() == self.Gun then + if CLIENT then return end + self.Owner:SetFOV( 75/self.Secondary.ScopeZoom, 0.15 ) + self.IronSightsPos = self.SightsPos -- Bring it up + self.IronSightsAng = self.SightsAng -- Bring it up + self.DrawCrosshair = false + self:SetIronsights(true, self.Owner) + self.Owner:DrawViewModel(false) + elseif self.Owner:KeyDown(IN_SPEED) and self.Weapon:GetClass() == self.Gun then + if self.Weapon:GetNextPrimaryFire() <= (CurTime()+0.3) then + self.Weapon:SetNextPrimaryFire(CurTime()+0.3) -- Make it so you can't shoot for another quarter second + end + self.IronSightsPos = self.RunSightsPos -- Hold it down + self.IronSightsAng = self.RunSightsAng -- Hold it down + self:SetIronsights(true, self.Owner) -- Set the ironsight true + self.Owner:SetFOV( 0, 0.2 ) + else return end + end end) +end + +function SWEP:PostReloadScopeCheck() + if self.Weapon != nil then + self.Weapon:SetNWBool("Reloading", false) + if self.Owner:KeyDown(IN_ATTACK2) and self.Weapon:GetClass() == self.Gun then + if CLIENT then return end + self.Owner:SetFOV( 75/self.Secondary.ScopeZoom, 0.15 ) + self.IronSightsPos = self.SightsPos -- Bring it up + self.IronSightsAng = self.SightsAng -- Bring it up + self.DrawCrosshair = false + self:SetIronsights(true, self.Owner) + self.Owner:DrawViewModel(false) + elseif self.Owner:KeyDown(IN_SPEED) and self.Weapon:GetClass() == self.Gun then + if self.Weapon:GetNextPrimaryFire() <= (CurTime()+0.3) then + self.Weapon:SetNextPrimaryFire(CurTime()+0.3) -- Make it so you can't shoot for another quarter second + end + self.IronSightsPos = self.RunSightsPos -- Hold it down + self.IronSightsAng = self.RunSightsAng -- Hold it down + self:SetIronsights(true, self.Owner) -- Set the ironsight true + self.Owner:SetFOV( 0, 0.2 ) + else return end + end +end + + +/*--------------------------------------------------------- +IronSight +---------------------------------------------------------*/ +function SWEP:IronSight() + + if not IsValid(self) then return end + if not IsValid(self.Owner) then return end + + if self.SelectiveFire and self.NextFireSelect < CurTime() and not (self.Weapon:GetNWBool("Reloading")) then + if self.Owner:KeyDown(IN_USE) and self.Owner:KeyPressed(IN_RELOAD) then + self:SelectFireMode() + end + end + + if self.Owner:KeyDown(IN_USE) and self.Owner:KeyPressed(IN_ATTACK2) then return end + + if self.Owner:KeyPressed(IN_SPEED) and not (self.Weapon:GetNWBool("Reloading")) then -- If you hold E and you can shoot then + if self.Weapon:GetNextPrimaryFire() <= (CurTime()+0.3) then + self.Weapon:SetNextPrimaryFire(CurTime()+0.3) -- Make it so you can't shoot for another quarter second + end + self.IronSightsPos = self.RunSightsPos -- Hold it down + self.IronSightsAng = self.RunSightsAng -- Hold it down + self:SetIronsights(true, self.Owner) -- Set the ironsight true + self.Owner:SetFOV( 0, 0.2 ) + end + + if self.Owner:KeyDown(IN_SPEED) and not (self.Weapon:GetNWBool("Reloading")) then -- If you hold E or run then + if self.Weapon:GetNextPrimaryFire() <= (CurTime()+0.3) then + self.Weapon:SetNextPrimaryFire(CurTime()+0.3) -- Make it so you can't shoot for another quarter second + end -- Lower the gun + end + + if self.Owner:KeyReleased(IN_USE) || self.Owner:KeyReleased (IN_SPEED) then -- If you release E then + self:SetIronsights(false, self.Owner) -- Set the ironsight true + self.DrawCrosshair = self.XHair + end + + + if self.Owner:KeyPressed(IN_SPEED) || self.Owner:KeyPressed(IN_USE) then -- If you run then + self.Owner:SetFOV( 0, 0.2 ) + self.DrawCrosshair = false + if CLIENT then return end + self.Owner:DrawViewModel(true) + end + + if self.Owner:KeyPressed(IN_ATTACK2) and !self.Owner:KeyDown(IN_SPEED) and not (self.Weapon:GetNWBool("Reloading")) then + self.Owner:SetFOV( 75/self.Secondary.ScopeZoom, 0.15 ) + self.IronSightsPos = self.SightsPos -- Bring it up + self.IronSightsAng = self.SightsAng -- Bring it up + self.DrawCrosshair = false + self:SetIronsights(true, self.Owner) + if CLIENT then return end + self.Owner:DrawViewModel(false) + elseif self.Owner:KeyPressed(IN_ATTACK2) and not (self.Weapon:GetNWBool("Reloading")) and self.Owner:KeyDown(IN_SPEED) then + if self.Weapon:GetNextPrimaryFire() <= (CurTime()+0.3) then + self.Weapon:SetNextPrimaryFire(CurTime()+0.3) -- Make it so you can't shoot for another quarter second + end + self.IronSightsPos = self.RunSightsPos -- Hold it down + self.IronSightsAng = self.RunSightsAng -- Hold it down + self:SetIronsights(true, self.Owner) -- Set the ironsight true + self.Owner:SetFOV( 0, 0.2 ) + end + + if (self.Owner:KeyReleased(IN_ATTACK2) || self.Owner:KeyDown(IN_SPEED)) and !self.Owner:KeyDown(IN_USE) and !self.Owner:KeyDown(IN_SPEED) then + self.Owner:SetFOV( 0, 0.2 ) + self:SetIronsights(false, self.Owner) + self.DrawCrosshair = self.XHair + -- Set the ironsight false + if CLIENT then return end + self.Owner:DrawViewModel(true) + end + + if self.Owner:KeyDown(IN_ATTACK2) and !self.Owner:KeyDown(IN_USE) and !self.Owner:KeyDown(IN_SPEED) then + self.SwayScale = 0.05 + self.BobScale = 0.05 + else + self.SwayScale = 1.0 + self.BobScale = 1.0 + end +end + +function SWEP:DrawHUD() + + + if self.Owner:KeyDown(IN_ATTACK2) and (self:GetIronsights() == true) and (!self.Owner:KeyDown(IN_SPEED) and !self.Owner:KeyDown(IN_USE)) then + + if self.Secondary.UseACOG then + -- Draw the FAKE SCOPE THANG + surface.SetDrawColor(0, 0, 0, 255) + surface.SetTexture(surface.GetTextureID("scope/gdcw_closedsight")) + surface.DrawTexturedRect(self.LensTable.x, self.LensTable.y, self.LensTable.w, self.LensTable.h) + + -- Draw the CHEVRON + surface.SetDrawColor(0, 0, 0, 255) + surface.SetTexture(surface.GetTextureID("scope/gdcw_acogchevron")) + surface.DrawTexturedRect(self.ReticleTable.x, self.ReticleTable.y, self.ReticleTable.w, self.ReticleTable.h) + + -- Draw the ACOG REFERENCE LINES + surface.SetDrawColor(0, 0, 0, 255) + surface.SetTexture(surface.GetTextureID("scope/gdcw_acogcross")) + surface.DrawTexturedRect(self.ReticleTable.x, self.ReticleTable.y, self.ReticleTable.w, self.ReticleTable.h) + end + + if self.Secondary.UseMilDot then + -- Draw the MIL DOT SCOPE + surface.SetDrawColor(0, 0, 0, 255) + surface.SetTexture(surface.GetTextureID("scope/gdcw_scopesight")) + surface.DrawTexturedRect(self.LensTable.x, self.LensTable.y, self.LensTable.w, self.LensTable.h) + end + + if self.Secondary.UseSVD then + -- Draw the SVD SCOPE + surface.SetDrawColor(0, 0, 0, 255) + surface.SetTexture(surface.GetTextureID("scope/gdcw_svdsight")) + surface.DrawTexturedRect(self.LensTable.x, self.LensTable.y, self.LensTable.w, self.LensTable.h) + end + + if self.Secondary.UseParabolic then + -- Draw the PARABOLIC SCOPE + surface.SetDrawColor(0, 0, 0, 255) + surface.SetTexture(surface.GetTextureID("scope/gdcw_parabolicsight")) + surface.DrawTexturedRect(self.LensTable.x, self.LensTable.y, self.LensTable.w, self.LensTable.h) + end + + if self.Secondary.UseElcan then + -- Draw the RETICLE + surface.SetDrawColor(0, 0, 0, 255) + surface.SetTexture(surface.GetTextureID("scope/gdcw_elcanreticle")) + surface.DrawTexturedRect(self.ReticleTable.x, self.ReticleTable.y, self.ReticleTable.w, self.ReticleTable.h) + + -- Draw the ELCAN SCOPE + surface.SetDrawColor(0, 0, 0, 255) + surface.SetTexture(surface.GetTextureID("scope/gdcw_elcansight")) + surface.DrawTexturedRect(self.LensTable.x, self.LensTable.y, self.LensTable.w, self.LensTable.h) + end + + if self.Secondary.UseGreenDuplex then + -- Draw the RETICLE + surface.SetDrawColor(0, 0, 0, 255) + surface.SetTexture(surface.GetTextureID("scope/gdcw_nvgilluminatedduplex")) + surface.DrawTexturedRect(self.ReticleTable.x, self.ReticleTable.y, self.ReticleTable.w, self.ReticleTable.h) + + -- Draw the SCOPE + surface.SetDrawColor(0, 0, 0, 255) + surface.SetTexture(surface.GetTextureID("scope/gdcw_closedsight")) + surface.DrawTexturedRect(self.LensTable.x, self.LensTable.y, self.LensTable.w, self.LensTable.h) + end + + if self.Secondary.UseAimpoint then + -- Draw the RETICLE + surface.SetDrawColor(0, 0, 0, 255) + surface.SetTexture(surface.GetTextureID("scope/aimpoint")) + surface.DrawTexturedRect(self.ReticleTable.x, self.ReticleTable.y, self.ReticleTable.w, self.ReticleTable.h) + + -- Draw the SCOPE + surface.SetDrawColor(0, 0, 0, 255) + surface.SetTexture(surface.GetTextureID("scope/gdcw_closedsight")) + surface.DrawTexturedRect(self.LensTable.x, self.LensTable.y, self.LensTable.w, self.LensTable.h) + + end + + if self.Secondary.UseMatador then + + -- Draw the SCOPE + surface.SetDrawColor(0, 0, 0, 255) + surface.SetTexture(surface.GetTextureID("scope/rocketscope")) + surface.DrawTexturedRect(self.LensTable.x-1, self.LensTable.y, self.LensTable.w, self.LensTable.h) + + end + + end +end + +function SWEP:AdjustMouseSensitivity() + + if self.Owner:KeyDown(IN_ATTACK2) then + return (1/(self.Secondary.ScopeZoom/2)) + else + return 1 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/bobs_shotty_base/cl_init.lua b/ftp_gmstranded/entities/weapons/bobs_shotty_base/cl_init.lua new file mode 100644 index 0000000..cb3dfa3 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/bobs_shotty_base/cl_init.lua @@ -0,0 +1,9 @@ +include('shared.lua') + +SWEP.PrintName = "" // 'Nice' Weapon name (Shown on HUD) +SWEP.Slot = 4 // Slot in the weapon selection menu +SWEP.SlotPos = 1 // Position in the slot +SWEP.DrawAmmo = true // Should draw the default HL2 ammo counter // Should draw the default crosshair +SWEP.DrawWeaponInfoBox = true // Should draw the weapon info box +SWEP.BounceWeaponIcon = true // Should the weapon icon bounce? +SWEP.CSMuzzleFlashes = true
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/bobs_shotty_base/init.lua b/ftp_gmstranded/entities/weapons/bobs_shotty_base/init.lua new file mode 100644 index 0000000..3f157ab --- /dev/null +++ b/ftp_gmstranded/entities/weapons/bobs_shotty_base/init.lua @@ -0,0 +1,17 @@ +AddCSLuaFile( "cl_init.lua" ) +AddCSLuaFile( "shared.lua" ) + +include('shared.lua') + +SWEP.Weight = 30 // Decides whether we should switch from/to this +SWEP.AutoSwitchTo = true // Auto switch to if we pick it up +SWEP.AutoSwitchFrom = true // Auto switch from if you pick up a better weapon + +-- function SWEP:Initialize() +-- end + +function SWEP:OnRemove() +end + + + diff --git a/ftp_gmstranded/entities/weapons/bobs_shotty_base/shared.lua b/ftp_gmstranded/entities/weapons/bobs_shotty_base/shared.lua new file mode 100644 index 0000000..dcfb499 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/bobs_shotty_base/shared.lua @@ -0,0 +1,192 @@ +// Variables that are used on both client and server +-- Major thanks to rm-rf / for thinking up a solution to the reload glitch. Good man! + +SWEP.Category = "" +SWEP.Author = "Generic Default, Worshipper, Clavus, and Bob" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.Base = "bobs_gun_base" +SWEP.MuzzleAttachment = "1" // Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" // Should be "2" for CSS models or "1" for hl2 models +SWEP.DrawCrosshair = true // Hell no, crosshairs r 4 nubz! +SWEP.ViewModelFOV = 65 // How big the gun will look +SWEP.ViewModelFlip = true // True for CSS models, False for HL2 models + +SWEP.Spawnable = false +SWEP.AdminSpawnable = false + +SWEP.Primary.Sound = Sound("") // Sound of the gun +SWEP.Primary.RPM = 0 // This is in Rounds Per Minute +SWEP.Primary.ClipSize = 0 // Size of a clip +SWEP.Primary.DefaultClip = 0 // Default number of bullets in a clip +SWEP.Primary.KickUp = 0 // Maximum up recoil (rise) +SWEP.Primary.KickDown = 0 // Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0 // Maximum side recoil (koolaid) +SWEP.Primary.Automatic = true // Automatic/Semi Auto +SWEP.Primary.Ammo = "none" // What kind of ammo +SWEP.Primary.Reloading = false // Reloading func + +-- SWEP.Secondary.ClipSize = 0 // Size of a clip +-- SWEP.Secondary.DefaultClip = 0 // Default number of bullets in a clip +-- SWEP.Secondary.Automatic = false // Automatic/Semi Auto +SWEP.Secondary.Ammo = "" +SWEP.Secondary.IronFOV = 0 // How much you 'zoom' in. Less is more! + +SWEP.data = {} -- The starting firemode +SWEP.data.ironsights = 1 + +SWEP.IronSightsPos = Vector (2.4537, 1.0923, 0.2696) +SWEP.IronSightsAng = Vector (0.0186, -0.0547, 0) + +SWEP.ShotgunReloading = false +SWEP.ShotgunFinish = 0.5 +SWEP.ShellTime = 0.35 +SWEP.InsertingShell = false + +SWEP.NextReload = 0 + +/*--------------------------------------------------------- + Name: SWEP:Think() + Desc: Called every frame. +---------------------------------------------------------*/ +function SWEP:Think() + if not IsValid(self) then return end + if not IsValid(self.Owner) then return end + if not self.Owner:IsPlayer() then return end + if self.Owner.NextReload == nil then self.Owner.NextReload = CurTime() + 1 end + local timerName = "ShotgunReload_" .. self.Owner:UniqueID() + --if the owner presses shoot while the timer is in effect, then... + if (self.Owner:KeyPressed(IN_ATTACK)) and (self.Weapon:GetNextPrimaryFire() <= CurTime()) and (timer.Exists(timerName)) and not (self.Owner:KeyDown(IN_SPEED)) then + if self:CanPrimaryAttack() then --well first, if we actually can attack, then... + + timer.Destroy(timerName) -- kill the timer, and + self:PrimaryAttack()-- ATTAAAAACK! + + end + end + + if self.InsertingShell == true and self.Owner:Alive() then + vm = self.Owner:GetViewModel()-- its a messy way to do it, but holy shit, it works! + vm:ResetSequence(vm:LookupSequence("after_reload")) -- Fuck you, garry, why the hell can't I reset a sequence in multiplayer? + vm:SetPlaybackRate(.01) -- or if I can, why does facepunch have to be such a shitty community, and your wiki have to be an unreadable goddamn mess? + self.InsertingShell = false -- You get paid for this, what's your excuse? + end + + self:IronSight() + +end + +/*--------------------------------------------------------- + Name: SWEP:Deploy() + Desc: Whip it out. +---------------------------------------------------------*/ +function SWEP:Deploy() + if not IsValid(self) then return end + if not IsValid(self.Owner) then return end + if not self.Owner:IsPlayer() then return end + + self:SetHoldType(self.HoldType) + + local timerName = "ShotgunReload_" .. self.Owner:UniqueID() + if (timer.Exists(timerName)) then + timer.Destroy(timerName) + end + + self.Weapon:SendWeaponAnim(ACT_VM_DRAW) + + self.Weapon:SetNextPrimaryFire(CurTime() + .25) + self.Weapon:SetNextSecondaryFire(CurTime() + .25) + self.ActionDelay = (CurTime() + .25) + + if (SERVER) then + self:SetIronsights(false) + end + + self.Owner.NextReload = CurTime() + 1 + + return true +end + +/*--------------------------------------------------------- + Name: SWEP:Reload() + Desc: Reload is being pressed. +---------------------------------------------------------*/ +function SWEP:Reload() + + if not IsValid(self) then return end + if not IsValid(self.Owner) then return end + if not self.Owner:IsPlayer() then return end + + local maxcap = self.Primary.ClipSize + local spaceavail = self.Weapon:Clip1() + local shellz = (maxcap) - (spaceavail) + 1 + + if (timer.Exists("ShotgunReload_" .. self.Owner:UniqueID())) or self.Owner.NextReload > CurTime() or maxcap == spaceavail then return end + + if self.Owner:IsPlayer() then + + if self.Weapon:GetNextPrimaryFire() <= (CurTime()+2) then + self.Weapon:SetNextPrimaryFire(CurTime() + 2) -- wait TWO seconds before you can shoot again + end + self.Weapon:SendWeaponAnim(ACT_SHOTGUN_RELOAD_START) -- sending start reload anim + self.Owner:SetAnimation( PLAYER_RELOAD ) + + self.Owner.NextReload = CurTime() + 1 + + if (SERVER) then + self.Owner:SetFOV( 0, 0.15 ) + self:SetIronsights(false) + end + + if SERVER and self.Owner:Alive() then + local timerName = "ShotgunReload_" .. self.Owner:UniqueID() + timer.Create(timerName, + (self.ShellTime + .05), + shellz, + function() if not IsValid(self) then return end + if IsValid(self.Owner) and IsValid(self.Weapon) then + if self.Owner:Alive() then + self:InsertShell() + end + end end) + end + + elseif self.Owner:IsNPC() then + self.Weapon:DefaultReload(ACT_VM_RELOAD) + end + +end + +function SWEP:InsertShell() + + if not IsValid(self) then return end + if not IsValid(self.Owner) then return end + if not self.Owner:IsPlayer() then return end + + local timerName = "ShotgunReload_" .. self.Owner:UniqueID() + if self.Owner:Alive() then + local curwep = self.Owner:GetActiveWeapon() + if curwep:GetClass() != self.Gun then + timer.Destroy(timerName) + return end + + if (self.Weapon:Clip1() >= self.Primary.ClipSize or self.Owner:GetAmmoCount(self.Primary.Ammo) <= 0) then + -- if clip is full or ammo is out, then... + self.Weapon:SendWeaponAnim(ACT_SHOTGUN_RELOAD_FINISH) -- send the pump anim + timer.Destroy(timerName) -- kill the timer + elseif (self.Weapon:Clip1() <= self.Primary.ClipSize and self.Owner:GetAmmoCount(self.Primary.Ammo) >= 0) then + self.InsertingShell = true --well, I tried! + timer.Simple( .05, function() self:ShellAnimCaller() end) + self.Owner:RemoveAmmo(1, self.Primary.Ammo, false) -- out of the frying pan + self.Weapon:SetClip1(self.Weapon:Clip1() + 1) -- into the fire + end + else + timer.Destroy(timerName) -- kill the timer + end + +end + +function SWEP:ShellAnimCaller() + self.Weapon:SendWeaponAnim(ACT_VM_RELOAD) +end diff --git a/ftp_gmstranded/entities/weapons/gmod_tool/stools/gms_rope.lua b/ftp_gmstranded/entities/weapons/gmod_tool/stools/gms_rope.lua new file mode 100644 index 0000000..b7cac72 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gmod_tool/stools/gms_rope.lua @@ -0,0 +1,170 @@ + +if ( !GMS ) then TOOL.AddToMenu = false end + +TOOL.Category = "Constraints" +TOOL.Name = "#tool.rope.name" +TOOL.Command = nil +TOOL.ConfigName = nil + +TOOL.ClientConVar[ "forcelimit" ] = "0" +TOOL.ClientConVar[ "addlength" ] = "0" +TOOL.ClientConVar[ "material" ] = "cable/rope" +TOOL.ClientConVar[ "width" ] = "2" +TOOL.ClientConVar[ "rigid" ] = "0" + +function TOOL:LeftClick( trace ) + + if ( trace.Entity:IsValid() && trace.Entity:IsPlayer() ) then return end + + -- If there's no physics object then we can't constraint it! + if ( SERVER && !util.IsValidPhysicsObject( trace.Entity, trace.PhysicsBone ) ) then return false end + + local iNum = self:NumObjects() + + local Phys = trace.Entity:GetPhysicsObjectNum( trace.PhysicsBone ) + self:SetObject( iNum + 1, trace.Entity, trace.HitPos, Phys, trace.PhysicsBone, trace.HitNormal ) + + if ( iNum > 0 ) then + + if ( CLIENT ) then + + self:ClearObjects() + return true + + end + + -- Get client's CVars + local forcelimit = self:GetClientNumber( "forcelimit" ) + local addlength = self:GetClientNumber( "addlength" ) + local material = self:GetClientInfo( "material" ) + local width = self:GetClientNumber( "width" ) + local rigid = self:GetClientNumber( "rigid" ) == 1 + + -- Get information we're about to use + local Ent1, Ent2 = self:GetEnt(1), self:GetEnt(2) + local Bone1, Bone2 = self:GetBone(1), self:GetBone(2) + local WPos1, WPos2 = self:GetPos(1), self:GetPos(2) + local LPos1, LPos2 = self:GetLocalPos(1),self:GetLocalPos(2) + local length = ( WPos1 - WPos2):Length() + + local constraint, rope = constraint.Rope( Ent1, Ent2, Bone1, Bone2, LPos1, LPos2, length, addlength, forcelimit, width, material, rigid ) + + -- Clear the objects so we're ready to go again + self:ClearObjects() + + -- Add The constraint to the players undo table + + undo.Create("Rope") + undo.AddEntity( constraint ) + undo.AddEntity( rope ) + undo.SetPlayer( self:GetOwner() ) + undo.Finish() + + self:GetOwner():AddCleanup( "ropeconstraints", constraint ) + self:GetOwner():AddCleanup( "ropeconstraints", rope ) + if ( GMS ) then self:GetOwner():DecResource( "Rope", 1 ) end + else + + self:SetStage( iNum+1 ) + + end + + return true + +end + +function TOOL:RightClick( trace ) + + if ( trace.Entity:IsValid() && trace.Entity:IsPlayer() ) then return end + + local iNum = self:NumObjects() + + local Phys = trace.Entity:GetPhysicsObjectNum( trace.PhysicsBone ) + self:SetObject( iNum + 1, trace.Entity, trace.HitPos, Phys, trace.PhysicsBone, trace.HitNormal ) + + if ( iNum > 0 ) then + + if ( CLIENT ) then + + self:ClearObjects() + return true + + end + + -- Get client's CVars + local forcelimit = self:GetClientNumber( "forcelimit" ) + local addlength = self:GetClientNumber( "addlength" ) + local material = self:GetClientInfo( "material" ) + local width = self:GetClientNumber( "width" ) + local rigid = self:GetClientNumber( "rigid" ) == 1 + + -- Get information we're about to use + local Ent1, Ent2 = self:GetEnt(1), self:GetEnt(2) + local Bone1, Bone2 = self:GetBone(1), self:GetBone(2) + local WPos1, WPos2 = self:GetPos(1),self:GetPos(2) + local LPos1, LPos2 = self:GetLocalPos(1),self:GetLocalPos(2) + local length = ( WPos1 - WPos2 ):Length() + + local constraint, rope = constraint.Rope( Ent1, Ent2, Bone1, Bone2, LPos1, LPos2, length, addlength, forcelimit, width, material, rigid ) + + -- Clear the objects and set the last object as object 1 + self:ClearObjects() + iNum = self:NumObjects() + self:SetObject( iNum + 1, Ent2, trace.HitPos, Phys, Bone2, trace.HitNormal ) + self:SetStage( iNum+1 ) + + -- Add The constraint to the players undo table + + undo.Create("Rope") + undo.AddEntity( constraint ) + if rope then undo.AddEntity( rope ) end + undo.SetPlayer( self:GetOwner() ) + undo.Finish() + + self:GetOwner():AddCleanup( "ropeconstraints", constraint ) + self:GetOwner():AddCleanup( "ropeconstraints", rope ) + + if ( GMS ) then self:GetOwner():DecResource( "Rope", 1 ) end + else + + self:SetStage( iNum+1 ) + + end + + return true + +end + +function TOOL:Reload( trace ) + + if (!trace.Entity:IsValid() || trace.Entity:IsPlayer() ) then return false end + if ( CLIENT ) then return true end + + local bool = constraint.RemoveConstraints( trace.Entity, "Rope" ) + return bool + + +end + +function TOOL.BuildCPanel( CPanel ) + + CPanel:AddControl( "Header", { Text = "#tool.rope.name", Description = "#tool.rope.help" } ) + + CPanel:AddControl( "ComboBox", + { + Label = "#tool.presets", + MenuButton = 1, + Folder = "rope", + Options = { Default = { rope_forcelimit = '0', rope_addlength='0', rope_width='1', rope_material='cable/rope', rope_rigid='0' } }, + CVars = { "rope_forcelimit", "rope_addlength", "rope_width", "rope_material", "rope_rigid" } + }) + + CPanel:AddControl( "Slider", { Label = "#tool.forcelimit", Type = "Float", Command = "rope_forcelimit", Min = "0", Max = "1000", Help=true } ) + CPanel:AddControl( "Slider", { Label = "#tool.rope.addlength", Type = "Float", Command = "rope_addlength", Min = "-500", Max = "500", Help=true } ) + + CPanel:AddControl( "CheckBox", { Label = "#tool.rope.rigid", Command = "rope_rigid", Help=true } ) + + CPanel:AddControl( "Slider", { Label = "#tool.rope.width", Type = "Float", Command = "rope_width", Min = "0", Max = "10" } ) + CPanel:AddControl( "RopeMaterial", { Label = "#tool.rope.material", convar = "rope_material" } ) + +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/gms_advancedfishingrod.lua b/ftp_gmstranded/entities/weapons/gms_advancedfishingrod.lua new file mode 100644 index 0000000..56f6322 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_advancedfishingrod.lua @@ -0,0 +1,38 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Advanced Fishing Rod" +SWEP.ViewModel = "models/Weapons/v_hands.mdl" +SWEP.WorldModel = "models/props_junk/harpoon002a.mdl" + +SWEP.Purpose = "Used for fishing" +SWEP.Instructions = "Primary fire: Fish from the water" + +SWEP.HoldType = "revolver" +SWEP.NoTraceFix = true +SWEP.HitDistance = 512 +SWEP.Mask = bit.bor( MASK_WATER, MASK_SOLID ) + +function SWEP:PlaySwingSound() + self:PlaySound( "npc/vort/claw_swing" .. math.random( 1, 2 ) .. ".wav" ) +end + +function SWEP:OnHit( tr ) + if ( CLIENT ) then return end + + if ( tr.Hit && ( tr.MatType == MAT_SLOSH || string.find( tr.HitTexture, "water" ) ) ) then + self.Owner:DoProcess( "AdvancedFishing", 6, { + Chance = 70 + } ) + end + +end + +SWEP.FixWorldModel = true +SWEP.FixWorldModelPos = Vector( 30, 2.5, -1 ) +SWEP.FixWorldModelAng = Angle( 90, 0, 90 ) +SWEP.FixWorldModelScale = 1 diff --git a/ftp_gmstranded/entities/weapons/gms_base_weapon.lua b/ftp_gmstranded/entities/weapons/gms_base_weapon.lua new file mode 100644 index 0000000..ec4124a --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_base_weapon.lua @@ -0,0 +1,275 @@ + +AddCSLuaFile() + +SWEP.PrintName = "GMS Base Weapon" +SWEP.Author = "Stranded Team" +SWEP.Contact = "" + +SWEP.AutoSwitchTo = false +SWEP.AutoSwitchFrom = false +SWEP.DrawAmmo = false +SWEP.ViewModelFOV = 54 +SWEP.Slot = 0 +SWEP.SlotPos = 1 + +SWEP.Spawnable = false + +SWEP.Primary.Damage = 4 +SWEP.Primary.Delay = 0.7 +SWEP.Primary.ClipSize = -1 +SWEP.Primary.DefaultClip = -1 +SWEP.Primary.Automatic = true +SWEP.Primary.Ammo = "none" + +SWEP.Secondary.ClipSize = -1 +SWEP.Secondary.DefaultClip = -1 +SWEP.Secondary.Automatic = true +SWEP.Secondary.Ammo = "none" + +SWEP.HoldType = "fist" +SWEP.Skin = 0 +SWEP.HitDistance = 75 + +function SWEP:Initialize() + self:SetWeaponHoldType( self.HoldType ) + if ( self.Skin ) then self:SetSkin( self.Skin ) end +end + +function SWEP:SecondaryAttack() +end + +function SWEP:Reload() +end + +function SWEP:PreDrawViewModel( vm ) + if ( self.Skin && IsValid( vm ) ) then vm:SetSkin( self.Skin ) end +end + +function SWEP:Deploy() + self:SendWeaponAnim( ACT_VM_DRAW ) + + self:Idle() + + return true +end + +function SWEP:Holster() + if ( self.Owner.InProcess || ProcessCompleteTime ) then return false end + if ( self.Skin && self.Owner.GetViewModel && IsValid( self.Owner:GetViewModel() ) ) then self.Owner:GetViewModel():SetSkin( 0 ) end + + timer.Destroy( "rb655_idle" .. self:EntIndex() ) + + return true +end + +function SWEP:Equip( newOwner ) + SPropProtection.PlayerMakePropOwner( newOwner, self ) +end + +function SWEP:OnDrop() + timer.Destroy( "rb655_idle" .. self:EntIndex() ) +end + +function SWEP:PrimaryAttack() + + local tr = util.TraceLine( { + start = self.Owner:GetShootPos(), + endpos = self.Owner:GetShootPos() + self.Owner:GetAimVector() * self.HitDistance, + filter = self.Owner, + mask = self.Mask + } ) + + if ( !IsValid( tr.Entity ) && !self.NoTraceFix ) then + tr = util.TraceHull( { + start = self.Owner:GetShootPos(), + endpos = self.Owner:GetShootPos() + self.Owner:GetAimVector() * self.HitDistance, + filter = self.Owner, + mask = self.Mask + } ) + end + + if ( tr.Hit ) then + self:OnHit( tr ) + elseif ( tr.HitWorld ) then + self:PlayHitSound() + end + + self:DoEffects( tr ) + + self:SetNextPrimaryFire( CurTime() + self.Primary.Delay ) + self:SetNextSecondaryFire( CurTime() + self.Primary.Delay ) + +end + +function SWEP:DoImpactEffects( tr ) + if ( !tr.MatType ) then return end + if ( tr.MatType == MAT_GRATE ) then tr.Entity:EmitSound( "physics/metal/metal_chainlink_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) return end + + local vecSrc = tr.StartPos + local vecDirection = tr.Normal + local pPlayer = self.Owner + + if ( pPlayer && pPlayer:IsPlayer() ) then + vecSrc = pPlayer:GetShootPos() + vecDirection = pPlayer:GetAimVector() + else + pPlayer = GetWorldEntity() + end + + local bullet = {} + bullet.Src = vecSrc + bullet.Dir = vecDirection + bullet.Num = 1 + bullet.Damage = 0 + bullet.Force = 0 + bullet.Tracer = 0 + bullet.Callback = function( attacker, tr, dmginfo ) + local doEffects = true + if ( tr.HitPos:Distance( vecSrc ) > self.HitDistance ) then doEffects = false end + if ( tr.HitPos:Distance( vecSrc ) > 96 ) then doEffects = false end + + return { + damage = false, + effects = doEffects + } + end + + pPlayer:FireBullets( bullet ) +end + +function SWEP:DoEffects( tr ) + if ( IsFirstTimePredicted() ) then + self:PlaySwingAnimation( !tr.Hit ) + self:PlaySwingSound() + self.Owner:SetAnimation( PLAYER_ATTACK1 ) + self:DoImpactEffects( tr ) + end +end + +function SWEP:PlaySound( snd ) + if ( CLIENT ) then return end + self.Owner:EmitSound( snd ) +end + +function SWEP:PlaySwingAnimation( missed ) + timer.Destroy( "rb655_idle" .. self:EntIndex() ) + self:DoAnimation( missed ) + self:Idle() +end + +function SWEP:DoAnimation( missed ) + if ( missed ) then self:SendWeaponAnim( ACT_VM_MISSCENTER ) return end + self:SendWeaponAnim( ACT_VM_HITCENTER ) +end + +function SWEP:OnHit( tr ) + local ent = tr.Entity + if ( !IsValid( ent ) ) then self:PlayHitSound() return end + if ( CLIENT ) then return end + + if ( ent:Health() > 0 ) then + if ( ent:IsNPC() || ( ent:IsPlayer() && GetConVarNumber( "gms_PVPDamage" ) > 0 ) ) then ent:TakeDamage( self.Primary.Damage, self.Owner, self ) end + self:PlayHitSound() + else + self:DoToolHit( ent ) + end +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsTreeModel() ) then + self.Owner:DoProcess( "WoodCutting", 3, { + Entity = ent, + Chance = 33, + MinAmount = 1, + MaxAmount = 3 + } ) + elseif ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 3, { + Entity = ent, + Chance = 33, + MinAmount = 1, + MaxAmount = 2 + } ) + else + self:PlayHitSound() + end +end + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/slam/throw.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "Flesh.ImpactHard" ) +end + +function SWEP:DoIdleAnimation() + self:SendWeaponAnim( ACT_VM_IDLE ) +end + +--------------------- IDLE ANIMS --------------------- + +function SWEP:DoIdle() + self:DoIdleAnimation() + timer.Adjust( "rb655_idle" .. self:EntIndex(), self:GetAnimationTime(), 0, function() + if ( !IsValid( self ) ) then timer.Destroy( "rb655_idle" .. self:EntIndex() ) return end + self:DoIdleAnimation() + end ) +end + +function SWEP:GetAnimationTime() + local time = self:SequenceDuration() + if ( time == 0 ) then time = self.Owner:GetViewModel():SequenceDuration() end + return time +end + +function SWEP:Idle() + if ( CLIENT ) then return end + timer.Create( "rb655_idle" .. self:EntIndex(), self:GetAnimationTime(), 1, function() + if ( !IsValid( self ) ) then return end + self:DoIdle() + end ) +end + +if ( SERVER ) then return end + +SWEP.FixWorldModel = false +SWEP.FixWorldModelPos = Vector( 0, 0, 0 ) +SWEP.FixWorldModelAng = Angle( 0, 0, 0 ) +SWEP.FixWorldModelScale = 1 + +function SWEP:RevertModel() + self:SetRenderOrigin( self:GetNetworkOrigin() ) + self:SetRenderAngles( self:GetNetworkAngles() ) +end + +function SWEP:DoFixWorldModel() + if ( !self.FixWorldModel ) then return end + if ( !IsValid( self.Owner ) ) then self:RevertModel() return end + + local bone = self.Owner:LookupBone( "ValveBiped.Bip01_R_Hand" ) + if ( !bone ) then self:RevertModel() return end + + local pos, ang = self.Owner:GetBonePosition( bone ) + ang:RotateAroundAxis( ang:Forward(), 180 ) + + ang:RotateAroundAxis( ang:Forward(), self.FixWorldModelAng.p ) + ang:RotateAroundAxis( ang:Right(), self.FixWorldModelAng.y ) + ang:RotateAroundAxis( ang:Up(), self.FixWorldModelAng.r ) + + pos = pos + ang:Forward() * self.FixWorldModelPos.x + ang:Right() * self.FixWorldModelPos.y + ang:Up() * self.FixWorldModelPos.z + + self:SetModelScale( self.FixWorldModelScale, 0 ) + + self:SetRenderOrigin( pos ) + self:SetRenderAngles( ang ) +end + +function SWEP:DrawWorldModel() + self:DoFixWorldModel() + self:DrawModel() +end + +function SWEP:DrawWorldModelTranslucent() + self:DrawWorldModel() +end diff --git a/ftp_gmstranded/entities/weapons/gms_bucket.lua b/ftp_gmstranded/entities/weapons/gms_bucket.lua new file mode 100644 index 0000000..191ba09 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_bucket.lua @@ -0,0 +1,23 @@ + +AddCSLuaFile() + +SWEP.Slot = 2 +SWEP.SlotPos = 5 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Bucket" +SWEP.ViewModel = "models/Weapons/v_hands.mdl" +SWEP.WorldModel = "models/gmod_tower/kfcbucket.mdl" + +SWEP.Purpose = "Get 10 water bottles at a time!" +SWEP.Instructions = "Bottle water faster" + +SWEP.HoldType = "knife" + +function SWEP:PrimaryAttack() +end + +SWEP.FixWorldModel = true +SWEP.FixWorldModelPos = Vector( -1.5, 1, 1 ) +SWEP.FixWorldModelAng = Angle( 90, 180, 180 ) +SWEP.FixWorldModelScale = 1 diff --git a/ftp_gmstranded/entities/weapons/gms_chisel.lua b/ftp_gmstranded/entities/weapons/gms_chisel.lua new file mode 100644 index 0000000..0355b49 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_chisel.lua @@ -0,0 +1,34 @@ + +AddCSLuaFile() + +SWEP.Slot = 2 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Chisel" +SWEP.ViewModel = "models/Weapons/v_hands.mdl" +SWEP.WorldModel = "models/props_c17/TrapPropeller_Lever.mdl" + +SWEP.Purpose = "Effective Cutting Stone" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "knife" + +SWEP.FixWorldModel = true +SWEP.FixWorldModelPos = Vector( 3.5,3,1) +SWEP.FixWorldModelAng = Angle( 90, 180, 180 ) +SWEP.FixWorldModelScale = 0.8 + + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 50, + MinAmount = 5, + MaxAmount = 10, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_copperhatchet.lua b/ftp_gmstranded/entities/weapons/gms_copperhatchet.lua new file mode 100644 index 0000000..e0a7954 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_copperhatchet.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 4 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Copper Hatchet" +SWEP.ViewModel = "models/weapons/c_gms_hatchet.mdl" +SWEP.WorldModel = "models/weapons/w_gms_hatchet.mdl" + +SWEP.Purpose = "Effective woodcutting tool" +SWEP.Instructions = "Primary fire: Chop wood from a tree" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 7 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 1 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsTreeModel() or ent:GetClass() == "gms_tree" ) then + self.Owner:DoProcess( "WoodCutting", 2, { + Entity = ent, + Chance = 60, + MinAmount = 2, + MaxAmount = 9, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_copperpickaxe.lua b/ftp_gmstranded/entities/weapons/gms_copperpickaxe.lua new file mode 100644 index 0000000..634f6d9 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_copperpickaxe.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Copper Pickaxe" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 7 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 1 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 60, + MinAmount = 2, + MaxAmount = 9, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_essencedrainer.lua b/ftp_gmstranded/entities/weapons/gms_essencedrainer.lua new file mode 100644 index 0000000..c23f65d --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_essencedrainer.lua @@ -0,0 +1,38 @@ + +AddCSLuaFile() + +SWEP.Slot = 2 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Essence Drainer" +SWEP.ViewModel = "models/Weapons/v_hands.mdl" +SWEP.WorldModel = "models/props_combine/breentp_rings.mdl" + +SWEP.Purpose = "Drain the essence of things around you" +SWEP.Instructions = "Primary fire: essence drain" + +SWEP.HoldType = "slam" + +SWEP.Primary.Damage = 0 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +SWEP.FixWorldModel = true +SWEP.FixWorldModelPos = Vector( 4, -3.5, 3.5 ) +SWEP.FixWorldModelAng = Angle( 180, 180, 180 ) +SWEP.FixWorldModelScale = 0.05 + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 25, + MinAmount = 1, + MaxAmount = 1, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_fists.lua b/ftp_gmstranded/entities/weapons/gms_fists.lua new file mode 100644 index 0000000..ad9b81c --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_fists.lua @@ -0,0 +1,39 @@ + +AddCSLuaFile() + +SWEP.Slot = 1 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Fists" +SWEP.ViewModel = "models/weapons/v_gms_fists.mdl" +SWEP.WorldModel = "" + +SWEP.Purpose = "Pick up stuff, as well as poor harvesting." +SWEP.Instructions = "Primary fire: Attack/Harvest" +SWEP.HitDistance = 54 + +function SWEP:DoAnimation() + self:SendWeaponAnim( ACT_VM_HITCENTER ) +end + + +function SWEP:DoToolHit( ent ) + if ( ent:GetClass() == "gms_tree" || ent:IsTreeModel() ) then + self.Owner:DoProcess( "WoodCutting", 2, { + Entity = ent, + Chance = 20, + MinAmount = 1, + MaxAmount = 3 + } ) + elseif ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 20, + MinAmount = 1, + MaxAmount = 3 + } ) + else + self:PlayHitSound() + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/gms_fryingpan.lua b/ftp_gmstranded/entities/weapons/gms_fryingpan.lua new file mode 100644 index 0000000..7c9f530 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_fryingpan.lua @@ -0,0 +1,23 @@ + +AddCSLuaFile() + +SWEP.Slot = 2 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Frying Pan" +SWEP.ViewModel = "models/Weapons/v_hands.mdl" +SWEP.WorldModel = "models/props_c17/metalPot002a.mdl" + +SWEP.Purpose = "Shortens down cooking times" +SWEP.Instructions = "Cook normally" + +SWEP.HoldType = "knife" + +function SWEP:PrimaryAttack() +end + +SWEP.FixWorldModel = true +SWEP.FixWorldModelPos = Vector( 10, -1, -3.7 ) +SWEP.FixWorldModelAng = Angle( 0, 90, 0 ) +SWEP.FixWorldModelScale = 1 diff --git a/ftp_gmstranded/entities/weapons/gms_goldhatchet.lua b/ftp_gmstranded/entities/weapons/gms_goldhatchet.lua new file mode 100644 index 0000000..8d350ae --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_goldhatchet.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 4 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Gold Hatchet" +SWEP.ViewModel = "models/weapons/c_gms_hatchet.mdl" +SWEP.WorldModel = "models/weapons/w_gms_hatchet.mdl" + +SWEP.Purpose = "Effective woodcutting tool" +SWEP.Instructions = "Primary fire: Chop wood from a tree" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 9 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsTreeModel() or ent:GetClass() == "gms_tree" ) then + self.Owner:DoProcess( "WoodCutting", 2, { + Entity = ent, + Chance = 85, + MinAmount = 5, + MaxAmount = 21, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_goldpickaxe.lua b/ftp_gmstranded/entities/weapons/gms_goldpickaxe.lua new file mode 100644 index 0000000..6a3a993 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_goldpickaxe.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Gold Pickaxe" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 9 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 85, + MinAmount = 5, + MaxAmount = 21, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_hands.lua b/ftp_gmstranded/entities/weapons/gms_hands.lua new file mode 100644 index 0000000..3067424 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_hands.lua @@ -0,0 +1,17 @@ + +AddCSLuaFile() + +SWEP.Slot = 1 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Fists" +SWEP.ViewModel = "models/weapons/v_gms_fists.mdl" +SWEP.WorldModel = "" + +SWEP.Purpose = "Pick up stuff, as well as poor harvesting." +SWEP.Instructions = "Primary fire: Attack/Harvest" + +function SWEP:DoAnimation() + self:SendWeaponAnim( ACT_VM_HITCENTER ) +end diff --git a/ftp_gmstranded/entities/weapons/gms_inventory.lua b/ftp_gmstranded/entities/weapons/gms_inventory.lua new file mode 100644 index 0000000..15aaa27 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_inventory.lua @@ -0,0 +1,277 @@ + +AddCSLuaFile() + +SWEP.Slot = 2 +SWEP.SlotPos = 5 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Inventory" +SWEP.ViewModel = "models/Weapons/v_hands.mdl" +SWEP.WorldModel = "models/props_c17/tools_wrench01a.mdl" + +SWEP.Purpose = "Lets the user keep structures on them for a certain amount of time." +SWEP.Instructions = "Left click on a structure to pick up a structure." + +SWEP.HoldType = "knife" + +SWEP.Structures = {} +SWEP.StructureModels = {} + +local active = false + +// setting time to 0 will make it unlimited + +local dSlot = 4 +local dTime = 24 + +group = { + + { + + rank = "superadmin", + slot = 8, + time = 0, + }, + + { + + rank = "admin", + slot = 8, + time = 0, + + }, + + +} + +SWEP.FixWorldModel = true +SWEP.FixWorldModelPos = Vector( -1.5, 1, -3 ) +SWEP.FixWorldModelAng = Angle( 90, 90, 0 ) +SWEP.FixWorldModelScale = 1 + +local strTBL = {} +local mdlTBL = {} + +if (SERVER) then + +util.AddNetworkString('invStructures') +util.AddNetworkString('createEntity') + +net.Receive('createEntity', function(len, pl) + + strTBL = net.ReadTable() + local slot = net.ReadInt(32) + mdlTBL = net.ReadTable() + + local tr = pl:TraceFromEyes( 200 ) + local loc = tr.HitPos + Vector( 0, 0, 10 ) + + + + + mbEnt=ents.Create(strTBL[slot]) + + if ( strTBL[slot] == "gms_fridge" ) then loc = loc + (mbEnt:GetUp() * 50) else mbEnt:DropToGround() end + + mbEnt:SetModel(mdlTBL[slot]) + mbEnt:SetPos(loc) + mbEnt:Spawn() + SPropProtection.PlayerMakePropOwner( pl, mbEnt ) + + pl:PrintMessage(HUD_PRINTTALK, strTBL[slot]) + pl:PrintMessage(HUD_PRINTTALK, slot) + pl:PrintMessage(HUD_PRINTTALK, mdlTBL[slot]) + + table.remove(strTBL,slot) + table.remove(mdlTBL, slot) + + + +end) + +function SWEP:Think() + + self.Structures = strTBL + self.StructureModels = mdlTBL + +end + +function SWEP:PrimaryAttack() + + self.Structures = strTBL + + local ent = self.Owner:GetEyeTrace().Entity + if ( SPropProtection.PlayerIsPropOwner( self.Owner, ent ) ) then + table.insert(self.Structures, ent:GetClass()) + table.insert(self.StructureModels, ent:GetModel()) + ent:Remove() + + net.Start('invStructures') + + net.WriteTable(self.Structures) + net.WriteTable(self.StructureModels) + + net.Send(self.Owner) + + end + +end + + +end + + + +if (CLIENT) then + +local StructuresTbl = strTBL +local StructureModelsTbl = mdlTBL + +function SWEP:SecondaryAttack() + + net.Receive('invStructures', function(len, pl) + StructuresTbl = net.ReadTable() + StructureModelsTbl = net.ReadTable() + //PrintTable(StructuresTbl) + end) + + if ( active == false ) then + local df = vgui.Create("invPanel") + active = true + end + +end + + + +local PANEL = {} + +function PANEL:Init() + self:SetTitle("") + + rowAmount = 1 + + for k,v in pairs( group ) do + if (LocalPlayer():IsUserGroup(v['rank'])) then + dSlot = v['slot'] + dTime = v['time'] + end + + end + + for i=1,dSlot do + if (i % 5 == 0) then rowAmount=rowAmount+1 end + end + + OffSet = 5 + + self:SetSize(400 + (OffSet*5),(rowAmount*100) + (OffSet*(rowAmount+1)) + 20) + self:SetPos((ScrW()/2)-(self:GetWide()/2),ScrH()-self:GetTall()) + self:ShowCloseButton(true) + gui.EnableScreenClicker(true) + + + row = 1 + col = 1 + + + + for i=1,dSlot do + local button = vgui.Create("slotPanel", self) + + print(StructuresTbl[i]) + + if (StructuresTbl[i] != nil and StructureModelsTbl[i] != nil) then + + + local icon = vgui.Create( "DModelPanel", button ) + icon:SetSize( 100, 150 ); + icon:SetCamPos( Vector( 50,50,50 ) ); + icon:SetLookAt( Vector( 0, 0, -40 ) ); + //icon:SetLookAt( Vector( right, left, up/down ) ); + icon:SetModel( StructureModelsTbl[i] ) + icon:SetText(tostring(StructuresTbl[i])) + + icon.DoClick = function() + + local mb = DermaMenu() + + mb:AddOption("Drop", function() + + net.Start('createEntity') + + net.WriteTable( StructuresTbl ) + net.WriteInt( i, 32 ) + net.WriteTable( StructureModelsTbl ) + + net.SendToServer() + + table.remove( StructuresTbl, i ) + table.remove( StructureModelsTbl, i ) + + self:Close() + local df = vgui.Create("invPanel") + active = true + + end) + + mb:Open() + + end + end + + + if (i/4 <= col) then + + button:SetPos((row-1)*button:GetWide() + (OffSet*row),(col-1)*button:GetTall() + (OffSet*col) + 20) + row=row+1 + + else + + row=1 + col=col+1 + button:SetPos((row-1)*button:GetWide() + (OffSet*row),(col-1)*button:GetTall() + (OffSet*col) + 20) + row=row+1 + + end + end + +end + +function PANEL:Paint(w,h) + if (!LocalPlayer():HasWeapon("gms_inventory")) then return end + if (LocalPlayer():GetActiveWeapon():GetClass() != "gms_inventory") then + self:Close() + end + + draw.RoundedBox( 0, 0, 0, w, h, Color( 48, 48, 48, 255 ) ) + +end + +function PANEL:Close() + active = false + gui.EnableScreenClicker( false ) + self:Remove() +end + +vgui.Register("invPanel", PANEL, "DFrame") + +local PANEL = {} + +function PANEL:Init() + + self:SetSize(100,100) + self:SetPos(0,0) + self:SetText("") + +end + +function PANEL:Paint(w,h) + if (!LocalPlayer():HasWeapon("gms_inventory")) then return end + draw.RoundedBox( 0, 0, 0, w, h, Color( 24, 24, 24, 255 ) ) + +end + +vgui.Register("slotPanel", PANEL, "DButton") + +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/gms_ironhatchet.lua b/ftp_gmstranded/entities/weapons/gms_ironhatchet.lua new file mode 100644 index 0000000..656878e --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_ironhatchet.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 4 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Iron Hatchet" +SWEP.ViewModel = "models/weapons/c_gms_hatchet.mdl" +SWEP.WorldModel = "models/weapons/w_gms_hatchet.mdl" + +SWEP.Purpose = "Effective woodcutting tool" +SWEP.Instructions = "Primary fire: Chop wood from a tree" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 8 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsTreeModel() or ent:GetClass() == "gms_tree" ) then + self.Owner:DoProcess( "WoodCutting", 2, { + Entity = ent, + Chance = 70, + MinAmount = 3, + MaxAmount = 12, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_ironpickaxe.lua b/ftp_gmstranded/entities/weapons/gms_ironpickaxe.lua new file mode 100644 index 0000000..79427e6 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_ironpickaxe.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Iron Pickaxe" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 8 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 70, + MinAmount = 3, + MaxAmount = 12, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_mithrilpickaxe.lua b/ftp_gmstranded/entities/weapons/gms_mithrilpickaxe.lua new file mode 100644 index 0000000..2326d8e --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_mithrilpickaxe.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Mithril Pickaxe" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 10 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 100, + MinAmount = 10, + MaxAmount = 33, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_pickaxeofdjarex.lua b/ftp_gmstranded/entities/weapons/gms_pickaxeofdjarex.lua new file mode 100644 index 0000000..d1411b1 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_pickaxeofdjarex.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Pickaxe of Djarex" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 10 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 50, + MinAmount = 1, + MaxAmount = 10, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_platinumhatchet.lua b/ftp_gmstranded/entities/weapons/gms_platinumhatchet.lua new file mode 100644 index 0000000..2a8d14c --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_platinumhatchet.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 4 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Platinum Hatchet" +SWEP.ViewModel = "models/weapons/c_gms_hatchet.mdl" +SWEP.WorldModel = "models/weapons/w_gms_hatchet.mdl" + +SWEP.Purpose = "Effective woodcutting tool" +SWEP.Instructions = "Primary fire: Chop wood from a tree" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 10 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsTreeModel() or ent:GetClass() == "gms_tree" ) then + self.Owner:DoProcess( "WoodCutting", 2, { + Entity = ent, + Chance = 100, + MinAmount = 7, + MaxAmount = 24, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_platinumpickaxe.lua b/ftp_gmstranded/entities/weapons/gms_platinumpickaxe.lua new file mode 100644 index 0000000..33f89b5 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_platinumpickaxe.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Platinum Pickaxe" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 10 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 100, + MinAmount = 7, + MaxAmount = 24, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_runeapickaxe.lua b/ftp_gmstranded/entities/weapons/gms_runeapickaxe.lua new file mode 100644 index 0000000..18455bf --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_runeapickaxe.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Air Rune Pickaxe" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 10 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 100, + MinAmount = 5, + MaxAmount = 18, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_runeepickaxe.lua b/ftp_gmstranded/entities/weapons/gms_runeepickaxe.lua new file mode 100644 index 0000000..c0429f5 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_runeepickaxe.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Earth Rune Pickaxe" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 10 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 100, + MinAmount = 20, + MaxAmount = 42, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_runefpickaxe.lua b/ftp_gmstranded/entities/weapons/gms_runefpickaxe.lua new file mode 100644 index 0000000..db208b2 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_runefpickaxe.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Fire Rune Pickaxe" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 10 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 100, + MinAmount = 10, + MaxAmount = 20, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_runewpickaxe.lua b/ftp_gmstranded/entities/weapons/gms_runewpickaxe.lua new file mode 100644 index 0000000..9571432 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_runewpickaxe.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Water Rune Pickaxe" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 10 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 100, + MinAmount = 10, + MaxAmount = 20, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_shovel.lua b/ftp_gmstranded/entities/weapons/gms_shovel.lua new file mode 100644 index 0000000..8c64910 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_shovel.lua @@ -0,0 +1,69 @@ + +AddCSLuaFile() + +SWEP.Slot = 2 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Shovel" +SWEP.ViewModel = "models/weapons/c_gms_shovel.mdl" +SWEP.WorldModel = "models/weapons/w_gms_shovel.mdl" + +SWEP.Purpose = "Dig" +SWEP.Instructions = "Use primary to dig" + +SWEP.HoldType = "melee" +SWEP.UseHands = true + +SWEP.Primary.Damage = 10 +SWEP.Primary.Delay = 1.5 +SWEP.HitDistance = 92 + +function SWEP:PlaySwingSound() + self:PlaySound( "npc/vort/claw_swing" .. math.random( 1, 2 ) .. ".wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "weapons/gms_shovel" .. math.random( 1, 4 ) .. ".wav" ) +end + +function SWEP:OnHit( tr ) + + local ent = tr.Entity + if ( SERVER && ent:Health() > 0 ) then + if ( ent:IsNPC() ) then ent:TakeDamage( self.Primary.Damage, self.Owner, self ) end + self:PlayHitSound() + end + + if ( !tr.HitWorld || CLIENT ) then + if ( tr.Hit && SERVER ) then self:PlayHitSound() end + return end + + if ( tr.MatType == MAT_DIRT || tr.MatType == MAT_GRASS || tr.MatType == MAT_SAND ) then + self.Owner:DoProcess( "Dig", 5, { + Sand = ( tr.MatType == MAT_SAND ) + } ) + else + self.Owner:SendMessage( "Can't dig on this terrain!", 3, Color( 200, 0, 0, 255 ) ) + self:PlayHitSound() + end + +end + +function SWEP:DoAnimation( missed ) + if ( missed ) then self:SendWeaponAnim( ACT_VM_MISSCENTER ) return end + self:SendWeaponAnim( ACT_VM_HITCENTER ) +end + +function SWEP:DoEffects( tr ) + if ( IsFirstTimePredicted() ) then + self:PlaySwingAnimation( !tr.HitWorld ) + self:PlaySwingSound() + self.Owner:SetAnimation( PLAYER_ATTACK1 ) + if ( !tr.HitWorld || ( tr.MatType != MAT_DIRT && tr.MatType != MAT_GRASS && tr.MatType != MAT_SAND ) ) then + self:DoImpactEffects( tr ) + else + util.Decal( "impact.sand", tr.HitPos + tr.HitNormal, tr.HitPos - tr.HitNormal ) + end + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_sickle.lua b/ftp_gmstranded/entities/weapons/gms_sickle.lua new file mode 100644 index 0000000..801f564 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_sickle.lua @@ -0,0 +1,23 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Sickle" +SWEP.ViewModel = "models/Weapons/v_hands.mdl" +SWEP.WorldModel = "models/props_c17/tools_pliers01a.mdl" + +SWEP.Purpose = "Effectivizes harvesting processes" +SWEP.Instructions = "Harvest when active" + +SWEP.HoldType = "melee" + +function SWEP:PrimaryAttack() +end + +SWEP.FixWorldModel = true +SWEP.FixWorldModelPos = Vector( 5, -3, -2 ) +SWEP.FixWorldModelAng = Angle( 90, 0, -10 ) +SWEP.FixWorldModelScale = 1 diff --git a/ftp_gmstranded/entities/weapons/gms_silverhatchet.lua b/ftp_gmstranded/entities/weapons/gms_silverhatchet.lua new file mode 100644 index 0000000..9889131 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_silverhatchet.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 4 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Silver Hatchet" +SWEP.ViewModel = "models/weapons/c_gms_hatchet.mdl" +SWEP.WorldModel = "models/weapons/w_gms_hatchet.mdl" + +SWEP.Purpose = "Effective woodcutting tool" +SWEP.Instructions = "Primary fire: Chop wood from a tree" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 9 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsTreeModel() or ent:GetClass() == "gms_tree" ) then + self.Owner:DoProcess( "WoodCutting", 2, { + Entity = ent, + Chance = 80, + MinAmount = 4, + MaxAmount = 18, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_silverpickaxe.lua b/ftp_gmstranded/entities/weapons/gms_silverpickaxe.lua new file mode 100644 index 0000000..ef75952 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_silverpickaxe.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Silver Pickaxe" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 9 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 80, + MinAmount = 4, + MaxAmount = 18, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_steelhatchet.lua b/ftp_gmstranded/entities/weapons/gms_steelhatchet.lua new file mode 100644 index 0000000..02c570c --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_steelhatchet.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 4 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Steel Hatchet" +SWEP.ViewModel = "models/weapons/c_gms_hatchet.mdl" +SWEP.WorldModel = "models/weapons/w_gms_hatchet.mdl" + +SWEP.Purpose = "Effective woodcutting tool" +SWEP.Instructions = "Primary fire: Chop wood from a tree" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 10 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsTreeModel() or ent:GetClass() == "gms_tree" ) then + self.Owner:DoProcess( "WoodCutting", 2, { + Entity = ent, + Chance = 90, + MinAmount = 6, + MaxAmount = 21, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_steelpickaxe.lua b/ftp_gmstranded/entities/weapons/gms_steelpickaxe.lua new file mode 100644 index 0000000..a60066f --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_steelpickaxe.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Steel Pickaxe" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 10 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 90, + MinAmount = 6, + MaxAmount = 21, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_stonehatchet.lua b/ftp_gmstranded/entities/weapons/gms_stonehatchet.lua new file mode 100644 index 0000000..980b44c --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_stonehatchet.lua @@ -0,0 +1,40 @@ + +AddCSLuaFile() + +SWEP.Slot = 4 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Stone Hatchet" +SWEP.ViewModel = "models/weapons/c_gms_hatchet.mdl" +SWEP.WorldModel = "models/weapons/w_gms_hatchet.mdl" + +SWEP.Purpose = "Effective woodcutting tool" +SWEP.Instructions = "Primary fire: Chop wood from a tree" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 7 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsTreeModel() or ent:GetClass() == "gms_tree" ) then + self.Owner:DoProcess( "WoodCutting", 2, { + Entity = ent, + Chance = 50, + MinAmount = 1, + MaxAmount = 6, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_stonepickaxe.lua b/ftp_gmstranded/entities/weapons/gms_stonepickaxe.lua new file mode 100644 index 0000000..6cec759 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_stonepickaxe.lua @@ -0,0 +1,40 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Stone Pickaxe" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool, allows you to mine Copper Ore" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 7 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 50, + MinAmount = 1, + MaxAmount = 6, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_strainer.lua b/ftp_gmstranded/entities/weapons/gms_strainer.lua new file mode 100644 index 0000000..03edd78 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_strainer.lua @@ -0,0 +1,30 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Strainer" +SWEP.ViewModel = "models/Weapons/v_hands.mdl" +SWEP.WorldModel = "models/props_junk/PlasticCrate01a.mdl" + +SWEP.Purpose = "Get fine materials" +SWEP.Instructions = "Use on/with some materials to filter them" + +SWEP.HoldType = "slam" + +function SWEP:OnHit( tr ) + + if ( !tr.HitWorld || CLIENT ) then return end + + if ( tr.MatType == MAT_DIRT || tr.MatType == MAT_GRASS || tr.MatType == MAT_SAND ) then + self.Owner:DoProcess( "FilterGround", 3 ) + end + +end + +SWEP.FixWorldModel = true +SWEP.FixWorldModelPos = Vector( 2, -10, 0 ) +SWEP.FixWorldModelAng = Angle( 30, 30, 0 ) +SWEP.FixWorldModelScale = 0.6 diff --git a/ftp_gmstranded/entities/weapons/gms_techhatchet.lua b/ftp_gmstranded/entities/weapons/gms_techhatchet.lua new file mode 100644 index 0000000..3b5cc4b --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_techhatchet.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 4 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Tech Hatchet" +SWEP.ViewModel = "models/weapons/c_gms_hatchet.mdl" +SWEP.WorldModel = "models/weapons/w_gms_hatchet.mdl" + +SWEP.Purpose = "Effective woodcutting tool" +SWEP.Instructions = "Primary fire: Chop wood from a tree" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 8 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsTreeModel() or ent:GetClass() == "gms_tree" ) then + self.Owner:DoProcess( "WoodCutting", 2, { + Entity = ent, + Chance = 75, + MinAmount = 4, + MaxAmount = 15, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_techpickaxe.lua b/ftp_gmstranded/entities/weapons/gms_techpickaxe.lua new file mode 100644 index 0000000..0154a56 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_techpickaxe.lua @@ -0,0 +1,41 @@ + +AddCSLuaFile() + +SWEP.Slot = 3 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Tech Pickaxe" +SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl" +SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl" + +SWEP.Purpose = "Effective mining tool" +SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface" + +SWEP.HoldType = "melee" + +SWEP.Primary.Damage = 8 +SWEP.Primary.Delay = 1 +SWEP.UseHands = true +SWEP.Skin = 2 + +function SWEP:PlaySwingSound() + self:PlaySound( "weapons/iceaxe/iceaxe_swing1.wav" ) +end + +function SWEP:PlayHitSound() + self:PlaySound( "physics/glass/glass_bottle_impact_hard" .. math.random( 1, 3 ) .. ".wav" ) +end + +function SWEP:DoToolHit( ent ) + if ( ent:IsRockModel() ) then + self.Owner:DoProcess( "Mining", 2, { + Entity = ent, + Chance = 75, + MinAmount = 4, + MaxAmount = 15, + } ) + else + self:PlayHitSound() + end +end diff --git a/ftp_gmstranded/entities/weapons/gms_woodenfishingrod.lua b/ftp_gmstranded/entities/weapons/gms_woodenfishingrod.lua new file mode 100644 index 0000000..29d2f6f --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_woodenfishingrod.lua @@ -0,0 +1,38 @@ + +AddCSLuaFile() + +SWEP.Slot = 1 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Wooden Fishing Rod" +SWEP.ViewModel = "models/Weapons/v_hands.mdl" +SWEP.WorldModel = "models/props_junk/harpoon002a.mdl" + +SWEP.Purpose = "Used for fishing" +SWEP.Instructions = "Primary fire: Fish from the water" + +SWEP.HoldType = "revolver" +SWEP.NoTraceFix = true +SWEP.HitDistance = 512 +SWEP.Mask = bit.bor( MASK_WATER, MASK_SOLID ) + +function SWEP:PlaySwingSound() + self:PlaySound( "npc/vort/claw_swing" .. math.random( 1, 2 ) .. ".wav" ) +end + +function SWEP:OnHit( tr ) + if ( CLIENT ) then return end + + if ( tr.MatType == MAT_SLOSH || string.find( tr.HitTexture, "water" ) ) then + self.Owner:DoProcess( "Fishing", 10, { + Chance = 60 + } ) + end + +end + +SWEP.FixWorldModel = true +SWEP.FixWorldModelPos = Vector( 20, 2.5, -1 ) +SWEP.FixWorldModelAng = Angle( 90, 0, 90 ) +SWEP.FixWorldModelScale = 0.5 diff --git a/ftp_gmstranded/entities/weapons/gms_woodenspoon.lua b/ftp_gmstranded/entities/weapons/gms_woodenspoon.lua new file mode 100644 index 0000000..89d4b2c --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_woodenspoon.lua @@ -0,0 +1,23 @@ + +AddCSLuaFile() + +SWEP.Slot = 1 +SWEP.SlotPos = 1 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Wooden Spoon" +SWEP.ViewModel = "models/Weapons/v_hands.mdl" +SWEP.WorldModel = "models/props_interiors/pot02a.mdl" + +SWEP.Purpose = "For eating fruits" +SWEP.Instructions = "Eat some fruits" + +SWEP.HoldType = "knife" + +function SWEP:PrimaryAttack() +end + +SWEP.FixWorldModel = true +SWEP.FixWorldModelPos = Vector( -1, -4, -4 ) +SWEP.FixWorldModelAng = Angle( 90, 90, 0 ) +SWEP.FixWorldModelScale = 0.6 diff --git a/ftp_gmstranded/entities/weapons/gms_wrench.lua b/ftp_gmstranded/entities/weapons/gms_wrench.lua new file mode 100644 index 0000000..d05ef61 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/gms_wrench.lua @@ -0,0 +1,23 @@ + +AddCSLuaFile() + +SWEP.Slot = 2 +SWEP.SlotPos = 5 + +SWEP.Base = "gms_base_weapon" +SWEP.PrintName = "Wrench" +SWEP.ViewModel = "models/Weapons/v_hands.mdl" +SWEP.WorldModel = "models/props_c17/tools_wrench01a.mdl" + +SWEP.Purpose = "Shortens down weapon crafting time" +SWEP.Instructions = "Craft weapons faster" + +SWEP.HoldType = "knife" + +function SWEP:PrimaryAttack() +end + +SWEP.FixWorldModel = true +SWEP.FixWorldModelPos = Vector( -1.5, 1, -3 ) +SWEP.FixWorldModelAng = Angle( 90, 90, 0 ) +SWEP.FixWorldModelScale = 1 diff --git a/ftp_gmstranded/entities/weapons/m9k_1887winchester/shared.lua b/ftp_gmstranded/entities/weapons/m9k_1887winchester/shared.lua new file mode 100644 index 0000000..ac3754f --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_1887winchester/shared.lua @@ -0,0 +1,89 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_1887winchester") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Shotguns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Winchester 87" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 30 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "shotgun" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_1887winchester.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_winchester_1887.mdl" -- Weapon world model +SWEP.Base = "bobs_shotty_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("1887winch.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 70 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 4 -- Size of a clip +SWEP.Primary.DefaultClip = 12 -- Default number of bullets in a clip +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.8 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.6 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "slam" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.ShellTime = .67 + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 10 -- How many bullets to shoot per trigger pull, AKA pellets +SWEP.Primary.Damage = 10 -- Base damage per bullet +SWEP.Primary.Spread = .042 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .042 -- Ironsight accuracy, should be the same for shotguns +-- Because irons don't magically give you less pellet spread! + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(4.84, 0, 1.2) +SWEP.IronSightsAng = Vector(0, 0, 2.295) +SWEP.SightsPos = Vector(4.84, 0, 1.2) +SWEP.SightsAng = Vector(0, 0, 2.295) +SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 2.3965) +SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10) + +if ((gmod.GetGamemode().Name) == "Murderthon 9000") or ((gmod.GetGamemode().Name) == "Murderthon 9000 beta") then + SWEP.Primary.Ammo = "slam" + SWEP.Slot = 1 -- Slot in the weapon selection menu + SWEP.Weight = 3 -- rank relative ot other weapons. bigger is better +else + SWEP.Primary.Ammo = "buckshot" +end + + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_1897winchester/shared.lua b/ftp_gmstranded/entities/weapons/m9k_1897winchester/shared.lua new file mode 100644 index 0000000..6140f08 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_1897winchester/shared.lua @@ -0,0 +1,85 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_1897winchester") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Shotguns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Winchester 1897" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 31 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "shotgun" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_1897trenchshot.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_winchester_1897_trench.mdl" -- Weapon world model +SWEP.Base = "bobs_shotty_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Trench_97.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 70 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 4 -- Size of a clip +SWEP.Primary.DefaultClip = 12 -- Default number of bullets in a clip +SWEP.Primary.KickUp = 0.9 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.6 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.4 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "slam" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.ShellTime = .6 + +SWEP.Primary.NumShots = 11 //how many bullets to shoot, use with shotguns +SWEP.Primary.Damage = 10 //base damage, scaled by game +SWEP.Primary.Spread = .04 //define from-the-hip accuracy (1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .04 // has to be the same as primary.spread +-- Because irons don't magically give you less pellet spread! + + +SWEP.IronSightsPos = Vector(2.809, 0, 1.48) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(2.809, 0, 1.48) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(-3.116, -3.935, 0.492) +SWEP.RunSightsAng = Vector(-19.894, -47.624, 10.902) + +if ((gmod.GetGamemode().Name) == "Murderthon 9000") or ((gmod.GetGamemode().Name) == "Murderthon 9000 beta") then + SWEP.Primary.Ammo = "slam" +else + SWEP.Primary.Ammo = "buckshot" +end + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_acr/shared.lua b/ftp_gmstranded/entities/weapons/m9k_acr/shared.lua new file mode 100644 index 0000000..317ce1d --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_acr/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_acr") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "ACR" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 21 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.SelectiveFire = true + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_rif_msda.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_masada_acr.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Masada.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 825 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.3 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 30 -- Base damage per bullet +SWEP.Primary.Spread = .025 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(2.668, 0, 0.675) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(2.668, 0, 0.675) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector (-3.0328, 0, 1.888) +SWEP.RunSightsAng = Vector (-24.2146, -36.522, 10) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_ak47/shared.lua b/ftp_gmstranded/entities/weapons/m9k_ak47/shared.lua new file mode 100644 index 0000000..f968369 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_ak47/shared.lua @@ -0,0 +1,86 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_ak47") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "AK-47" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 22 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.SelectiveFire = true + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_dot_ak47.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_ak47_m9k.mdl" -- Weapon world model +SWEP.ShowWorldModel = true +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("47ak.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 600 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.3 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 30 -- Base damage per bullet +SWEP.Primary.Spread = .023 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .013 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +-- SWEP.IronSightsPos = Vector(4.394, -3.75, 1.48) +-- SWEP.IronSightsAng = Vector(1.419, -0.35, 0) +-- SWEP.SightsPos = Vector(4.394, -3.75, 1.48) +-- SWEP.SightsAng = Vector(1.419, -0.35, 0) + +SWEP.IronSightsPos = Vector(4.539, -4.238, 1.799) +SWEP.IronSightsAng = Vector(0.958, -0.021, 0) +SWEP.SightsPos = Vector(4.539, -4.238, 1.799) +SWEP.SightsAng = Vector(0.958, -0.021, 0) +SWEP.RunSightsPos = Vector(-1.841, -3.386, 0.708) +SWEP.RunSightsAng = Vector(-7.441, -41.614, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_ak74/shared.lua b/ftp_gmstranded/entities/weapons/m9k_ak74/shared.lua new file mode 100644 index 0000000..4ba7b6f --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_ak74/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_ak74") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "AK-74" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 23 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.SelectiveFire = true + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_tct_ak47.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_tct_ak47.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Tactic_AK47.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 600 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.4 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 31 -- Base damage per bullet +SWEP.Primary.Spread = .02 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .01 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector (2.0378, -3.8941, 0.8809) +SWEP.IronSightsAng = Vector (0, 0, 0) +SWEP.SightsPos = Vector (2.0378, -3.8941, 0.8809) +SWEP.SightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 2.3965) +SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_amd65/shared.lua b/ftp_gmstranded/entities/weapons/m9k_amd65/shared.lua new file mode 100644 index 0000000..a333318 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_amd65/shared.lua @@ -0,0 +1,82 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_amd65") -- must be the name of your swep +if (GetConVar(SWEP.Gun.."_allowed")) != nil then + if not (GetConVar(SWEP.Gun.."_allowed"):GetBool()) then SWEP.Base = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "AMD 65" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 24 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- how others view you carrying the weapon + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_amd_65.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_amd_65.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("amd65.single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 750 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 20 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = .7 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.2 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.4 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 31 -- Base damage per bullet +SWEP.Primary.Spread = .021 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .011 -- Ironsight accuracy, should be the same for shotguns + + +SWEP.SelectiveFire = true + +//just cleaning up an empty spot that bugs me +SWEP.VElements = { + ["element"] = { type = "Model", model = "models/Mechanics/wheels/wheel_speed_72.mdl", bone = "Havana Daydreamin", rel = "", pos = Vector(-0.15, -5.336, 1.608), angle = Angle(0, 0, 90), size = Vector(0.009, 0.009, 0.009), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} } +} + +SWEP.IronSightsPos = Vector(3.5, -2.21, 2.115) +SWEP.IronSightsAng = Vector(-3.701, 0, 0) +SWEP.SightsPos = Vector(3.5, -2.21, 2.115) +SWEP.SightsAng = Vector(-3.701, 0, 0) +SWEP.RunSightsPos = Vector(-5.198, -9.164, 0) +SWEP.RunSightsAng = Vector(-8.825, -70, 0) + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_an94/shared.lua b/ftp_gmstranded/entities/weapons/m9k_an94/shared.lua new file mode 100644 index 0000000..801f127 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_an94/shared.lua @@ -0,0 +1,167 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_an94") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "AN-94" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 25 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 55 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_rif_an_94.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_rif_an_94.mdl" -- Weapon world model +SWEP.ShowWorldModel = true +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("an94.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 600 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.3 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.1 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 31 -- Base damage per bullet +SWEP.Primary.Spread = .015 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .005 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(4.552, 0, 3.062) +SWEP.IronSightsAng = Vector(0.93, -0.5, 0) +SWEP.SightsPos = Vector(4.552, 0, 3.062) +SWEP.SightsAng = Vector(0.93, -0.5, 0) +SWEP.RunSightsPos = Vector(-5.277, -8.584, 2.598) +SWEP.RunSightsAng = Vector(-12.954, -52.088, 0) + +SWEP.Primary.Burst = false + +function SWEP:SelectFireMode() + + if self.Primary.Burst then + self.Primary.Burst = false + self.NextFireSelect = CurTime() + .5 + if CLIENT then + self.Owner:PrintMessage(HUD_PRINTTALK, "Automatic selected.") + end + self.Weapon:EmitSound("Weapon_AR2.Empty") + self.Primary.NumShots = 1 + self.Primary.Sound = Sound("an94.single") + self.Primary.Automatic = true + else + self.Primary.Burst = true + self.NextFireSelect = CurTime() + .5 + if CLIENT then + self.Owner:PrintMessage(HUD_PRINTTALK, "Burst fire selected.") + end + self.Weapon:EmitSound("Weapon_AR2.Empty") + self.Primary.NumShots = 2 + self.Primary.Sound = Sound("an94.double") + self.Primary.Automatic = false + end +end + +SWEP.Primary.PrevShots = SWEP.Primary.NumShots + +function SWEP:PrimaryAttack() + if self:CanPrimaryAttack() and self.Owner:IsPlayer() then + self.ShootThese = self.Primary.NumShots + + if self.Primary.Burst then + if self.Primary.NumShots > self.Owner:GetActiveWeapon():Clip1() then + self.Primary.NumShots = 1 + self.ShootThese = 1 + self.Primary.Sound = Sound("an94.single") + else + self.Primary.NumShots = 2 + self.ShootThese = 2 + self.Primary.Sound = Sound("an94.double") + end + end + + + if !self.Owner:KeyDown(IN_SPEED) and !self.Owner:KeyDown(IN_RELOAD) then + self:ShootBulletInformation() + self.Weapon:TakePrimaryAmmo(self.ShootThese) + + if self.Silenced then + self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK_SILENCED ) + self.Weapon:EmitSound(self.Primary.SilencedSound) + else + self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) + self.Weapon:EmitSound(self.Primary.Sound) + end + + local fx = EffectData() + fx:SetEntity(self.Weapon) + fx:SetOrigin(self.Owner:GetShootPos()) + fx:SetNormal(self.Owner:GetAimVector()) + fx:SetAttachment(self.MuzzleAttachment) + if GetConVar("M9KGasEffect") != nil then + if GetConVar("M9KGasEffect"):GetBool() then + util.Effect("m9k_rg_muzzle_rifle",fx) + end + end + self.Owner:SetAnimation( PLAYER_ATTACK1 ) + self.Owner:MuzzleFlash() + self.Weapon:SetNextPrimaryFire(CurTime()+1/(self.Primary.RPM/60)) + self:CheckWeaponsAndAmmo() + self.RicochetCoin = (math.random(1,4)) + if self.BoltAction then self:BoltBack() end + end + elseif self:CanPrimaryAttack() and self.Owner:IsNPC() then + self:ShootBulletInformation() + self.Weapon:TakePrimaryAmmo(self.ShootThese) + self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) + self.Weapon:EmitSound(self.Primary.Sound) + self.Owner:SetAnimation( PLAYER_ATTACK1 ) + self.Owner:MuzzleFlash() + self.Weapon:SetNextPrimaryFire(CurTime()+1/(self.Primary.RPM/60)) + self.RicochetCoin = (math.random(1,4)) + end +end + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_ares_shrike/shared.lua b/ftp_gmstranded/entities/weapons/m9k_ares_shrike/shared.lua new file mode 100644 index 0000000..ebb0456 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_ares_shrike/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_ares_shrike") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Machine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Ares Shrike" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 39 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_ares_shrike01.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_ares_shrike.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_shrk.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 650 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 200 -- Size of a clip +SWEP.Primary.DefaultClip = 400 -- Bullets you start with +SWEP.Primary.KickUp = 0.6 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 30 -- Base damage per bullet +SWEP.Primary.Spread = .03 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .02 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-3.804, 0, 0.495) +SWEP.IronSightsAng = Vector(0.119, -0.019, 0) +SWEP.SightsPos = Vector(-3.804, 0, 0.495) +SWEP.SightsAng = Vector(0.119, -0.019, 0) +SWEP.RunSightsPos = Vector(1.639, -3.444, 0) +SWEP.RunSightsAng = Vector(-7.46, 47.048, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_auga3/shared.lua b/ftp_gmstranded/entities/weapons/m9k_auga3/shared.lua new file mode 100644 index 0000000..5458b3c --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_auga3/shared.lua @@ -0,0 +1,90 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_auga3") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Steyr AUG A3" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 26 -- 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 = true -- Set false if you want no crosshair from hip +SWEP.Weight = 30 -- 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.XHair = true -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.BoltAction = false -- Is this a bolt action rifle? +SWEP.HoldType = "smg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_auga3sa.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_auga3.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("aug_a3.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 700 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = .4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = .4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = .5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic/Semi Auto +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets +SWEP.SelectiveFire = true + +SWEP.Secondary.ScopeZoom = 4 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = false -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = true +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.5 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 22 --base damage per bullet +SWEP.Primary.Spread = .025 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .02 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector (2.275, -2.9708, 0.5303) +SWEP.IronSightsAng = Vector (0, 0, 0) +SWEP.SightsPos = Vector (2.275, -2.9708, 0.5303) +SWEP.SightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector (-3.0328, 0, 1.888) +SWEP.RunSightsAng = Vector (-24.2146, -36.522, 10) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_aw50/shared.lua b/ftp_gmstranded/entities/weapons/m9k_aw50/shared.lua new file mode 100644 index 0000000..513d6f1 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_aw50/shared.lua @@ -0,0 +1,89 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_aw50") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Sniper Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "AI AW50" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 50 -- 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 from hip +SWEP.XHair = false -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.Weight = 50 -- 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.BoltAction = true -- Is this a bolt action rifle? +SWEP.HoldType = "rpg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_aw50_awp.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_acc_int_aw50.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weaponaw50.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 50 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 10 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 1 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 1 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "SniperPenetratedRound" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.ScopeZoom = 9 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = false -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = true +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 95 --base damage per bullet +SWEP.Primary.Spread = .01 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .0001 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector(3.68, 0, 1.08) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(3.68, 0, 1.08) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 2.3965) +SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_barret_m82/shared.lua b/ftp_gmstranded/entities/weapons/m9k_barret_m82/shared.lua new file mode 100644 index 0000000..286c8de --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_barret_m82/shared.lua @@ -0,0 +1,90 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_barret_m82") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Sniper Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Barret M82" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 51 -- 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 from hip +SWEP.XHair = false -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.Weight = 50 -- 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.BoltAction = false -- Is this a bolt action rifle? +SWEP.HoldType = "rpg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_50calm82.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_barret_m82.mdl" -- Weapon world model +--oops +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("BarretM82.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 200 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 10 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 1 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 1 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "SniperPenetratedRound" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.ScopeZoom = 9 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = false -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = true +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 110 --base damage per bullet +SWEP.Primary.Spread = .01 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .00001 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector (2.894, 0, 1.7624) +SWEP.IronSightsAng = Vector (0, 0, 0) +SWEP.SightsPos = Vector (2.894, 0, 1.7624) +SWEP.SightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 2.3965) +SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_bizonp19/shared.lua b/ftp_gmstranded/entities/weapons/m9k_bizonp19/shared.lua new file mode 100644 index 0000000..688baad --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_bizonp19/shared.lua @@ -0,0 +1,81 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_bizonp19") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Bizon PP19" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 42 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_bizon19.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_pp19_bizon.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_P19.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 675 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 64 -- Size of a clip +SWEP.Primary.DefaultClip = 128 -- Bullets you start with +SWEP.Primary.KickUp = 0.6 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 19 -- Base damage per bullet +SWEP.Primary.Spread = .02 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(3.359, 0, 0.839) +SWEP.IronSightsAng = Vector(0.744, -0.588, 0) +SWEP.SightsPos = Vector(3.359, 0, 0.839) +SWEP.SightsAng = Vector(0.744, -0.588, 0) +SWEP.GSightsPos = Vector (0, 0, 0) +SWEP.GSightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 2.3965) +SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_browningauto5/shared.lua b/ftp_gmstranded/entities/weapons/m9k_browningauto5/shared.lua new file mode 100644 index 0000000..5652aec --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_browningauto5/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_browningauto5") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Shotguns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Browning Auto 5" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 32 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "shotgun" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_brown_auto5.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_browning_auto.mdl" -- Weapon world model +SWEP.Base = "bobs_shotty_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weapon_a5.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 250 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 6 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Default number of bullets in a clip +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.8 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.6 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "buckshot" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.ShellTime = .35 + +SWEP.Primary.NumShots = 9 //how many bullets to shoot, use with shotguns +SWEP.Primary.Damage = 10 //base damage, scaled by game +SWEP.Primary.Spread = .03 //define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .03 // has to be the same as primary.spread +-- Because irons don't magically give you less pellet spread! + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(1.953, 0, 1.388) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(1.953, 0, 1.388) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(-3.116, -3.935, 0.492) +SWEP.RunSightsAng = Vector(-19.894, -47.624, 10.902) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_colt1911/shared.lua b/ftp_gmstranded/entities/weapons/m9k_colt1911/shared.lua new file mode 100644 index 0000000..321ee9c --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_colt1911/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_colt1911") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Colt 1911" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 43 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "pistol" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/f_dmgf_co1911.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/s_dmgf_co1911.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Dmgfok_co1911.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 700 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 7 -- Size of a clip +SWEP.Primary.DefaultClip = 45 -- Bullets you start with +SWEP.Primary.KickUp = 0.4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "pistol" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 17 -- Base damage per bullet +SWEP.Primary.Spread = .025 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector (-2.6004, -1.3877, 1.1892) +SWEP.IronSightsAng = Vector (0.3756, -0.0032, 0.103) +SWEP.SightsPos = Vector (-2.6004, -1.3877, 1.1892) +SWEP.SightsAng = Vector (0.3756, -0.0032, 0.103) +SWEP.RunSightsPos = Vector(3.444, -7.823, -6.27) +SWEP.RunSightsAng = Vector(60.695, 0, 0) +-- SWEP.RunSightsPos = Vector (-0.7883, 0, 2.4235) +-- SWEP.RunSightsAng = Vector (-14.417, -0.7137, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_coltpython/shared.lua b/ftp_gmstranded/entities/weapons/m9k_coltpython/shared.lua new file mode 100644 index 0000000..325abf9 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_coltpython/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_coltpython") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Colt Python" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 57 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "revolver" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_pist_python.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_colt_python.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_ColtPython.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 115 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 6 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.5 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "357" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot, use with shotguns +SWEP.Primary.Damage = 29 --base damage, scaled by game +SWEP.Primary.Spread = .02 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .01 -- has to be the same as primary.spread + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-2.743, -1.676, 1.796) +SWEP.IronSightsAng = Vector(0.611, 0.185, 0) +SWEP.SightsPos = Vector(-2.743, -1.676, 1.796) +SWEP.SightsAng = Vector(0.611, 0.185, 0) +SWEP.RunSightsPos = Vector(2.124, -9.365, -3.987) +SWEP.RunSightsAng = Vector(48.262, -8.214, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_contender/shared.lua b/ftp_gmstranded/entities/weapons/m9k_contender/shared.lua new file mode 100644 index 0000000..570d348 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_contender/shared.lua @@ -0,0 +1,233 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_contender") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Sniper Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Thompson Contender G2" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- 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 from hip +SWEP.XHair = false -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.Weight = 50 -- 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.BoltAction = true -- Is this a bolt action rifle? +SWEP.HoldType = "rpg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_contender2.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_g2_contender.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("contender_g2.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 35 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 1 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 1 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 1 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.ScopeZoom = 9 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = true -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 85 --base damage per bullet +SWEP.Primary.Spread = .01 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .00015 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector(-3, -0.857, 0.36) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(-3, -0.857, 0.36) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(3.714, -1.429, 0) +SWEP.RunSightsAng = Vector(-11, 31, 0) + +if (gmod.GetGamemode().Name == "Murderthon 9000") then + + SWEP.Slot = 1 -- Slot in the weapon selection menu + SWEP.Weight = 3 -- rank relative ot other weapons. bigger is better + +end + +function SWEP:PrimaryAttack() + if self.Owner:IsNPC() then return end + if self:CanPrimaryAttack() and !self.Owner:KeyDown(IN_SPEED) then + self:ShootBulletInformation() + self.Weapon:EmitSound(self.Primary.Sound) + self.Weapon:TakePrimaryAmmo(1) + self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) + local fx = EffectData() + fx:SetEntity(self.Weapon) + fx:SetOrigin(self.Owner:GetShootPos()) + fx:SetNormal(self.Owner:GetAimVector()) + fx:SetAttachment(self.MuzzleAttachment) + util.Effect("rg_muzzle_rifle",fx) + self.Owner:SetAnimation( PLAYER_ATTACK1 ) + self.Owner:MuzzleFlash() + self.Weapon:SetNextPrimaryFire(CurTime()+10) + self.RicochetCoin = (math.random(1,4)) + self:UseBolt() + end +end + +function SWEP:UseBolt() + + if self.Owner:GetAmmoCount( self.Weapon:GetPrimaryAmmoType() ) > 0 then + timer.Simple(.25, function() + if SERVER and self.Weapon != nil then + self.Weapon:SetNWBool("Reloading", true) + if self.Weapon:GetClass() == self.Gun and self.BoltAction then + self.Owner:SetFOV( 0, 0.3 ) + self:SetIronsights(false) + self.Owner:DrawViewModel(true) + local boltactiontime = (self.Owner:GetViewModel():SequenceDuration()) + timer.Simple(boltactiontime, + function() if self.Weapon and self.Owner then if IsValid(self.Weapon) and IsValid(self.Owner) then + self.Weapon:SetNWBool("Reloading", false) + if SERVER and self.Weapon != nil then + if self.Owner:KeyDown(IN_ATTACK2) and self.Weapon:GetClass() == self.Gun then + self.Owner:SetFOV( 75/self.Secondary.ScopeZoom, 0.15 ) + self.IronSightsPos = self.SightsPos -- Bring it up + self.IronSightsAng = self.SightsAng -- Bring it up + self.DrawCrosshair = false + self:SetIronsights(true, self.Owner) + self.Owner:DrawViewModel(false) + + self.Owner:RemoveAmmo(1, self.Primary.Ammo, false) -- out of the frying pan + self.Weapon:SetClip1(self.Weapon:Clip1() + 1) -- into the fire + self.Weapon:SetNextPrimaryFire(CurTime() + .1) + --well, hope this works + elseif !self.Owner:KeyDown(IN_ATTACK2) and self.Weapon:GetClass() == self.Gun then + self.Owner:RemoveAmmo(1, self.Primary.Ammo, false) -- out of the frying pan + self.Weapon:SetClip1(self.Weapon:Clip1() + 1) -- into the fire + self.Weapon:SetNextPrimaryFire(CurTime() + .1) + end + end + end end end) + -- else if self.Weapon:GetClass() == self.Gun and + -- self.BoltAction and (self:GetIronsights() == false) then + + end + end + end ) + else + timer.Simple(.1, function() self:CheckWeaponsAndAmmo() end) + end + +end + +function SWEP:Reload() + + +// self.Weapon:DefaultReload(ACT_VM_RELOAD) + + if not IsValid(self) then return end + if not IsValid(self.Owner) then return end + if not IsValid(self.Weapon) then return end + + if self.Weapon:GetNextPrimaryFire() > (CurTime() + 1) then + return + else + + if self.Owner:IsNPC() then + self.Weapon:DefaultReload(ACT_VM_RELOAD) + return end + + if self.Owner:KeyDown(IN_USE) then return end + + if self.Silenced then + self.Weapon:DefaultReload(ACT_VM_RELOAD_SILENCED) + else + self.Weapon:DefaultReload(ACT_VM_RELOAD) + end + + if !self.Owner:IsNPC() then + if self.Owner:GetViewModel() == nil then self.ResetSights = CurTime() + 3 else + self.ResetSights = CurTime() + self.Owner:GetViewModel():SequenceDuration() + end + end + + if SERVER and self.Weapon != nil then + if ( self.Weapon:Clip1() < self.Primary.ClipSize ) and !self.Owner:IsNPC() then + -- //When the current clip < full clip and the rest of your ammo > 0, then + self.Owner:SetFOV( 0, 0.3 ) + -- //Zoom = 0 + self:SetIronsights(false) + -- //Set the ironsight to false + self.Weapon:SetNWBool("Reloading", true) + end + local waitdammit = (self.Owner:GetViewModel():SequenceDuration()) + timer.Simple(waitdammit + .1, + function() + if self.Weapon == nil then return end + self.Weapon:SetNWBool("Reloading", false) + if self.Owner:KeyDown(IN_ATTACK2) and self.Weapon:GetClass() == self.Gun then + if CLIENT then return end + if self.Scoped == false then + self.Owner:SetFOV( self.Secondary.IronFOV, 0.3 ) + self.IronSightsPos = self.SightsPos -- Bring it up + self.IronSightsAng = self.SightsAng -- Bring it up + self:SetIronsights(true, self.Owner) + self.DrawCrosshair = false + else return end + elseif self.Owner:KeyDown(IN_SPEED) and self.Weapon:GetClass() == self.Gun then + if self.Weapon:GetNextPrimaryFire() <= (CurTime() + .03) then + self.Weapon:SetNextPrimaryFire(CurTime()+0.3) -- Make it so you can't shoot for another quarter second + end + self.IronSightsPos = self.RunSightsPos -- Hold it down + self.IronSightsAng = self.RunSightsAng -- Hold it down + self:SetIronsights(true, self.Owner) -- Set the ironsight true + self.Owner:SetFOV( 0, 0.3 ) + else return end + end) + end + + end + +end + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_dbarrel/shared.lua b/ftp_gmstranded/entities/weapons/m9k_dbarrel/shared.lua new file mode 100644 index 0000000..2de2a9d --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_dbarrel/shared.lua @@ -0,0 +1,316 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_dbarrel") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Shotguns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Double Barrel Shotgun" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 21 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "shotgun" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_doublebarrl.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_double_barrel_shotgun.mdl" -- Weapon world model +SWEP.Base = "bobs_shotty_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Double_Barrel.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 180 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 2 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Default number of bullets in a clip +SWEP.Primary.KickUp = 10 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 5 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "buckshot" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 0 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.ShellTime = .5 + +SWEP.Primary.NumShots = 18 -- How many bullets to shoot per trigger pull, AKA pellets +SWEP.Primary.Damage = 10 -- Base damage per bullet +SWEP.Primary.Spread = .03 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .03 -- Ironsight accuracy, should be the same for shotguns +-- Because irons don't magically give you less pellet spread! + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(0, 0, 0) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(0, 0, 0) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(11.475, -7.705, -2.787) +SWEP.RunSightsAng = Vector(0.574, 51.638, 5.737) + +SWEP.Secondary.Sound = Sound("dbarrel_dblast") + +local PainMulti = 1 + +if GetConVar("M9KDamageMultiplier") == nil then + PainMulti = 1 + print("M9KDamageMultiplier is missing! You may have hit the lua limit! Reverting multiplier to 1.") +else + PainMulti = GetConVar("M9KDamageMultiplier"):GetFloat() + if PainMulti < 0 then + PainMulti = PainMulti * -1 + print("Your damage multiplier was in the negatives. It has been reverted to a positive number. Your damage multiplier is now "..PainMulti) + end +end + +function NewM9KDamageMultiplierDB(cvar, previous, new) + print("multiplier has been changed ") + if GetConVar("M9KDamageMultiplier") == nil then + PainMulti = 1 + print("M9KDamageMultiplier is missing! You may have hit the lua limit! Reverting multiplier to 1, you will notice no changes.") + else + PainMulti = GetConVar("M9KDamageMultiplier"):GetFloat() + if PainMulti < 0 then + PainMulti = PainMulti * -1 + end + end +end +cvars.AddChangeCallback("M9KDamageMultiplier", NewM9KDamageMultiplierDB) + +function SWEP:SecondaryAttack() + local timerName = "ShotgunReload_" .. self.Owner:UniqueID() + if (timer.Exists(timerName)) then return end + + if self:CanPrimaryAttack() and self.Owner:IsPlayer() then + if self.Weapon:Clip1() == 2 then + if !self.Owner:KeyDown(IN_SPEED) and !self.Owner:KeyDown(IN_RELOAD) then + self:ShootBulletInformation2() + self.Weapon:TakePrimaryAmmo(2) + self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) + self.Weapon:EmitSound(self.Secondary.Sound) + --self.Owner:ViewPunch(Angle(-15, math.Rand(-20,-25), 0)) + + local fx = EffectData() + fx:SetEntity(self.Weapon) + fx:SetOrigin(self.Owner:GetShootPos()) + fx:SetNormal(self.Owner:GetAimVector()) + fx:SetAttachment(self.MuzzleAttachment) + if GetConVar("M9KGasEffect") != nil then + if GetConVar("M9KGasEffect"):GetBool() then + util.Effect("m9k_rg_muzzle_rifle",fx) + end + end + self.Owner:SetAnimation( PLAYER_ATTACK1 ) + self.Owner:MuzzleFlash() + self.Weapon:SetNextSecondaryFire(CurTime()+1/((self.Primary.RPM/2)/60)) + self:CheckWeaponsAndAmmo() + self.RicochetCoin = (math.random(1,8)) + if self.BoltAction then self:BoltBack() end + end + elseif self.Weapon:Clip1() == 1 then + self.Weapon:PrimaryAttack() + self.Weapon:SetNextSecondaryFire(CurTime()+1/((self.Primary.RPM/2)/60)) + elseif self.Weapon:Clip1() == 0 then + self:Reload() + end + end +end + +function SWEP:PrimaryAttack() + local timerName = "ShotgunReload_" .. self.Owner:UniqueID() + if (timer.Exists(timerName)) then return end + if self:CanPrimaryAttack() and self.Owner:IsPlayer() then + if !self.Owner:KeyDown(IN_SPEED) and !self.Owner:KeyDown(IN_RELOAD) then + self:ShootBulletInformation() + self.Weapon:TakePrimaryAmmo(1) + + if self.Silenced then + self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK_SILENCED ) + self.Weapon:EmitSound(self.Primary.SilencedSound) + else + self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) + self.Weapon:EmitSound(self.Primary.Sound) + end + + local fx = EffectData() + fx:SetEntity(self.Weapon) + fx:SetOrigin(self.Owner:GetShootPos()) + fx:SetNormal(self.Owner:GetAimVector()) + fx:SetAttachment(self.MuzzleAttachment) + if GetConVar("M9KGasEffect") != nil then + if GetConVar("M9KGasEffect"):GetBool() then + util.Effect("m9k_rg_muzzle_rifle",fx) + end + end + self.Owner:SetAnimation( PLAYER_ATTACK1 ) + self.Owner:MuzzleFlash() + self.Weapon:SetNextPrimaryFire(CurTime()+1/(self.Primary.RPM/60)) + self:CheckWeaponsAndAmmo() + self.RicochetCoin = (math.random(1,4)) + if self.BoltAction then self:BoltBack() end + end + elseif self:CanPrimaryAttack() and self.Owner:IsNPC() then + self:ShootBulletInformation() + self.Weapon:TakePrimaryAmmo(1) + self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) + self.Weapon:EmitSound(self.Primary.Sound) + self.Owner:SetAnimation( PLAYER_ATTACK1 ) + self.Owner:MuzzleFlash() + self.Weapon:SetNextPrimaryFire(CurTime()+1/(self.Primary.RPM/60)) + self.RicochetCoin = (math.random(1,4)) + end +end + + +function SWEP:ShootBulletInformation2() + + local CurrentDamage + local CurrentRecoil + local CurrentCone + local basedamage + + CurrentCone = self.Primary.Spread + + local damagedice = math.Rand(.85,1.3) + + basedamage = PainMulti * self.Primary.Damage + CurrentDamage = basedamage * damagedice + CurrentRecoil = self.Primary.Recoil + + self:ShootBullet(CurrentDamage, CurrentRecoil, 31, .06) + +end + +/*--------------------------------------------------------- + Name: SWEP:Reload() + Desc: Reload is being pressed. +---------------------------------------------------------*/ +function SWEP:Reload() + + if not IsValid(self) then return end + if not IsValid(self.Owner) then return end + if not self.Owner:IsPlayer() then return end + + local maxcap = self.Primary.ClipSize + local spaceavail = self.Weapon:Clip1() + local shellz = (maxcap) - (spaceavail) + 1 + + if (timer.Exists("ShotgunReload")) or self.Owner.NextReload > CurTime() or maxcap == spaceavail then return end + + if self.Owner:IsPlayer() then + + self.Weapon:SetNextPrimaryFire(CurTime() + 1) -- wait one second before you can shoot again + self.Weapon:SendWeaponAnim(ACT_SHOTGUN_RELOAD_START) -- sending start reload anim + self.Owner:SetAnimation( PLAYER_RELOAD ) + + self.Owner.NextReload = CurTime() + 1 + + if (SERVER) then + self.Owner:SetFOV( 0, 0.15 ) + self:SetIronsights(false) + end + + if SERVER and self.Owner:Alive() then + local timerName = "ShotgunReload_" .. self.Owner:UniqueID() + timer.Create(timerName, + (self.ShellTime + .05), + shellz, + function() if not IsValid(self) then return end + if IsValid(self.Owner) and IsValid(self.Weapon) then + if self.Owner:Alive() then + self:InsertShell() + end + end end) + end + + elseif self.Owner:IsNPC() then + self.Weapon:DefaultReload(ACT_VM_RELOAD) + end + +end + +function SWEP:Think() + if not IsValid(self) then return end + if not IsValid(self.Owner) then return end + if not self.Owner:IsPlayer() then return end + if self.Owner.NextReload == nil then self.Owner.NextReload = CurTime() + 1 end + local timerName = "ShotgunReload_" .. self.Owner:UniqueID() + --if the owner presses shoot while the timer is in effect, then... + -- if (self.Owner:KeyPressed(IN_ATTACK)) and (timer.Exists(timerName)) and not (self.Owner:KeyDown(IN_SPEED)) then + -- if self:CanPrimaryAttack() then --well first, if we actually can attack, then... + -- timer.Destroy(timerName) -- kill the timer, and + -- self:PrimaryAttack()-- ATTAAAAACK! + -- end + -- end + + if self.InsertingShell == true and self.Owner:Alive() then + vm = self.Owner:GetViewModel()-- its a messy way to do it, but holy shit, it works! + vm:ResetSequence(vm:LookupSequence("after_reload")) -- Fuck you, garry, why the hell can't I reset a sequence in multiplayer? + vm:SetPlaybackRate(.01) -- or if I can, why does facepunch have to be such a shitty community, and your wiki have to be an unreadable goddamn mess? + self.InsertingShell = false -- You get paid for this, what's your excuse? + end + + self:IronSight() + +end + +function SWEP:InsertShell() + + if not IsValid(self) then return end + if not IsValid(self.Owner) then return end + if not self.Owner:IsPlayer() then return end + + local timerName = "ShotgunReload_" .. self.Owner:UniqueID() + if self.Owner:Alive() then + local curwep = self.Owner:GetActiveWeapon() + if curwep:GetClass() != self.Gun then + timer.Destroy(timerName) + return end + + if (self.Weapon:Clip1() >= self.Primary.ClipSize or self.Owner:GetAmmoCount(self.Primary.Ammo) <= 0) then + -- if clip is full or ammo is out, then... + self.Weapon:SendWeaponAnim(ACT_SHOTGUN_RELOAD_FINISH) -- send the pump anim + timer.Destroy(timerName) -- kill the timer + self.Weapon:SetNextPrimaryFire(CurTime()+.55) + self.Weapon:SetNextSecondaryFire(CurTime()+.55) + elseif (self.Weapon:Clip1() <= self.Primary.ClipSize and self.Owner:GetAmmoCount(self.Primary.Ammo) >= 0) then + self.InsertingShell = true --well, I tried! + timer.Simple( .05, function() self:ShellAnimCaller() end) + self.Owner:RemoveAmmo(1, self.Primary.Ammo, false) -- out of the frying pan + self.Weapon:SetClip1(self.Weapon:Clip1() + 1) -- into the fire + end + else + timer.Destroy(timerName) -- kill the timer + end + +end + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_deagle/shared.lua b/ftp_gmstranded/entities/weapons/m9k_deagle/shared.lua new file mode 100644 index 0000000..c671ebf --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_deagle/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_deagle") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Desert Eagle" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 21 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "pistol" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_tcom_deagle.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_tcom_deagle.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_TDegle.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 600 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 7 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.5 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "357" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 30 -- Base damage per bullet +SWEP.Primary.Spread = .025 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector (-1.7102, 0, 0.2585) +SWEP.IronSightsAng = Vector (0, 0, 0) +SWEP.SightsPos = Vector (-1.7102, 0, 0.2585) +SWEP.SightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector(3.444, -7.823, -6.27) +SWEP.RunSightsAng = Vector(60.695, 0, 0) +-- SWEP.RunSightsPos = Vector (-0.3967, 0, 2.2339) +-- SWEP.RunSightsAng = Vector (-17.3454, -2.6248, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_dragunov/shared.lua b/ftp_gmstranded/entities/weapons/m9k_dragunov/shared.lua new file mode 100644 index 0000000..942e2ba --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_dragunov/shared.lua @@ -0,0 +1,89 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_dragunov") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Sniper Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "SVD Dragunov" -- Weapon name (Shown on HUD) +SWEP.Slot = 4 -- Slot in the weapon selection menu +SWEP.SlotPos = 41 -- 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 from hip +SWEP.XHair = false -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.Weight = 50 -- 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.BoltAction = false -- Is this a bolt action rifle? +SWEP.HoldType = "rpg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_dragunov02.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_svd_dragunov.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weapon_svd01.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 400 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 10 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = .6 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = .5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "SniperPenetratedRound" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.ScopeZoom = 9 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = false -- I mean it, only one +SWEP.Secondary.UseSVD = true -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 90 --base damage per bullet +SWEP.Primary.Spread = .01 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .00012 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector(-1.241, -1.476, 0) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(-1.241, -1.476, 0) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(3.934, -5.41, 0) +SWEP.RunSightsAng = Vector(-11.476, 35, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_f2000/shared.lua b/ftp_gmstranded/entities/weapons/m9k_f2000/shared.lua new file mode 100644 index 0000000..9734a83 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_f2000/shared.lua @@ -0,0 +1,90 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_f2000") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "iron angles by Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "F2000" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- 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 = true -- Set false if you want no crosshair from hip +SWEP.XHair = true -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.Weight = 30 -- 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.BoltAction = false -- Is this a bolt action rifle? +SWEP.HoldType = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_tct_f2000.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_fn_f2000.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weapon_F2000.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 850 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = .4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = .4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = .4 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic/Semi Auto +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets +SWEP.SelectiveFire = true + +SWEP.Secondary.ScopeZoom = 4 +SWEP.Secondary.UseACOG = true -- Choose one scope type +SWEP.Secondary.UseMilDot = false -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.5 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 23 --base damage per bullet +SWEP.Primary.Spread = .025 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector(3.499, 0, 1.08) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(3.499, 0, 1.08) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(-7.705, -2.623, 1.475) +SWEP.RunSightsAng = Vector(-11.476, -55.083, -2.296) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_fal/shared.lua b/ftp_gmstranded/entities/weapons/m9k_fal/shared.lua new file mode 100644 index 0000000..0a4af98 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_fal/shared.lua @@ -0,0 +1,80 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_fal") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "FN FAL" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 28 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 55 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_fnfalnato.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_fn_fal.mdl" -- Weapon world model +SWEP.ShowWorldModel = true +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("fnfal.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 750 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 20 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.5 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 30 -- Base damage per bullet +SWEP.Primary.Spread = .02 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .01 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-3.161, -1.068, 1.24) +SWEP.IronSightsAng = Vector(0.425, 0.05, 0) +SWEP.SightsPos = Vector(-3.161, -1.068, 1.24) +SWEP.SightsAng = Vector(0.425, 0.05, 0) +SWEP.RunSightsPos = Vector(2.598, -2.441, 0.36) +SWEP.RunSightsAng = Vector(-7.993, 37.756, -6.89) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_famas/shared.lua b/ftp_gmstranded/entities/weapons/m9k_famas/shared.lua new file mode 100644 index 0000000..6f20bde --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_famas/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_famas") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "FAMAS" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 29 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_tct_famas.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_tct_famas.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_FAMTC.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 950 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.4 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 29 -- Base damage per bullet +SWEP.Primary.Spread = .025 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-3.342, 0, 0.247) +SWEP.IronSightsAng = Vector(0, -0.438, 0) +SWEP.SightsPos = Vector(-3.342, 0, 0.247) +SWEP.SightsAng = Vector(0, -0.438, 0) +SWEP.RunSightsPos = Vector (0.9926, -3.6313, 0.4169) +SWEP.RunSightsAng = Vector (-9.1165, 43.8507, -18.2067) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_fg42/shared.lua b/ftp_gmstranded/entities/weapons/m9k_fg42/shared.lua new file mode 100644 index 0000000..ae86d31 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_fg42/shared.lua @@ -0,0 +1,78 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_fg42") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Machine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "FG 42" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 33 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_rif_fg42.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_fg42.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("FG42_weapon.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 900 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 20 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.3 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" +-- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a metal peircing shotgun slug + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 38 -- Base damage per bullet +SWEP.Primary.Spread = .02 -- Define from-the-hip accuracy (1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .01 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(3.47, -6.078, 1.93) +SWEP.IronSightsAng = Vector(0.216, -0.082, 0) +SWEP.SightsPos = Vector(3.47, -6.078, 1.93) +SWEP.SightsAng = Vector(0.216, -0.082, 0) +SWEP.RunSightsPos = Vector(-5.738, -1.803, 0) +SWEP.RunSightsAng = Vector(-7.46, -47.624, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_g36/shared.lua b/ftp_gmstranded/entities/weapons/m9k_g36/shared.lua new file mode 100644 index 0000000..c8ed03a --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_g36/shared.lua @@ -0,0 +1,80 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_g36") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "G36" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 31 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_rif_g362.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_hk_g36c.mdl" -- Weapon world model +SWEP.ShowWorldModel = true +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("G36.single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 750 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.3 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 28 -- Base damage per bullet +SWEP.Primary.Spread = .02 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .01 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(2.865, -0.857, 1.06) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(2.865, -0.857, 1.06) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(-6, -2.571, -0.04) +SWEP.RunSightsAng = Vector(-11, -43, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_g3a3/shared.lua b/ftp_gmstranded/entities/weapons/m9k_g3a3/shared.lua new file mode 100644 index 0000000..272f3eb --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_g3a3/shared.lua @@ -0,0 +1,81 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_g3a3") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "HK G3A3" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 30 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_hk_g3_rif.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_hk_g3.mdl" -- Weapon world model +SWEP.ShowWorldModel = true +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("hk_g3_weapon.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 550 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 20 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 33 -- Base damage per bullet +SWEP.Primary.Spread = .026 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .016 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-2.419, -2.069, 1.498) +SWEP.IronSightsAng = Vector(-0.109, -0.281, 0) +SWEP.SightsPos = Vector(-2.419, -2.069, 1.498) +SWEP.SightsAng = Vector(-0.109, -0.281, 0) +SWEP.RunSightsPos = Vector(3.384, -3.044, -0.264) +SWEP.RunSightsAng = Vector(-7.402, 43.334, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_glock/shared.lua b/ftp_gmstranded/entities/weapons/m9k_glock/shared.lua new file mode 100644 index 0000000..6d2ab5c --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_glock/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_glock") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Glock 18" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 22 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "pistol" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_dmg_glock.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_dmg_glock.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Dmgfok_glock.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 1200 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 32 -- Size of a clip +SWEP.Primary.DefaultClip = 64 -- Bullets you start with +SWEP.Primary.KickUp = 0.4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "pistol" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 12 -- Base damage per bullet +SWEP.Primary.Spread = .03 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .02 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector (2.2042, 0, 1.7661) +SWEP.IronSightsAng = Vector (0, 0, 0) +SWEP.SightsPos = Vector (2.2042, 0, 1.7661) +SWEP.SightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector (0.4751, 0, 1.8442) +SWEP.RunSightsAng = Vector (-17.6945, -1.4012, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_hk45/shared.lua b/ftp_gmstranded/entities/weapons/m9k_hk45/shared.lua new file mode 100644 index 0000000..2d7318b --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_hk45/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_hk45") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "HK45C" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 23 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "pistol" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 60 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_pist_hk45.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_hk45c.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_hk45.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 750 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 8 -- Size of a clip +SWEP.Primary.DefaultClip = 45 -- Bullets you start with +SWEP.Primary.KickUp = 0.4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "pistol" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 25 -- Base damage per bullet +SWEP.Primary.Spread = .025 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-2.32, 0, 0.86) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(-2.32, 0, 0.86) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(3.444, -7.823, -6.27) +SWEP.RunSightsAng = Vector(60.695, 0, 0) +-- SWEP.RunSightsPos = Vector(0, -3.143, 0.857) +-- SWEP.RunSightsAng = Vector(-11, 9, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_honeybadger/shared.lua b/ftp_gmstranded/entities/weapons/m9k_honeybadger/shared.lua new file mode 100644 index 0000000..476c1c8 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_honeybadger/shared.lua @@ -0,0 +1,101 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_honeybadger") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "AAC Honey Badger" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 43 -- 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 = true -- Set false if you want no crosshair from hip +SWEP.Weight = 50 -- 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.XHair = true -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.BoltAction = false -- Is this a bolt action rifle? +SWEP.HoldType = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_aacbadger.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_aac_honeybadger.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weapon_HoneyB.single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 791 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = .5 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = .3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = .5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic/Semi Auto +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.ScopeZoom = 3.5 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = false -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = true + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 24 --base damage per bullet +SWEP.Primary.Spread = .023 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .014 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector(-3.096, -3.695, 0.815) +SWEP.IronSightsAng = Vector(0.039, 0, 0) +SWEP.SightsPos = Vector(-3.096, -3.695, 0.815) +SWEP.SightsAng = Vector(0.039, 0, 0) +SWEP.RunSightsPos = Vector(4.094, -2.454, -0.618) +SWEP.RunSightsAng = Vector(-8.957, 53.188, -9.195) + +SWEP.WElements = { + ["lense"] = { type = "Model", model = "models/XQM/panel360.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(4.671, 0.832, -8.141), angle = Angle(0, 0, 0), size = Vector(0.039, 0.039, 0.039), color = Color(255, 255, 255, 255), surpresslightning = false, material = "models/wystan/attachments/aimpoint/lense", skin = 0, bodygroup = {} }, + ["scope"] = { type = "Model", model = "models/wystan/attachments/aimpoint.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(-2.543, 0.463, 1.733), angle = Angle(-180, 90, 0), size = Vector(1.45,1.45,1.45), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} }, + ["lense+"] = { type = "Model", model = "models/XQM/panel360.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(10.041, 0.832, -8.1), angle = Angle(0, 0, 0), size = Vector(0.039, 0.039, 0.039), color = Color(255, 255, 255, 255), surpresslightning = false, material = "models/wystan/attachments/aimpoint/lense", skin = 0, bodygroup = {} } +} + +SWEP.VElements = { + ["aimpoint"] = { type = "Model", model = "models/wystan/attachments/aimpoint.mdl", bone = "Gun", rel = "", pos = Vector(0.228, 7.487, -4.416), angle = Angle(0, 180, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} }, + ["lense"] = { type = "Model", model = "models/XQM/panel360.mdl", bone = "Gun", rel = "aimpoint", pos = Vector(0.298, 4.546, 6.756), angle = Angle(0, 90, 38.293), size = Vector(0.024, 0.024, 0.024), color = Color(255, 255, 255, 255), surpresslightning = false, material = "models/wystan/attachments/aimpoint/lense", skin = 0, bodygroup = {} } +} + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_intervention/shared.lua b/ftp_gmstranded/entities/weapons/m9k_intervention/shared.lua new file mode 100644 index 0000000..8e4a17a --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_intervention/shared.lua @@ -0,0 +1,88 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_intervention") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Sniper Rifles" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Intervention" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 42 -- 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 from hip +SWEP.XHair = false -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.Weight = 50 -- 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.BoltAction = true -- Is this a bolt action rifle? +SWEP.HoldType = "rpg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_snip_int.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_snip_int.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weapon_INT.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 35 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 5 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = .6 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = .4 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "SniperPenetratedRound" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.ScopeZoom = 10 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = true -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 95 --base damage per bullet +SWEP.Primary.Spread = .01 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .0001 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector (2.2263, -0.0007, 0.115) +SWEP.IronSightsAng = Vector (0, 0, 0) +SWEP.SightsPos = Vector (2.2263, -0.0007, 0.115) +SWEP.SightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 1.3965) +SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_ithacam37/shared.lua b/ftp_gmstranded/entities/weapons/m9k_ithacam37/shared.lua new file mode 100644 index 0000000..ea57e06 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_ithacam37/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_ithacam37") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Shotguns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Ithaca M37" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 22 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "shotgun" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_ithaca_m37shot.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_ithaca_m37.mdl" -- Weapon world model +SWEP.Base = "bobs_shotty_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("IthacaM37.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 60 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 6 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Default number of bullets in a clip +SWEP.Primary.KickUp = .9 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.6 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.6 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "buckshot" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! +SWEP.ShellTime = .4 + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 8 -- How many bullets to shoot per trigger pull, AKA pellets +SWEP.Primary.Damage = 12 -- Base damage per bullet +SWEP.Primary.Spread = .023 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .023 -- Ironsight accuracy, should be the same for shotguns +-- Because irons don't magically give you less pellet spread! + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(2.16, -1.429, 0.6) +SWEP.IronSightsAng = Vector(3, 0, 0) +SWEP.SightsPos = Vector(2.16, -1.429, 0.6) +SWEP.SightsAng = Vector(3, 0, 0) +SWEP.RunSightsPos = Vector(-3.116, -3.935, 0.492) +SWEP.RunSightsAng = Vector(-19.894, -47.624, 10.902) + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_jackhammer/shared.lua b/ftp_gmstranded/entities/weapons/m9k_jackhammer/shared.lua new file mode 100644 index 0000000..b069e27 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_jackhammer/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_jackhammer") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Shotguns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Pancor Jackhammer" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 23 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_jackhammer2.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_pancor_jackhammer.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_Jackhammer.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 240 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 10 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.5 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.4 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "buckshot" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 6 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 10 -- Base damage per bullet +SWEP.Primary.Spread = .045 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .045 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(4.026, -2.296, 0.917) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(4.026, -2.296, 0.917) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(-3.116, -3.935, 0.492) +SWEP.RunSightsAng = Vector(-19.894, -47.624, 10.902) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_kac_pdw/shared.lua b/ftp_gmstranded/entities/weapons/m9k_kac_pdw/shared.lua new file mode 100644 index 0000000..72e2383 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_kac_pdw/shared.lua @@ -0,0 +1,94 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_kac_pdw") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "KAC PDW" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 44 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "smg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_kac_pdw1.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_kac_pdw.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("KAC_PDW.Single") -- Script that calls the primary fire sound +SWEP.Primary.SilencedSound = Sound("KAC_PDW.SilentSingle") +SWEP.Primary.RPM = 600 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.1 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.2 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.CanBeSilenced = true + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 15 -- Base damage per bullet +SWEP.Primary.Spread = .025 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(3.342, 0, 0.759) +SWEP.IronSightsAng = Vector(2.46, -0.025, 0) +SWEP.SightsPos = Vector(3.342, 0, 0.759) +SWEP.SightsAng = Vector(2.46, -0.025, 0) +SWEP.RunSightsPos = Vector(-4.646, -4.173, 0) +SWEP.RunSightsAng = Vector(-10.197, -53.189, 0) + +SWEP.WElements = { + ["eotech"] = { type = "Model", model = "models/wystan/attachments/eotech557sight.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(-7.539, 1.485, 10.295), angle = Angle(-172.297, 180, 0), size = Vector(1.378, 1.378, 1.378), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} } +} + +SWEP.VElements = { + ["eotech"] = { type = "Model", model = "models/wystan/attachments/eotech557sight.mdl", bone = "DrawCall_0", rel = "", pos = Vector(-0.281, 10.85, -6.398), angle = Angle(0, 90, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} } +} + +SWEP.ViewModelBoneMods = { + ["DrawCall_0009"] = { scale = Vector(1, 1, 1), pos = Vector(-0.154, 0, 0), angle = Angle(0, 0, 0) } +} + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_l85/shared.lua b/ftp_gmstranded/entities/weapons/m9k_l85/shared.lua new file mode 100644 index 0000000..1e30308 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_l85/shared.lua @@ -0,0 +1,91 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_l85") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "L85" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 32 -- 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 = true -- Set false if you want no crosshair from hip +SWEP.Weight = 50 -- 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.XHair = true -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.BoltAction = false -- Is this a bolt action rifle? +SWEP.HoldType = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_rif_l85.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_l85a2.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weapon_l85.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 675 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = .4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = .4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = .5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic/Semi Auto +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.ScopeZoom = 4 +SWEP.Secondary.UseACOG = true -- Choose one scope type +SWEP.Secondary.UseMilDot = false -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.5 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 29 --base damage per bullet +SWEP.Primary.Spread = .023 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector (2.275, -2.9708, 0.5303) +SWEP.IronSightsAng = Vector (0, 0, 0) +SWEP.SightsPos = Vector (2.275, -2.9708, 0.5303) +SWEP.SightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector (-3.0328, 0, 1.888) +SWEP.RunSightsAng = Vector (-24.2146, -36.522, 10) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_luger/shared.lua b/ftp_gmstranded/entities/weapons/m9k_luger/shared.lua new file mode 100644 index 0000000..aebad26 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_luger/shared.lua @@ -0,0 +1,78 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_luger") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "P08 Luger" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 24 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "pistol" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_p08_luger.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_luger_p08.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("weapon_luger.single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 825 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 8 -- Size of a clip +SWEP.Primary.DefaultClip = 45 -- Bullets you start with +SWEP.Primary.KickUp = 0.35 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.2 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "pistol" +-- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a metal peircing shotgun slug + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 23 -- Base damage per bullet +SWEP.Primary.Spread = .021 -- Define from-the-hip accuracy (1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .011 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(2.71, -2.122, 2.27) +SWEP.IronSightsAng = Vector(0.563, -0.013, 0) +SWEP.SightsPos = Vector(2.71, -2.122, 2.27) +SWEP.SightsAng = Vector(0.563, -0.013, 0) +SWEP.RunSightsPos = Vector(0, 0, 2.575) +SWEP.RunSightsAng = Vector(-14.657, 0, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_m14sp/shared.lua b/ftp_gmstranded/entities/weapons/m9k_m14sp/shared.lua new file mode 100644 index 0000000..d4bf65c --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_m14sp/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_m14sp") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "M14" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 34 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_snip_m14sp.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_snip_m14sp.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_M14SP.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 750 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 20 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.6 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.6 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.6 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 45 -- How much you 'zoom' in. Less is more! + +SWEP.SelectiveFire = true + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 32 -- Base damage per bullet +SWEP.Primary.Spread = .01 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .001 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector (-2.7031, -1.0539, 1.6562) +SWEP.IronSightsAng = Vector (0, 0, 0) +SWEP.SightsPos = Vector (-2.7031, -1.0539, 1.6562) +SWEP.SightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector (0.9642, -0.6371, 0.4936) +SWEP.RunSightsAng = Vector (-11.0116, 47.5223, -15.3199) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_m16a4_acog/shared.lua b/ftp_gmstranded/entities/weapons/m9k_m16a4_acog/shared.lua new file mode 100644 index 0000000..952eb89 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_m16a4_acog/shared.lua @@ -0,0 +1,88 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_m16a4_acog") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "M16A4 ACOG" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 35 -- 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 = true -- Set false if you want no crosshair from hip +SWEP.Weight = 30 -- 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.XHair = true -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.BoltAction = false -- Is this a bolt action rifle? +SWEP.HoldType = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_M16_acog.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_dmg_m16ag.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Dmgfok_M16A4.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 850 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = .4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = .4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = .6 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets +SWEP.SelectiveFire = true + +SWEP.Secondary.ScopeZoom = 4 +SWEP.Secondary.UseACOG = true -- Choose one scope type +SWEP.Secondary.UseMilDot = false -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.5 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 30 --base damage per bullet +SWEP.Primary.Spread = .015 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .01 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector (2.275, -2.9708, 0.5303) +SWEP.IronSightsAng = Vector (0, 0, 0) +SWEP.SightsPos = Vector (2.275, -2.9708, 0.5303) +SWEP.SightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector (-3.0328, 0, 1.888) +SWEP.RunSightsAng = Vector (-24.2146, -36.522, 10) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_m1918bar/shared.lua b/ftp_gmstranded/entities/weapons/m9k_m1918bar/shared.lua new file mode 100644 index 0000000..e227975 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_m1918bar/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_m1918bar") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Machine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "M1918 BAR" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 36 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_m1918bar.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_m1918_bar.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_bar1.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 450 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 20 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.6 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 40 -- Base damage per bullet +SWEP.Primary.Spread = .025 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(3.313, 0, 1.399) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(3.313, 0, 1.399) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(-7.049, -8.525, -2.132) +SWEP.RunSightsAng = Vector(0, -58.526, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_m24/shared.lua b/ftp_gmstranded/entities/weapons/m9k_m24/shared.lua new file mode 100644 index 0000000..6c7cf25 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_m24/shared.lua @@ -0,0 +1,89 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_m24") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Sniper Rifles" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "M24" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 43 -- 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 from hip +SWEP.XHair = false -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.Weight = 50 -- 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.BoltAction = true -- Is this a bolt action rifle? +SWEP.HoldType = "rpg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_dmg_m24s.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_snip_m24_6.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Dmgfok_M24SN.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 40 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 5 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = .6 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = .6 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = .6 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "SniperPenetratedRound" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.ScopeZoom = 9 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = true -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 97 --base damage per bullet +SWEP.Primary.Spread = .01 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .000115 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector (2.894, 0, 1.7624) +SWEP.IronSightsAng = Vector (0, 0, 0) +SWEP.SightsPos = Vector (2.894, 0, 1.7624) +SWEP.SightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 2.3965) +SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_m249lmg/shared.lua b/ftp_gmstranded/entities/weapons/m9k_m249lmg/shared.lua new file mode 100644 index 0000000..4d7f08a --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_m249lmg/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_m249lmg") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Machine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "M249 LMG" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 35 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_machinegun249.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_m249_machine_gun.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_249M.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 855 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 150 -- Size of a clip +SWEP.Primary.DefaultClip = 300 -- Bullets you start with +SWEP.Primary.KickUp = 0.6 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 27 -- Base damage per bullet +SWEP.Primary.Spread = .035 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .024 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-4.015, 0, 1.764) +SWEP.IronSightsAng = Vector(0, -0.014, 0) +SWEP.SightsPos = Vector(-4.015, 0, 1.764) +SWEP.SightsAng = Vector(0, -0.014, 0) +SWEP.RunSightsPos = Vector(5.081, -4.755, -1.476) +SWEP.RunSightsAng = Vector(0, 41.884, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_m29satan/shared.lua b/ftp_gmstranded/entities/weapons/m9k_m29satan/shared.lua new file mode 100644 index 0000000..03359aa --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_m29satan/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_m29satan") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "M29 Satan" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 25 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "revolver" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 60 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_pist_satan2.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_m29_satan.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("weapon_satan1.single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 115 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 6 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.5 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "357" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 32 -- Base damage per bullet +SWEP.Primary.Spread = .015 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .01 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-2.82, -1.247, 0.456) +SWEP.IronSightsAng = Vector(0.505, 2.407, 0) +SWEP.SightsPos = Vector(-2.82, -1.247, 0.456) +SWEP.SightsAng = Vector(0.505, 2.407, 0) +SWEP.RunSightsPos = Vector(2.068, -9.632, -5.983) +SWEP.RunSightsAng = Vector(61.171, -5.269, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_m3/shared.lua b/ftp_gmstranded/entities/weapons/m9k_m3/shared.lua new file mode 100644 index 0000000..f49fb21 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_m3/shared.lua @@ -0,0 +1,80 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_m3") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Shotguns" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Benelli M3" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 24 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "shotgun" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_benelli_m3_s90.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_benelli_m3.mdl" -- Weapon world model +SWEP.Base = "bobs_shotty_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("BenelliM3.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 70 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 8 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Default number of bullets in a clip +SWEP.Primary.KickUp = 0.8 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.5 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "buckshot" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.ShellTime = .45 + +SWEP.Primary.NumShots = 9 -- How many bullets to shoot per trigger pull, AKA pellets +SWEP.Primary.Damage = 10 -- Base damage per bullet +SWEP.Primary.Spread = .0326 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .0326 -- Ironsight accuracy, should be the same for shotguns +-- Because irons don't magically give you less pellet spread! + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(2.279, -1.007, 1.302) +SWEP.IronSightsAng = Vector(0.47, -0.024, 0) +SWEP.SightsPos = Vector(2.279, -1.007, 1.302) +SWEP.SightsAng = Vector(0.47, -0.024, 0) +SWEP.RunSightsPos = Vector(-7.639, -7.796, 0.865) +SWEP.RunSightsAng = Vector(-17.362, -69.724, 0) + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_m416/shared.lua b/ftp_gmstranded/entities/weapons/m9k_m416/shared.lua new file mode 100644 index 0000000..3849658 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_m416/shared.lua @@ -0,0 +1,83 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_m416") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "HK 416" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 36 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_hk416rif.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_hk_416.mdl" -- Weapon world model +SWEP.ShowWorldModel = true +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("hk416weapon.UnsilSingle") -- Script that calls the primary fire sound +SWEP.Primary.SilencedSound = Sound("hk416weapon.SilencedSingle") +SWEP.Primary.RPM = 800 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.6 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.CanBeSilenced = true +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 30 -- Base damage per bullet +SWEP.Primary.Spread = .025 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-2.892, -2.132, 0.5) +SWEP.IronSightsAng = Vector(-0.033, 0.07, 0) +SWEP.SightsPos = Vector(-2.892, -2.132, 0.5) +SWEP.SightsAng = Vector(-0.033, 0.07, 0) +SWEP.RunSightsPos = Vector(2.125, -0.866, 1.496) +SWEP.RunSightsAng = Vector(-18.08, 30.59, 0) + +SWEP.SelectiveFire = true + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_m4a1/shared.lua b/ftp_gmstranded/entities/weapons/m9k_m4a1/shared.lua new file mode 100644 index 0000000..ddad4da --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_m4a1/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_m4a1") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "M4A1 Iron" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 33 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_m4a1_iron.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_m4a1_iron.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Dmgfok_M4A1.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 800 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 30 -- Base damage per bullet +SWEP.Primary.Spread = .02 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .01 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector (2.4537, 1.0923, 0.2696) +SWEP.IronSightsAng = Vector (-0.0105, -0.0061, 0) +SWEP.SightsPos = Vector (2.4537, 1.0923, 0.2696) +SWEP.SightsAng = Vector (-0.0105, -0.0061, 0) +SWEP.RunSightsPos = Vector (-3.0328, 0, 1.888) +SWEP.RunSightsAng = Vector (-24.2146, -36.522, 10) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_m60/shared.lua b/ftp_gmstranded/entities/weapons/m9k_m60/shared.lua new file mode 100644 index 0000000..85aca0a --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_m60/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_m60") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Machine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "M60 Machine Gun" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 34 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_m60machinegun.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_m60_machine_gun.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_M_60.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 575 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 200 -- Size of a clip +SWEP.Primary.DefaultClip = 400 -- Bullets you start with +SWEP.Primary.KickUp = 0.6 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 33 -- Base damage per bullet +SWEP.Primary.Spread = .035 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .025 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-5.851, -2.763, 3.141) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(-5.851, -2.763, 3.141) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(8.689, -3.444, -0.82) +SWEP.RunSightsAng = Vector(0, 44.18, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_m92beretta/shared.lua b/ftp_gmstranded/entities/weapons/m9k_m92beretta/shared.lua new file mode 100644 index 0000000..9a9e646 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_m92beretta/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_m92beretta") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "M92 Beretta" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 26 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "pistol" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_pistberettam92.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_beretta_m92.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_m92b.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 500 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 15 -- Size of a clip +SWEP.Primary.DefaultClip = 45 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.5 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "pistol" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 //how many bullets to shoot, use with shotguns +SWEP.Primary.Damage = 14 //base damage, scaled by game +SWEP.Primary.Spread = .027 //define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .019 // has to be the same as primary.spread + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-2.379, 0, 1.205) +SWEP.IronSightsAng = Vector(0.05, 0, 0) +SWEP.SightsPos = Vector(-2.379, 0, 1.205) +SWEP.SightsAng = Vector(0.05, 0, 0) +SWEP.RunSightsPos = Vector(3.444, -7.823, -6.27) +SWEP.RunSightsAng = Vector(60.695, 0, 0) +-- SWEP.RunSightsPos = Vector(0, 0, 0) +-- SWEP.RunSightsAng = Vector(-10.903, 6.885, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_m98b/shared.lua b/ftp_gmstranded/entities/weapons/m9k_m98b/shared.lua new file mode 100644 index 0000000..882aefe --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_m98b/shared.lua @@ -0,0 +1,90 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_m98b") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Sniper Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Barret M98B" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 44 -- 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 from hip +SWEP.XHair = false -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.Weight = 50 -- 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.BoltAction = true -- Is this a bolt action rifle? +SWEP.HoldType = "rpg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_m98bravo.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_barrett_m98b.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("M98.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 50 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 10 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 1 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 1 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "SniperPenetratedRound" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.ScopeZoom = 9 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = false -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = true +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 90 --base damage per bullet +SWEP.Primary.Spread = .001 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .0001 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector(-2.196, -2, 1) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(-2.196, -2, 1) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(3.714, -3.714, 0.286) +SWEP.RunSightsAng = Vector(-7, 43, 0) + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_magpulpdr/shared.lua b/ftp_gmstranded/entities/weapons/m9k_magpulpdr/shared.lua new file mode 100644 index 0000000..3246a4b --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_magpulpdr/shared.lua @@ -0,0 +1,80 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_magpulpdr") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Magpul PDR" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 45 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "smg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_pdr_smg.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_magpul_pdr.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("MAG_PDR.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 575 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.3 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 30 -- Base damage per bullet +SWEP.Primary.Spread = .03 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .02 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(4.8, 0, 2.079) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(4.8, 0, 2.079) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(-2.437, -1.364, 1.45) +SWEP.RunSightsAng = Vector(-15.263, -41.1, 0) + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_minigun/shared.lua b/ftp_gmstranded/entities/weapons/m9k_minigun/shared.lua new file mode 100644 index 0000000..3d23239 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_minigun/shared.lua @@ -0,0 +1,125 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_minigun") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Machine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "M134 Minigun" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 37 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "crossbow" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_minigunvulcan.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_m134_minigun.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("BlackVulcan.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 3500 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 100 -- Size of a clip +SWEP.Primary.DefaultClip = 200 -- Bullets you start with +SWEP.Primary.KickUp = 0.5 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.6 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.6 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 0 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 25 -- Base damage per bullet +SWEP.Primary.Spread = .035 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .035 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.RunSightsPos = Vector(0, -11.148, -8.033) +SWEP.RunSightsAng = Vector(55.082, 0, 0) + +if ((gmod.GetGamemode().Name) == "Murderthon 9000") or ((gmod.GetGamemode().Name) == "Murderthon 9000 beta") then + SWEP.Primary.ClipSize = 100 -- Size of a clip + SWEP.Primary.DefaultClip = 200 -- Bullets you start with +else + SWEP.Primary.ClipSize = 300 -- Size of a clip + SWEP.Primary.DefaultClip = 600 -- Bullets you start with +end + +function SWEP:Reload() + + self.Weapon:DefaultReload(ACT_VM_RELOAD) + if !self.Owner:IsNPC() then + self.ResetSights = CurTime() + self.Owner:GetViewModel():SequenceDuration() end + if ( self.Weapon:Clip1() < self.Primary.ClipSize ) and !self.Owner:IsNPC() then + -- When the current clip < full clip and the rest of your ammo > 0, then + self.Owner:SetFOV( 0, 0.3 ) + -- Zoom = 0 + self:SetIronsights(false) + -- Set the ironsight to false + self.Weapon:SetNWBool("Reloading", true) + end + local waitdammit = (self.Owner:GetViewModel():SequenceDuration()) + self:MiniGunIdle(waitdammit) +end + +function SWEP:MiniGunIdle(wait) + timer.Simple(wait + .05, function() + if self.Weapon != nil then + self.Weapon:SetNWBool("Reloading", false) + if SERVER then + self.Weapon:SendWeaponAnim( ACT_VM_IDLE ) + else return end end + end) +end + +function SWEP:IronSight() + + if self.Owner:KeyDown(IN_SPEED) and not (self.Weapon:GetNWBool("Reloading")) then // If you run then + self.Weapon:SetNextPrimaryFire(CurTime()+0.5) // Make it so you can't shoot for another quarter second + self.IronSightsPos = self.RunSightsPos // Hold it down + self.IronSightsAng = self.RunSightsAng // Hold it down + self:SetIronsights(true, self.Owner) // Set the ironsight true + self.Owner:SetFOV( 0, 0.3 ) // Reset FOV + end + + if self.Owner:KeyReleased(IN_SPEED) then // If you stop running then + self:SetIronsights(false, self.Owner) // Set the ironsight true + self.Owner:SetFOV( 0, 0.3 ) // Reset FOV + end + +end + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_model3russian/shared.lua b/ftp_gmstranded/entities/weapons/m9k_model3russian/shared.lua new file mode 100644 index 0000000..9007923 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_model3russian/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_model3russian") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "S & W Model 3 Russian" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "revolver" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 60 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_pist_model3.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_model_3_rus.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Model3.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 115 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 6 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.5 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "357" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 30 -- Base damage per bullet +SWEP.Primary.Spread = .02 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .01 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(4.06, 0, 0.876) +SWEP.IronSightsAng = Vector(-0.207, 0, 0) +SWEP.SightsPos = Vector(4.06, 0, 0.876) +SWEP.SightsAng = Vector(-0.207, 0, 0) +SWEP.RunSightsPos = Vector(-0.165, -10.329, -5.41) +SWEP.RunSightsAng = Vector(70, 0, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_model500/shared.lua b/ftp_gmstranded/entities/weapons/m9k_model500/shared.lua new file mode 100644 index 0000000..5d1b2cf --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_model500/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_model500") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "S&W Model 500" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 28 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "revolver" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_swmodel_500.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_sw_model_500.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Model_500.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 100 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 5 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 1 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "357" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 40 -- Base damage per bullet +SWEP.Primary.Spread = .02 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-1.923, -1.675, 0.374) +SWEP.IronSightsAng = Vector(0.052, 0, 0) +SWEP.SightsPos = Vector(-1.923, -1.675, 0.374) +SWEP.SightsAng = Vector(0.052, 0, 0) +SWEP.RunSightsPos = Vector(3.444, -7.823, -6.27) +SWEP.RunSightsAng = Vector(60.695, 0, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_model627/shared.lua b/ftp_gmstranded/entities/weapons/m9k_model627/shared.lua new file mode 100644 index 0000000..1cd7a4b --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_model627/shared.lua @@ -0,0 +1,78 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_model627") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "S&W Model 627" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 29 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "revolver" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_swmodel_627.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_sw_model_627.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("model_627perf.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 120 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 6 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Bullets you start with +SWEP.Primary.KickUp = 0.3 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "357" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 20 -- Base damage per bullet +SWEP.Primary.Spread = .01 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .001 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(2.68, 0.019, 1.521) +SWEP.IronSightsAng = Vector(-0.141, -0.139, 0) +SWEP.SightsPos = Vector(2.68, 0.019, 1.521) +SWEP.SightsAng = Vector(-0.141, -0.139, 0) +SWEP.RunSightsPos = Vector(-2.419, -4.467, -4.693) +SWEP.RunSightsAng = Vector(56.766, 0, 0) + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_mossberg590/shared.lua b/ftp_gmstranded/entities/weapons/m9k_mossberg590/shared.lua new file mode 100644 index 0000000..f03b634 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_mossberg590/shared.lua @@ -0,0 +1,80 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_mossberg590") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Shotguns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Mossberg 590" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 25 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "shotgun" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 60 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_shot_mberg_590.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_mossberg_590.mdl" -- Weapon world model +SWEP.Base = "bobs_shotty_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Mberg_590.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 75 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 8 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Default number of bullets in a clip +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.8 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.8 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "buckshot" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! +SWEP.ShellTime = .5 + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 10 -- How many bullets to shoot per trigger pull, AKA pellets +SWEP.Primary.Damage = 9 -- Base damage per bullet +SWEP.Primary.Spread = .03 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .03 -- Ironsight accuracy, should be the same for shotguns +-- Because irons don't magically give you less pellet spread! + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-2.72, -3.143, 1.26) +SWEP.IronSightsAng = Vector(0, -0.75, 3) +SWEP.SightsPos = Vector(-2.72, -3.143, 1.26) +SWEP.SightsAng = Vector(0, -0.75, 3) +SWEP.RunSightsPos = Vector(7, -9.429, -0.857) +SWEP.RunSightsAng = Vector(-7, 63, 0) + + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_mp40/shared.lua b/ftp_gmstranded/entities/weapons/m9k_mp40/shared.lua new file mode 100644 index 0000000..bbc194d --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_mp40/shared.lua @@ -0,0 +1,80 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_mp40") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "MP40" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 50 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "smg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 55 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_mp40smg.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_mp40smg.mdl" -- Weapon world model +SWEP.ShowWorldModel = true +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("mp40.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 500 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 32 -- Size of a clip +SWEP.Primary.DefaultClip = 64 -- Bullets you start with +SWEP.Primary.KickUp = 0.3 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.2 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.4 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 25 -- Base damage per bullet +SWEP.Primary.Spread = .022 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(3.881, 0.187, 1.626) +SWEP.IronSightsAng = Vector(-0.047, 0, 0) +SWEP.SightsPos = Vector(3.881, 0.187, 1.626) +SWEP.SightsAng = Vector(-0.047, 0, 0) +SWEP.RunSightsPos = Vector(-5.119, -4.173, 0.865) +SWEP.RunSightsAng = Vector(-9.094, -56.496, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_mp5/shared.lua b/ftp_gmstranded/entities/weapons/m9k_mp5/shared.lua new file mode 100644 index 0000000..1af1e02 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_mp5/shared.lua @@ -0,0 +1,81 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_mp5") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "HK MP5" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 46 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_navymp5.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_hk_mp5.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("mp5_navy_Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 800 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.1 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.2 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 22 -- Base damage per bullet +SWEP.Primary.Spread = .023 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .013 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(2.549, -0.927, 1.09) +SWEP.IronSightsAng = Vector(0.125, -0.071, 0) +SWEP.SightsPos = Vector(2.549, -0.927, 1.09) +SWEP.SightsAng = Vector(0.125, -0.071, 0) +SWEP.RunSightsPos = Vector (-3.0328, 0, 1.888) +SWEP.RunSightsAng = Vector (-24.2146, -36.522, 10) + + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_mp5sd/shared.lua b/ftp_gmstranded/entities/weapons/m9k_mp5sd/shared.lua new file mode 100644 index 0000000..52a8ffe --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_mp5sd/shared.lua @@ -0,0 +1,81 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_mp5sd") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "MP5SD" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 47 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_hkmp5sd.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_hk_mp5sd.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_hkmp5sd.single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 700 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.2 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.2 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 30 -- Base damage per bullet +SWEP.Primary.Spread = .025 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-2.284, -1.446, 0.884) +SWEP.IronSightsAng = Vector(2.368, 0, 0) +SWEP.SightsPos = Vector(-2.284, -1.446, 0.884) +SWEP.SightsAng = Vector(2.368, 0, 0) +SWEP.RunSightsPos = Vector(3.858, -1.655, -0.866) +SWEP.RunSightsAng = Vector(-4.634, 49.493, 0) + + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_mp7/shared.lua b/ftp_gmstranded/entities/weapons/m9k_mp7/shared.lua new file mode 100644 index 0000000..dc62838 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_mp7/shared.lua @@ -0,0 +1,95 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_mp7") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "HK MP7" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 48 -- 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 = true -- Set false if you want no crosshair from hip +SWEP.Weight = 50 -- 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.XHair = true -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.BoltAction = false -- Is this a bolt action rifle? +SWEP.HoldType = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_mp7_silenced.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_mp7_silenced.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weapon_MP7.single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 950 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = .5 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = .4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = .4 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic/Semi Auto +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets +SWEP.SelectiveFire = true + +SWEP.Secondary.ScopeZoom = 4 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = false -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = true + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 24 --base damage per bullet +SWEP.Primary.Spread = .023 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .014 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector (3, -5, 1.5) +SWEP.IronSightsAng = Vector (0, 0, 0) +SWEP.SightsPos = Vector (3, -5, 1.5) +SWEP.SightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector (-3.1731, -5.3573, 1.4608) +SWEP.RunSightsAng = Vector (-18.7139, -48.1596, 0) + +if (gmod.GetGamemode().Name == "Murderthon 9000") then + + SWEP.Slot = 1 -- Slot in the weapon selection menu + SWEP.Weight = 3 -- rank relative ot other weapons. bigger is better + +end + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_mp9/shared.lua b/ftp_gmstranded/entities/weapons/m9k_mp9/shared.lua new file mode 100644 index 0000000..ce01a55 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_mp9/shared.lua @@ -0,0 +1,87 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_mp9") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "MP9" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 49 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_b_t_mp9.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_brugger_thomet_mp9.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_mp9.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 900 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.2 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.1 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.2 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 20 -- Base damage per bullet +SWEP.Primary.Spread = .023 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .014 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(4.073, -3.438, 1.259) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(4.073, -3.438, 1.259) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(-3.708, -6.172, 0) +SWEP.RunSightsAng = Vector(-7.661, -62.523, 0) + + +if (gmod.GetGamemode().Name == "Murderthon 9000") then + + SWEP.Slot = 1 -- Slot in the weapon selection menu + SWEP.Weight = 3 -- rank relative ot other weapons. bigger is better + +end + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_pkm/shared.lua b/ftp_gmstranded/entities/weapons/m9k_pkm/shared.lua new file mode 100644 index 0000000..e1c223a --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_pkm/shared.lua @@ -0,0 +1,80 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_pkm") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Machine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "PKM" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 38 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 55 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_mach_russ_pkm.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_mach_russ_pkm.mdl" -- Weapon world model +SWEP.ShowWorldModel = true +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("pkm.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 750 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 100 -- Size of a clip +SWEP.Primary.DefaultClip = 200 -- Bullets you start with +SWEP.Primary.KickUp = 0.6 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 33 -- Base damage per bullet +SWEP.Primary.Spread = .035 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .02 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-2.215, -2.116, 0.36) +SWEP.IronSightsAng = Vector(-0.13, 0.054, 0) +SWEP.SightsPos = Vector(-2.215, -2.116, 0.36) +SWEP.SightsAng = Vector(-0.13, 0.054, 0) +SWEP.RunSightsPos = Vector(5.276, -3.859, 0) +SWEP.RunSightsAng = Vector(-14.606, 52.087, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_psg1/shared.lua b/ftp_gmstranded/entities/weapons/m9k_psg1/shared.lua new file mode 100644 index 0000000..50ff7d9 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_psg1/shared.lua @@ -0,0 +1,90 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_psg1") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Sniper Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "PSG-1" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 45 -- 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 from hip +SWEP.XHair = false -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.Weight = 50 -- 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.BoltAction = false -- Is this a bolt action rifle? +SWEP.HoldType = "rpg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_psg1_snipe.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_hk_psg1.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weapon_psg_1.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 500 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 10 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 1 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 1 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "SniperPenetratedRound" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.ScopeZoom = 9 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = true -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 90 --base damage per bullet +SWEP.Primary.Spread = .01 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .0001 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector(5.2, 0, 1.16) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(5.2, 0, 1.16) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 2.3965) +SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10) + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_ragingbull/shared.lua b/ftp_gmstranded/entities/weapons/m9k_ragingbull/shared.lua new file mode 100644 index 0000000..0bd6da7 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_ragingbull/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_ragingbull") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Raging Bull" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 30 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "revolver" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_raging_bull.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_taurus_raging_bull.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("weapon_r_bull.single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 115 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 6 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.5 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "357" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 31 -- Base damage per bullet +SWEP.Primary.Spread = .02 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .001 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(2.773, 0, 0.846) +SWEP.IronSightsAng = Vector(-0.157, 0, 0) +SWEP.SightsPos = Vector(2.773, 0, 0.846) +SWEP.SightsAng = Vector(-0.157, 0, 0) +SWEP.RunSightsPos = Vector(0, 2.95, 0) +SWEP.RunSightsAng = Vector(-13.197, 5.737, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_remington1858/shared.lua b/ftp_gmstranded/entities/weapons/m9k_remington1858/shared.lua new file mode 100644 index 0000000..ff573c1 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_remington1858/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_remington1858") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Remington 1858" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 31 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "revolver" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_pist_re1858.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_remington_1858.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Remington.single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 150 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 6 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Bullets you start with +SWEP.Primary.KickUp = 0.9 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.5 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.4 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "357" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 34 -- Base damage per bullet +SWEP.Primary.Spread = .025 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .012 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(5.44, 0, 1.72) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(5.44, 0, 1.72) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(-0.165, -10.329, -5.41) +SWEP.RunSightsAng = Vector(70, 0, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_remington7615p/shared.lua b/ftp_gmstranded/entities/weapons/m9k_remington7615p/shared.lua new file mode 100644 index 0000000..611b9b5 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_remington7615p/shared.lua @@ -0,0 +1,89 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_remington7615p") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Sniper Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Remington 7615P" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 46 -- 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 from hip +SWEP.XHair = false -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.Weight = 50 -- Rank relative ot other weapons. bigger is better +SWEP.AutoSwitchTo = true -- Auto switch to if we pick it up +SWEP.AutoSwitchFrom = false -- Auto switch from if you pick up a better weapon +SWEP.BoltAction = true -- Is this a bolt action rifle? +SWEP.HoldType = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_remington_7615p.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_remington_7615p.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("7615p_remington.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 50 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 10 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 1 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 1 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.ScopeZoom = 7 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = true -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 35 --base damage per bullet +SWEP.Primary.Spread = .01 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .001 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector(3.079, -1.333, 0.437) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(3.079, -1.333, 0.437) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 2.3965) +SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_remington870/shared.lua b/ftp_gmstranded/entities/weapons/m9k_remington870/shared.lua new file mode 100644 index 0000000..3ce0bb7 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_remington870/shared.lua @@ -0,0 +1,80 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_remington870") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Shotguns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Remington 870" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 26 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "shotgun" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_rem870tactical.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_remington_870_tact.mdl" -- Weapon world model +SWEP.Base = "bobs_shotty_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("WepRem870.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 70 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 8 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Default number of bullets in a clip +SWEP.Primary.KickUp = 1.25 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.8 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.4 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "buckshot" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.ShellTime = .45 + +SWEP.Primary.NumShots = 9 -- How many bullets to shoot per trigger pull, AKA pellets +SWEP.Primary.Damage = 10 -- Base damage per bullet +SWEP.Primary.Spread = .035 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .035 -- Ironsight accuracy, should be the same for shotguns +-- Because irons don't magically give you less pellet spread! + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-2.014, 0.1, 1.2) +SWEP.IronSightsAng = Vector(0.551, 0.028, 0) +SWEP.SightsPos = Vector(-2.014, 0.1, 1.2) +SWEP.SightsAng = Vector(0.551, 0.028, 0) +SWEP.RunSightsPos = Vector(6.534, -4.646, 1.654) +SWEP.RunSightsAng = Vector(-19.567, 68.622, 0) + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_scar/shared.lua b/ftp_gmstranded/entities/weapons/m9k_scar/shared.lua new file mode 100644 index 0000000..1a20aa7 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_scar/shared.lua @@ -0,0 +1,84 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_scar") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "SCAR" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 37 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_fnscarh.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_fn_scar_h.mdl" -- Weapon world model +SWEP.ShowWorldModel = true +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Wep_fnscarh.single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 625 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 30 -- Base damage per bullet +SWEP.Primary.Spread = .02 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .01 -- Ironsight accuracy, should be the same for shotguns + +SWEP.SelectiveFire = true + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-2.652, 0.187, -0.003) +SWEP.IronSightsAng = Vector(2.565, 0.034, 0) +SWEP.SightsPos = Vector(-2.652, 0.187, -0.003) +SWEP.SightsAng = Vector(2.565, 0.034, 0) +SWEP.RunSightsPos = Vector(6.063, -1.969, 0) +SWEP.RunSightsAng = Vector(-11.655, 57.597, 3.582) + +SWEP.VElements = { + ["rect"] = { type = "Model", model = "models/hunter/plates/plate1x1.mdl", bone = "gun_root", rel = "", pos = Vector(0, -0.461, 3.479), angle = Angle(0, 0, 90), size = Vector(0.009, 0.009, 0.009), color = Color(255, 255, 255, 255), surpresslightning = false, material = "models/wystan/attachments/eotech/rect", skin = 0, bodygroup = {} } +} + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_scoped_taurus/shared.lua b/ftp_gmstranded/entities/weapons/m9k_scoped_taurus/shared.lua new file mode 100644 index 0000000..cedd3f2 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_scoped_taurus/shared.lua @@ -0,0 +1,85 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_scoped_taurus") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.PrintName = "Raging Bull - Scoped" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 32 -- 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 = true -- Set false if you want no crosshair from hip +SWEP.Weight = 30 -- 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.XHair = true -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.BoltAction = false -- Is this a bolt action rifle? +SWEP.HoldType = "revolver" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_raging_bull_scoped.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_raging_bull_scoped.mdl" -- Weapon world model +SWEP.ShowWorldModel = true +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("weapon_r_bull.single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 115 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 6 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Bullets you start with +SWEP.Primary.KickUp = 10 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = .5 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 1 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "357" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.ScopeZoom = 3 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = true -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.Damage = 31 --base damage per bullet +SWEP.Primary.Spread = .02 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .0001 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(2.773, 0, 0.846) +SWEP.IronSightsAng = Vector(-0.157, 0, 0) +SWEP.SightsPos = Vector(2.773, 0, 0.846) +SWEP.SightsAng = Vector(-0.157, 0, 0) +SWEP.RunSightsPos = Vector(0, 2.95, 0) +SWEP.RunSightsAng = Vector(-13.197, 5.737, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_sig_p229r/shared.lua b/ftp_gmstranded/entities/weapons/m9k_sig_p229r/shared.lua new file mode 100644 index 0000000..7164fc0 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_sig_p229r/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_sig_p229r") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "SIG Sauer P229R" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 33 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "pistol" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_sick_p228.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_sig_229r.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Sauer1_P228.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 500 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 12 -- Size of a clip +SWEP.Primary.DefaultClip = 45 -- Bullets you start with +SWEP.Primary.KickUp = 0.4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "pistol" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 17 -- Base damage per bullet +SWEP.Primary.Spread = .025 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .015 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-2.653, -.686, 1.06) +SWEP.IronSightsAng = Vector(0.3, 0, 0) +SWEP.SightsPos = Vector(-2.653, -.686, 1.06) +SWEP.SightsAng = Vector(0.3, 0, 0) + +SWEP.RunSightsPos = Vector(3.444, -7.823, -6.27) +SWEP.RunSightsAng = Vector(60.695, 0, 0) + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_sl8/shared.lua b/ftp_gmstranded/entities/weapons/m9k_sl8/shared.lua new file mode 100644 index 0000000..873b03b --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_sl8/shared.lua @@ -0,0 +1,90 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_sl8") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Sniper Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "HK SL8" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 47 -- 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 from hip +SWEP.XHair = false -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.Weight = 50 -- 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.BoltAction = false -- Is this a bolt action rifle? +SWEP.HoldType = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_hk_sl8.mdl" +SWEP.WorldModel = "models/weapons/w_hk_sl8.mdl" +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weapon_hksl8.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 300 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = .6 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = .6 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = .6 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic/Semi Auto +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets +SWEP.SelectiveFire = true + +SWEP.Secondary.ScopeZoom = 4 +SWEP.Secondary.UseACOG = true -- Choose one scope type +SWEP.Secondary.UseMilDot = false -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.9 +SWEP.ReticleScale = 0.7 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 60 --base damage per bullet +SWEP.Primary.Spread = .015 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .001 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector(3.079, -1.333, 0.437) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(3.079, -1.333, 0.437) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(-6.22, -5.277, 0) +SWEP.RunSightsAng = Vector(-10.671, -64.598, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_smgp90/shared.lua b/ftp_gmstranded/entities/weapons/m9k_smgp90/shared.lua new file mode 100644 index 0000000..e2e8d71 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_smgp90/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_smgp90") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "FN P90" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 51 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "rpg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_p90_smg.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_fn_p90.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("P90_weapon.single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 900 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 50 -- Size of a clip +SWEP.Primary.DefaultClip = 100 -- Bullets you start with +SWEP.Primary.KickUp = 0.6 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 18 -- Base damage per bullet +SWEP.Primary.Spread = .032 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .02 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(2.707, -2.46, 2.219) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(2.707, -2.46, 2.219) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 2.3965) +SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_spas12/shared.lua b/ftp_gmstranded/entities/weapons/m9k_spas12/shared.lua new file mode 100644 index 0000000..00542e3 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_spas12/shared.lua @@ -0,0 +1,80 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_spas12") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Shotguns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "SPAS 12" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "shotgun" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_spas12_shot.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_spas_12.mdl" -- Weapon world model +SWEP.Base = "bobs_shotty_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("spas_12_shoty.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 350 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 8 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Default number of bullets in a clip +SWEP.Primary.KickUp = 1.5 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.7 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "buckshot" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! +SWEP.ShellTime = .4 + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 10 -- How many bullets to shoot per trigger pull, AKA pellets +SWEP.Primary.Damage = 10 -- Base damage per bullet +SWEP.Primary.Spread = .03 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .03 -- Ironsight accuracy, should be the same for shotguns +-- Because irons don't magically give you less pellet spread! + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(2.657, .394, 1.659) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(2.657, .394, 1.659) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(-3.116, -3.935, 0.492) +SWEP.RunSightsAng = Vector(-19.894, -47.624, 10.902) + + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_sten/shared.lua b/ftp_gmstranded/entities/weapons/m9k_sten/shared.lua new file mode 100644 index 0000000..b8a8a30 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_sten/shared.lua @@ -0,0 +1,84 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_sten") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "STEN" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 52 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_smgsten.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_sten.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weaponsten.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 500 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 32 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.6 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 20 -- Base damage per bullet +SWEP.Primary.Spread = .03 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .016 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(4.367, -1.476, 3.119) +SWEP.IronSightsAng = Vector(-0.213, -0.426, 0) +SWEP.SightsPos = Vector(4.367, -1.476, 3.119) +SWEP.SightsAng = Vector(-0.213, -0.426, 0) +SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 2.3965) +SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10) + +if (gmod.GetGamemode().Name == "Murderthon 9000") then + + SWEP.Slot = 1 -- Slot in the weapon selection menu + SWEP.Weight = 3 -- rank relative ot other weapons. bigger is better + +end + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_striker12/shared.lua b/ftp_gmstranded/entities/weapons/m9k_striker12/shared.lua new file mode 100644 index 0000000..31bfb5c --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_striker12/shared.lua @@ -0,0 +1,74 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_striker12") -- must be the name of your swep +if (GetConVar(SWEP.Gun.."_allowed")) != nil then + if not (GetConVar(SWEP.Gun.."_allowed"):GetBool()) then SWEP.Base = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Shotguns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Striker 12" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 28 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- rank relative to 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 = "ar2" + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_striker_12g.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_striker_12g.mdl" -- Weapon world model +SWEP.Base = "bobs_shotty_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("ShotStriker12.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 365 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 12 -- Size of a clip +SWEP.Primary.DefaultClip = 36 -- Default number of bullets in a clip +SWEP.Primary.KickUp = 4 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.5 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = .6 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic/Semi Auto +SWEP.Primary.Ammo = "buckshot" + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.ShellTime = .3 + +SWEP.Primary.NumShots = 6 -- How many bullets to shoot per trigger pull, AKA pellets +SWEP.Primary.Damage = 8 -- Base damage per bullet +SWEP.Primary.Spread = .04 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .04 -- Ironsight accuracy, should be the same for shotguns +-- Because irons don't magically give you less pellet spread! + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(3.805, -1.045, 1.805) +SWEP.IronSightsAng = Vector(2.502, 3.431, 0) +SWEP.SightsPos = Vector(3.805, -1.045, 1.805) +SWEP.SightsAng = Vector(2.502, 3.431, 0) +SWEP.RunSightsPos = Vector(-3.237, -6.376, 1.167) +SWEP.RunSightsAng = Vector(-8.391, -63.543, 0) + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_svt40/shared.lua b/ftp_gmstranded/entities/weapons/m9k_svt40/shared.lua new file mode 100644 index 0000000..06b3c9b --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_svt40/shared.lua @@ -0,0 +1,91 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_svt40") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Sniper Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "SVT 40" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 48 -- 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 from hip +SWEP.XHair = false -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.Weight = 50 -- 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.BoltAction = false -- Is this a bolt action rifle? +SWEP.HoldType = "rpg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_snip_svt40.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_svt_40.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weapon_SVT40.single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 350 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 10 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 1 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 1 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.ScopeZoom = 5 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = true -- I mean it, only one +SWEP.Secondary.UseSVD = false -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 80 --base damage per bullet +SWEP.Primary.Spread = .01 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .0001 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector(-3.462, -1.775, 0.079) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(-3.462, -1.775, 0.079) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(3.388, -4.501, 0) +SWEP.RunSightsAng = Vector(-9.096, 47.727, 0) + + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_svu/shared.lua b/ftp_gmstranded/entities/weapons/m9k_svu/shared.lua new file mode 100644 index 0000000..fbdbadc --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_svu/shared.lua @@ -0,0 +1,89 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_svu") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Sniper Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Dragunov SVU" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 49 -- 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 from hip +SWEP.XHair = false -- Used for returning crosshair after scope. Must be the same as DrawCrosshair +SWEP.Weight = 50 -- 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.BoltAction = false -- Is this a bolt action rifle? +SWEP.HoldType = "rpg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_sniper_svu.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_dragunov_svu.mdl" -- Weapon world model +SWEP.Base = "bobs_scoped_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weapon_SVU.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 400 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 10 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 1 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 1 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "SniperPenetratedRound" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.ScopeZoom = 9 +SWEP.Secondary.UseACOG = false -- Choose one scope type +SWEP.Secondary.UseMilDot = false -- I mean it, only one +SWEP.Secondary.UseSVD = true -- If you choose more than one, your scope will not show up at all +SWEP.Secondary.UseParabolic = false +SWEP.Secondary.UseElcan = false +SWEP.Secondary.UseGreenDuplex = false +SWEP.Secondary.UseAimpoint = false +SWEP.Secondary.UseMatador = false + +SWEP.data = {} +SWEP.data.ironsights = 1 +SWEP.ScopeScale = 0.7 +SWEP.ReticleScale = 0.6 + +SWEP.Primary.NumShots = 1 --how many bullets to shoot per trigger pull +SWEP.Primary.Damage = 93 --base damage per bullet +SWEP.Primary.Spread = .01 --define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .0001 -- ironsight accuracy, should be the same for shotguns + +-- enter iron sight info and bone mod info below + +SWEP.IronSightsPos = Vector(-3.24, 0, 0.88) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(-3.24, 0, 0.88) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(3.143, -6, 0.286) +SWEP.RunSightsAng = Vector(-5, 55, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_tar21/shared.lua b/ftp_gmstranded/entities/weapons/m9k_tar21/shared.lua new file mode 100644 index 0000000..571f758 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_tar21/shared.lua @@ -0,0 +1,81 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_tar21") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "TAR-21" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 38 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "rpg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_imi_tavor.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_imi_tar21.mdl" -- Weapon world model +SWEP.ShowWorldModel = true +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Wep_imitavor.single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 900 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.3 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 30 -- Base damage per bullet +SWEP.Primary.Spread = .027 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .016 -- Ironsight accuracy, should be the same for shotguns + +SWEP.SelectiveFire = true + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-1.825, 0.685, 0.155) +SWEP.IronSightsAng = Vector(0.768, 0, 0) +SWEP.SightsPos = Vector(-1.825, 0.685, 0.155) +SWEP.SightsAng = Vector(0.768, 0, 0) +SWEP.RunSightsPos = Vector(3.858, 0.079, -1.025) +SWEP.RunSightsAng = Vector(-5.237, 49.648, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_tec9/shared.lua b/ftp_gmstranded/entities/weapons/m9k_tec9/shared.lua new file mode 100644 index 0000000..56130ae --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_tec9/shared.lua @@ -0,0 +1,87 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_tec9") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "TEC-9" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 53 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 60 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_tec_9_smg.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_intratec_tec9.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_Tec9.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 825 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 32 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.2 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.1 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 17 -- Base damage per bullet +SWEP.Primary.Spread = .029 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .019 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(4.314, -1.216, 2.135) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(4.314, -1.216, 2.135) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(-5.434, -1.181, 0.393) +SWEP.RunSightsAng = Vector(-6.89, -42.166, 0) + +if (gmod.GetGamemode().Name == "Murderthon 9000") then + + SWEP.Slot = 1 -- Slot in the weapon selection menu + SWEP.Weight = 3 -- rank relative ot other weapons. bigger is better + +end + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_thompson/shared.lua b/ftp_gmstranded/entities/weapons/m9k_thompson/shared.lua new file mode 100644 index 0000000..f3ec11a --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_thompson/shared.lua @@ -0,0 +1,88 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_thompson") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "Tommy Gun" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 54 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "smg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_tommy_g.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_tommy_gun.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_tmg.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 575 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 75 -- Size of a clip +SWEP.Primary.DefaultClip = 150 -- Bullets you start with +SWEP.Primary.KickUp = 0.7 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.6 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.65 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 22 -- Base damage per bullet +SWEP.Primary.Spread = .03 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .019 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(3.359, 0, 1.84) +SWEP.IronSightsAng = Vector(-2.166, -4.039, 0) +SWEP.SightsPos = Vector(3.359, 0, 1.84) +SWEP.SightsAng = Vector(-2.166, -4.039, 0) +SWEP.GSightsPos = Vector (0, 0, 0) +SWEP.GSightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 2.3965) +SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10) + +if (gmod.GetGamemode().Name == "Murderthon 9000") then + + SWEP.Slot = 1 -- Slot in the weapon selection menu + SWEP.Weight = 3 -- rank relative ot other weapons. bigger is better + +end + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_ump45/shared.lua b/ftp_gmstranded/entities/weapons/m9k_ump45/shared.lua new file mode 100644 index 0000000..10965bf --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_ump45/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_ump45") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "HK UMP45" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 55 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "smg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_hk_ump_45.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_hk_ump45.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("m9k_hk_ump45.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 600 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 25 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.2 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.45 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 20 -- Base damage per bullet +SWEP.Primary.Spread = .028 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .018 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(2.826, -1.601, 1.259) +SWEP.IronSightsAng = Vector(-0.055, 0, 0) +SWEP.SightsPos = Vector(2.826, -1.601, 1.259) +SWEP.SightsAng = Vector(-0.055, 0, 0) +SWEP.RunSightsPos = Vector(-3.386, -4.488, 1.18) +SWEP.RunSightsAng = Vector(-17.362, -48.78, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_usas/shared.lua b/ftp_gmstranded/entities/weapons/m9k_usas/shared.lua new file mode 100644 index 0000000..d62387d --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_usas/shared.lua @@ -0,0 +1,149 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_usas") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Shotguns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "USAS" -- Weapon name (Shown on HUD) +SWEP.Slot = 3 -- Slot in the weapon selection menu +SWEP.SlotPos = 29 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_usas12_shot.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_usas_12.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weapon_usas.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 260 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 20 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 1 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.7 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "buckshot" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 10 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 7 -- Base damage per bullet +SWEP.Primary.Spread = .048 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .048 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(4.519, -2.159, 1.039) +SWEP.IronSightsAng = Vector(0.072, 0.975, 0) +SWEP.SightsPos = Vector(4.519, -2.159, 1.039) +SWEP.SightsAng = Vector(0.072, 0.975, 0) +SWEP.RunSightsPos = Vector (-3.0328, 0, 1.888) +SWEP.RunSightsAng = Vector (-24.2146, -36.522, 10) + +SWEP.ReloadPos = Vector (-3.0328, 0, 1.888) +SWEP.ReloadsAng = Vector (-24.2146, -36.522, 10) + +SWEP.WElements = { + ["fix2"] = { type = "Model", model = "models/hunter/blocks/cube025x05x025.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(22.416, 2.073, -5.571), angle = Angle(0, 0, -90), size = Vector(0.899, 0.118, 0.1), color = Color(0, 0, 0, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} }, + ["magfix"] = { type = "Model", model = "models/XQM/cylinderx1.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(10.482, 1.389, 0.078), angle = Angle(-8.098, 0, 0), size = Vector(0.2, 0.589, 0.589), color = Color(0, 0, 0, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} } +} + +function SWEP:Reload() + + if ( self.Weapon:Clip1() < self.Primary.ClipSize ) and (self.Owner:GetAmmoCount("buckshot") > 0 ) and not (self.Weapon:GetNWBool("Reloading")) then + self.Weapon:SendWeaponAnim(ACT_SHOTGUN_RELOAD_START) + self.Weapon:SetNWBool("Reloading", true) + if SERVER and !self.Owner:IsNPC() then + self.ResetSights = CurTime() + 1.65 + self.Owner:SetFOV( 0, 0.3 ) + self:SetIronsights(false) + end + timer.Simple(.65, function() if not IsValid(self) then return end if not IsValid(self.Owner) then return end if not IsValid(self.Weapon) then return end + if IsValid(self.Owner) and self.Weapon:GetClass() == self.Gun then + self.Weapon:EmitSound(Sound("Weapon_usas.draw")) + end + end) + timer.Simple(.8, function() if not IsValid(self) then return end if not IsValid(self.Owner) then return end if not IsValid(self.Weapon) then return end + if IsValid(self.Owner) and self.Weapon != nil then self:ReloadFinish() end end) + end + +end + +function SWEP:ReloadFinish() +if not IsValid(self) then return end + if IsValid(self.Owner) and self.Weapon != nil then + if self.Owner:Alive() and self.Weapon:GetClass() == self.Gun then + self.Weapon:DefaultReload(ACT_SHOTGUN_RELOAD_FINISH) + + if !self.Owner:IsNPC() then + self.ResetSights = CurTime() + self.Owner:GetViewModel():SequenceDuration() + end + if SERVER and self.Weapon != nil then + if ( self.Weapon:Clip1() < self.Primary.ClipSize ) and !self.Owner:IsNPC() then + self.Owner:SetFOV( 0, 0.3 ) + self:SetIronsights(false) + end + + local waitdammit = (self.Owner:GetViewModel():SequenceDuration()) + timer.Simple(waitdammit + .1, + function() if not IsValid(self) then return end if not IsValid(self.Owner) then return end if not IsValid(self.Weapon) then return end + if self.Weapon == nil then return end + self.Weapon:SetNWBool("Reloading", false) + if self.Owner:KeyDown(IN_ATTACK2) and self.Weapon:GetClass() == self.Gun then + if CLIENT then return end + if self.Scoped == false then + self.Owner:SetFOV( self.Secondary.IronFOV, 0.3 ) + self.IronSightsPos = self.SightsPos -- Bring it up + self.IronSightsAng = self.SightsAng -- Bring it up + self:SetIronsights(true, self.Owner) + self.DrawCrosshair = false + else return end + elseif self.Owner:KeyDown(IN_SPEED) and self.Weapon:GetClass() == self.Gun then + self.Weapon:SetNextPrimaryFire(CurTime()+0.3) -- Make it so you can't shoot for another quarter second + self.IronSightsPos = self.RunSightsPos -- Hold it down + self.IronSightsAng = self.RunSightsAng -- Hold it down + self:SetIronsights(true, self.Owner) -- Set the ironsight true + self.Owner:SetFOV( 0, 0.3 ) + else return end + end) + end + end + end +end + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_usc/shared.lua b/ftp_gmstranded/entities/weapons/m9k_usc/shared.lua new file mode 100644 index 0000000..8136921 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_usc/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_usc") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "HK USC" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 56 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_hkoch_usc.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_hk_usc.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_hkusc.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 600 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 25 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.2 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.4 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.45 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 23 -- Base damage per bullet +SWEP.Primary.Spread = .02 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .01 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(4.698, -2.566, 2.038) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(4.698, -2.566, 2.038) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.RunSightsPos = Vector(-3.814, -8.615, 0) +SWEP.RunSightsAng = Vector(-9.016, -64.764, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_usp/shared.lua b/ftp_gmstranded/entities/weapons/m9k_usp/shared.lua new file mode 100644 index 0000000..2301724 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_usp/shared.lua @@ -0,0 +1,79 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_usp") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Pistols" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "HK USP" -- Weapon name (Shown on HUD) +SWEP.Slot = 1 -- Slot in the weapon selection menu +SWEP.SlotPos = 34 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "pistol" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 65 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_pist_fokkususp.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_pist_fokkususp.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_fokkususp.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 750 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 15 -- Size of a clip +SWEP.Primary.DefaultClip = 45 -- Bullets you start with +SWEP.Primary.KickUp = 0.3 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "pistol" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 55 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 16 -- Base damage per bullet +SWEP.Primary.Spread = .02 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .01 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector (-2.5944, 0, 1.1433) +SWEP.IronSightsAng = Vector (0, 0, 0) +SWEP.SightsPos = Vector (-2.5944, 0, 1.1433) +SWEP.SightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector(3.444, -7.823, -6.27) +SWEP.RunSightsAng = Vector(60.695, 0, 0) +-- SWEP.RunSightsPos = Vector (-1.0917, 0, 1.496) +-- SWEP.RunSightsAng = Vector (-9.6507, -2.5621, 0) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_uzi/shared.lua b/ftp_gmstranded/entities/weapons/m9k_uzi/shared.lua new file mode 100644 index 0000000..02cb39f --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_uzi/shared.lua @@ -0,0 +1,87 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_uzi") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "UZI" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 57 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_imi_uzi01.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_uzi_imi.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Weapon_uzi.single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 600 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 32 -- Size of a clip +SWEP.Primary.DefaultClip = 64 -- Bullets you start with +SWEP.Primary.KickUp = 0.3 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 65 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 20 -- Base damage per bullet +SWEP.Primary.Spread = .028 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .018 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(-2.951, -2.629, 1.633) +SWEP.IronSightsAng = Vector(0.109, -0.772, 1.725) +SWEP.SightsPos = Vector(-2.951, -2.629, 1.633) +SWEP.SightsAng = Vector(0.109, -0.772, 1.725) +SWEP.RunSightsPos = Vector(3.858, -2.945, 0.057) +SWEP.RunSightsAng = Vector(-5.237, 40.471, 0) + +if (gmod.GetGamemode().Name == "Murderthon 9000") then + + SWEP.Slot = 1 -- Slot in the weapon selection menu + SWEP.Weight = 3 -- rank relative ot other weapons. bigger is better + +end + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_val/shared.lua b/ftp_gmstranded/entities/weapons/m9k_val/shared.lua new file mode 100644 index 0000000..b4e8b5a --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_val/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_val") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "AS VAL" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 39 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_dmg_vally.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_dmg_vally.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Dmgfok_vally.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 900 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 20 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.3 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "ar2" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 27 -- Base damage per bullet +SWEP.Primary.Spread = .019 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .008 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector (-2.2442, -1.8353, 1.0599) +SWEP.IronSightsAng = Vector (1.0513, 0.0322, 0) +SWEP.SightsPos = Vector (-2.2442, -1.8353, 1.0599) +SWEP.SightsAng = Vector (1.0513, 0.0322, 0) +SWEP.RunSightsPos = Vector (0.3339, -2.043, 0.6273) +SWEP.RunSightsAng = Vector (-11.5931, 48.4648, -19.7039) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_vector/shared.lua b/ftp_gmstranded/entities/weapons/m9k_vector/shared.lua new file mode 100644 index 0000000..8cc8ff1 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_vector/shared.lua @@ -0,0 +1,81 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_vector") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Submachine Guns" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "KRISS Vector" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 58 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "smg" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_kriss_svs.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_kriss_vector.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("kriss_vector.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 1000 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.2 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.1 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.3 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.SelectiveFire = true + +SWEP.Secondary.IronFOV = 50 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 18 -- Base damage per bullet +SWEP.Primary.Spread = .026 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .014 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(3.943, -0.129, 1.677) +SWEP.IronSightsAng = Vector(-1.922, 0.481, 0) +SWEP.SightsPos = Vector(3.943, -0.129, 1.677) +SWEP.SightsAng = Vector(-1.922, 0.481, 0) +SWEP.RunSightsPos = Vector(-3.701, -6.064, -0.551) +SWEP.RunSightsAng = Vector(-4.685, -62.559, 9.093) + + + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_vikhr/shared.lua b/ftp_gmstranded/entities/weapons/m9k_vikhr/shared.lua new file mode 100644 index 0000000..2ba9b44 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_vikhr/shared.lua @@ -0,0 +1,77 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_vikhr") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "iron angles and models hexed and converted to gmod my Mr Fokkusu" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "SR-3M Vikhr" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 30 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.ViewModel = "models/weapons/v_dmg_vikhr.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_dmg_vikhr.mdl" -- Weapon world model +SWEP.Base = "bobs_gun_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.FiresUnderwater = false + +SWEP.Primary.Sound = Sound("Dmgfok_vikhr.Single") -- Script that calls the primary fire sound +SWEP.Primary.RPM = 900 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 30 -- Size of a clip +SWEP.Primary.DefaultClip = 60 -- Bullets you start with +SWEP.Primary.KickUp = 0.3 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0.3 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.5 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = true -- Automatic = true; Semi Auto = false +SWEP.Primary.Ammo = "smg1" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull +SWEP.Primary.Damage = 29 -- Base damage per bullet +SWEP.Primary.Spread = .02 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .014 -- Ironsight accuracy, should be the same for shotguns + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector (-2.2363, -1.0859, 0.5292) +SWEP.IronSightsAng = Vector (1.4076, 0.0907, 0) +SWEP.SightsPos = Vector (-2.2363, -1.0859, 0.5292) +SWEP.SightsAng = Vector (1.4076, 0.0907, 0) +SWEP.RunSightsPos = Vector (0.3339, -2.043, 0.6273) +SWEP.RunSightsAng = Vector (-11.5931, 48.4648, -19.7039) + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/m9k_winchester73/shared.lua b/ftp_gmstranded/entities/weapons/m9k_winchester73/shared.lua new file mode 100644 index 0000000..11e9b0f --- /dev/null +++ b/ftp_gmstranded/entities/weapons/m9k_winchester73/shared.lua @@ -0,0 +1,91 @@ +-- Variables that are used on both client and server +SWEP.Gun = ("m9k_winchester73") -- 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 = "bobs_blacklisted" SWEP.PrintName = SWEP.Gun return end +end +SWEP.Category = "M9K Assault Rifles" +SWEP.Author = "" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "" +SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models +SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models +SWEP.PrintName = "73 Winchester Carbine" -- Weapon name (Shown on HUD) +SWEP.Slot = 2 -- Slot in the weapon selection menu +SWEP.SlotPos = 41 -- 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 = true -- set false if you want no crosshair +SWEP.Weight = 3 -- 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 = "ar2" -- 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 crossbow make for good sniper rifles + +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = true +SWEP.ViewModel = "models/weapons/v_winchester1873.mdl" -- Weapon view model +SWEP.WorldModel = "models/weapons/w_winchester_1873.mdl" -- Weapon world model +SWEP.Base = "bobs_shotty_base" +SWEP.Spawnable = true +SWEP.AdminSpawnable = true + +SWEP.Primary.Sound = Sound("Weapon_73.Single") -- script that calls the primary fire sound +SWEP.Primary.RPM = 66 -- This is in Rounds Per Minute +SWEP.Primary.ClipSize = 8 -- Size of a clip +SWEP.Primary.DefaultClip = 30 -- Default number of bullets in a clip +SWEP.Primary.KickUp = .2 -- Maximum up recoil (rise) +SWEP.Primary.KickDown = 0 -- Maximum down recoil (skeet) +SWEP.Primary.KickHorizontal = 0.1 -- Maximum up recoil (stock) +SWEP.Primary.Automatic = false -- Automatic/Semi Auto +SWEP.Primary.Ammo = "AirboatGun" -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun +-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets + +SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more! +SWEP.ShellTime = .54 + +SWEP.data = {} --The starting firemode +SWEP.data.ironsights = 1 + +SWEP.Primary.NumShots = 1 -- How many bullets to shoot per trigger pull, AKA pellets +SWEP.Primary.Damage = 85 -- Base damage per bullet +SWEP.Primary.Spread = .01 -- Define from-the-hip accuracy 1 is terrible, .0001 is exact) +SWEP.Primary.IronAccuracy = .001 -- Ironsight accuracy, should be the same for shotguns +-- Because irons don't magically give you less pellet spread!, but this isn't a shotgun so whatever, man! + +-- Enter iron sight info and bone mod info below +SWEP.IronSightsPos = Vector(4.356, 0, 2.591) +SWEP.IronSightsAng = Vector(0, 0, 0) +SWEP.SightsPos = Vector(4.356, 0, 2.591) +SWEP.SightsAng = Vector(0, 0, 0) +SWEP.GSightsPos = Vector (0, 0, 0) +SWEP.GSightsAng = Vector (0, 0, 0) +SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 2.3965) +SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10) + +SWEP.ViewModelBoneMods = { + ["shell"] = { scale = Vector(0.009, 0.009, 0.009), pos = Vector(0, 0, 0), angle = Angle(0, 0, 0) } +} + +if (gmod.GetGamemode().Name == "Murderthon 9000") then + + SWEP.Slot = 1 -- Slot in the weapon selection menu + SWEP.Weight = 3 -- rank relative ot other weapons. bigger is better + +end + +if GetConVar("M9KDefaultClip") == nil then + print("M9KDefaultClip is missing! You may have hit the lua limit!") +else + if GetConVar("M9KDefaultClip"):GetInt() != -1 then + SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * GetConVar("M9KDefaultClip"):GetInt() + end +end + +if GetConVar("M9KUniqueSlots") != nil then + if not (GetConVar("M9KUniqueSlots"):GetBool()) then + SWEP.SlotPos = 2 + end +end
\ No newline at end of file diff --git a/ftp_gmstranded/entities/weapons/pill_pigeon/pigeon.lua b/ftp_gmstranded/entities/weapons/pill_pigeon/pigeon.lua new file mode 100644 index 0000000..c9dd11d --- /dev/null +++ b/ftp_gmstranded/entities/weapons/pill_pigeon/pigeon.lua @@ -0,0 +1,266 @@ + +CROW = {} + +CROW.BURROWIN = 1 +CROW.BURROWOUT = 2 +CROW.BURROWED = 3 + +CROW.damage = 25 +CROW.model = Model( "models/crow.mdl" ) +CROW.sounds = {} +CROW.sounds.attack = Sound( "Weapon_Bugbait.Splat" ) +CROW.sounds.attackHit = Sound( "Weapon_Crowbar.Melee_Hit" ) +CROW.sounds.banghowdy = Sound( "Weapon_Bugbait.Splat" ) +CROW.sounds.burrowIn = Sound( "NPC_CROW.BurrowIn" ) +CROW.sounds.burrowOut = Sound( "NPC_CROW.BurrowOut" ) + +CROW.Hooks = {} + +function CROW.SetSpeeds( ply, run, sprint, crouch ) + ply:SetWalkSpeed( run ) + ply:SetRunSpeed( sprint ) + ply:SetCrouchedWalkSpeed( crouch ) +end + +function CROW.Enable( ply ) + if ( ply.CROW ) then return end + if ( CLIENT ) then + ply.CROW = true + return + end + + CROW.BangHowdy( ply ) + ply.CROW = {} + ply.CROW.burrowed = nil + ply.CROW.burrowedTimer = 0 + + ply.CROW.model = ply:GetModel() + ply.CROW.color = ply:GetColor() + ply.CROW.speeds = { run = ply:GetWalkSpeed(), sprint = ply:GetRunSpeed(), crouch = ply:GetCrouchedWalkSpeed() } + + CROW.SetSpeeds( ply, 100, 100, 100 ) + ply:SetHull( Vector( -16, -16, 0 ), Vector( 16, 16, 32 ) ) + ply:SetHullDuck( Vector( -16, -16, 0 ), Vector( 16, 16, 32 ) ) + + ply:SetModel( CROW.model ) + ply:SetRenderMode( RENDERMODE_TRANSALPHA ) + ply:SetColor( Color( 255, 255, 255, 0 ) ) + + ply.CROW.ghost = CROW.Ghost( ply ) + ply:SetNetworkedEntity( "CROW.ghost", ply.CROW.ghost ) + if ( !ply.CROWHasPrinted ) then + ply:PrintMessage( HUD_PRINTTALK, "You're a Crow! AWESOME!\nJump to start flying and then jump again to speed up.\nSprint to hop forward.\nReload to make a cute noise.\nMouse 1 or 2 to eat some ground and gain health.\n" ) + ply.CROWHasPrinted = true + end + ply.CROW.LastEatenTimer = CurTime() + 15 +end + +function CROW.Disable( ply ) + ply:ResetHull() + + if ( CLIENT ) then + ply.CROW = false + return + end + + if ( !ply.CROW ) then return end + CROW.BangHowdy( ply ) + ply.CROW.ghost:Remove() + ply:SetNetworkedEntity( "CROW.ghost", nil ) + ply:SetModel( ply.CROW.model ) + ply:SetColor( ply.CROW.color ) + CROW.SetSpeeds( ply, ply.CROW.speeds.run, ply.CROW.speeds.sprint, ply.CROW.speeds.crouch ) + ply:SetMoveType( MOVETYPE_WALK ) + ply.CROW = nil + + /*if ( ply:HasUnlock( "Sprinting_II" ) ) then + GAMEMODE:SetPlayerSpeed( ply, 400, 100 ) + elseif ( ply:HasUnlock( "Sprinting_I" ) ) then + GAMEMODE:SetPlayerSpeed( ply, 250, 400 ) + else + GAMEMODE:SetPlayerSpeed( ply, 250, 250 ) + end*/ +end + +if ( CLIENT ) then + usermessage.Hook( "CROW.enable", function( um ) + if ( !IsValid( LocalPlayer() ) || !LocalPlayer().GetActiveWeapon ) then return end + local weapon = LocalPlayer():GetActiveWeapon() + if ( !IsValid( weapon ) or !weapon:IsWeapon() or weapon:GetClass() != "pill_pigeon" ) then return end + CROW.Enable( LocalPlayer() ) + end ) + + usermessage.Hook( "CROW.disable", function( um ) + if ( !IsValid( LocalPlayer() ) || !LocalPlayer().GetActiveWeapon ) then return end + local weapon = LocalPlayer():GetActiveWeapon() + if ( IsValid( weapon ) and weapon:IsWeapon() and weapon:GetClass() == "pill_pigeon" ) then return end + CROW.Disable( LocalPlayer() ) + end ) +end + +function CROW.BangHowdy( ply ) + local ed = EffectData() + ed:SetOrigin( ply:GetPos() ) + ed:SetStart( ply:GetPos() ) + ed:SetScale( 1000 ) + util.Effect( "cball_explode", ed ) + ply:EmitSound( CROW.sounds.banghowdy ) +end + +function CROW.Burrow( ply ) + if ( ply.CROW.burrowed != CROW.BURROWED and CurTime() < ply.CROW.burrowedTimer ) then return end + if ( !ply.CROW.burrowed ) then + if ( ply.CROW.attacking or not ply:OnGround() ) then return end + local t = {} + t.start = ply:GetPos() + t.endpos = t.start + Vector( 0, 0, -20 ) + t.filter = ply + local tr = util.TraceLine( t ) + if ( !tr.HitWorld or !( tr.MatType == MAT_DIRT or tr.MatType == MAT_FOLIAGE or tr.MatType == MAT_SAND ) ) then + ply:PrintMessage( HUD_PRINTTALK, "You can't eat that. Look for some dirt!" ) + return + end + ply:EmitSound( CROW.sounds.burrowIn ) + ply:SetMoveType( MOVETYPE_WALK ) + ply.CROW.burrowed = CROW.BURROWIN + ply.CROW.burrowedTimer = CurTime() + 0.5 + else + ply:EmitSound( CROW.sounds.burrowOut ) + ply:DrawShadow( true ) + ply.CROW.ghost:DrawShadow( true ) + ply.CROW.burrowed = CROW.BURROWOUT + ply.CROW.burrowedTimer = CurTime() + 0.5 + end + ply.CROW.LastEatenTimer = CurTime() + 15 +end + +function CROW.BurrowThink( ply ) + local health = ply:Health() + if ( health >= ply:GetMaxHealth() ) then + ply.CROW.burrowed = false + end + if ( !ply.CROW.burrowed ) then return end + if ( CurTime() >= ply.CROW.burrowedTimer ) then + if ( ply.CROW.burrowed == CROW.BURROWIN ) then + ply:DrawShadow( false ) + ply.CROW.ghost:DrawShadow( false ) + ply.CROW.burrowed = CROW.BURROWED + elseif ( ply.CROW.burrowed == CROW.BURROWOUT ) then + ply:SetMoveType( MOVETYPE_WALK ) + ply.CROW.burrowed = false + elseif ( ply.CROW.burrowed == CROW.BURROWED ) then + if ( health < ply:GetMaxHealth() ) then ply:SetHealth( math.min( health + 2, ply:GetMaxHealth() ) ) end + ply.CROW.burrowedTimer = CurTime() + 1 + end + end +end + +function CROW.Ghost( ply ) + local e = ents.Create( "prop_dynamic" ) + e:SetAngles( ply:GetAngles() ) + e:SetPos( ply:GetPos() ) + e:SetModel( CROW.model ) + e:SetCollisionGroup( COLLISION_GROUP_NONE ) + e:SetMoveType( MOVETYPE_NONE ) + e:SetSolid( SOLID_NONE ) + e:SetParent( ply ) + e:Spawn() + return e +end + +function CROW.Hooks.KeyPress( ply, key ) + local health = ply:Health() + if ( !ply.CROW ) then return end + + if ( ply.CROW.burrowed ) then + ply:SetMoveType( 0 ) + return + end + + if ( health < 30 ) then + GAMEMODE:SetPlayerSpeed( ply, 50, 100 ) + end + + if ( health >= 30 ) then + if ( key == IN_JUMP and ply:IsOnGround() ) then + ply:SetMoveType( 4 ) + ply:SetVelocity( ply:GetForward() * 300 + Vector( 0, 0, 100 ) ) + elseif ( key == IN_JUMP and ply:IsOnGround() ) then + ply:SetMoveType( 2 ) + elseif ( key == IN_JUMP and !ply:IsOnGround() ) then + ply:SetVelocity( ply:GetForward() * 300 + ply:GetAimVector() ) + elseif ply:IsOnGround() then + ply:SetMoveType( 2 ) + elseif ( !ply:IsOnGround() and key == IN_WALK ) then + ply:SetMaxSpeed( 250 ) + else + ply:SetMoveType( 0 ) + end + else + ply:SetMoveType( 0 ) + end + + if ( health < 50 ) then return end + + if ( ply:OnGround() and key == IN_SPEED ) then + ply:SetVelocity( ply:GetForward() * 1500 + Vector( 0, 0, 100 ) ) + ply:SetMoveType( 2 ) + end +end + +function CROW.Hooks.UpdateAnimation( ply ) + if ( !ply.CROW ) then return end + + local sequence = "idle01" + local rate = 1 + local speed = ply:GetVelocity():Length() + + if ( !ply.CROW.burrowed ) then + if ( ply:IsOnGround() ) then + ply:SetMoveType( 2 ) + if ( speed > 0 ) then + sequence = "Walk" + rate = 2 + ply:SetMaxSpeed( 200 ) + if ( speed > 200 ) then + sequence = "Run" + end + end + elseif ( !ply:IsOnGround() ) then + ply:SetMoveType( 4 ) + ply:SetMaxSpeed( 100 ) + sequence = "Soar" + if ( speed > 400 ) then sequence = "Fly01" end + + if ( ply:Health() < 30 ) then + ply:SetMoveType( 2 ) + sequence = "Ragdoll" + end + elseif ( ply:WaterLevel() > 1 ) then + sequence = "Soar" + end + elseif ( ply.CROW.burrowed == CROW.BURROWED ) then + sequence = "Eat_a" + end + + local sequenceIndex = ply:LookupSequence( sequence ) + if ( ply:GetSequence() != sequenceIndex ) then + ply:Fire( "setanimation", sequence, 0 ) + end + sequenceIndex = ply.CROW.ghost:LookupSequence( sequence ) + if ( ply.CROW.ghost:GetSequence() != sequenceIndex ) then + ply.CROW.ghost:Fire( "setanimation", sequence, 0 ) + end + ply:SetPlaybackRate( rate ) + ply.CROW.ghost:SetPlaybackRate( rate ) +end + +if ( CLIENT ) then return end + +hook.Add( "KeyPress", "CROW.KeyPress", CROW.Hooks.KeyPress ) +hook.Add( "UpdateAnimation", "CROW.UpdateAnimation", CROW.Hooks.UpdateAnimation ) +hook.Add( "PlayerSetModel", "CROW.PlayerSetModel", function( ply ) if ( ply.CROW ) then return false end end ) +hook.Add( "SetPlayerAnimation", "CROW.SetPlayerAnimation", function( ply, animation ) if ( ply.CROW ) then return false end end ) +hook.Add( "PlayerHurt", "CROW.PlayerHurt", function( ply, attacker ) + if ( ply.CROW ) then ply:EmitSound( Sound( "npc/crow/pain" .. math.random( 1, 2 ) .. ".wav", 100, math.random( 95, 105 ) ) ) end +end ) diff --git a/ftp_gmstranded/entities/weapons/pill_pigeon/shared.lua b/ftp_gmstranded/entities/weapons/pill_pigeon/shared.lua new file mode 100644 index 0000000..445f1d2 --- /dev/null +++ b/ftp_gmstranded/entities/weapons/pill_pigeon/shared.lua @@ -0,0 +1,118 @@ + +AddCSLuaFile() +AddCSLuaFile( "pigeon.lua" ) + +include( "pigeon.lua" ) + +SWEP.PrintName = "Crow Pill" +SWEP.Slot = 5 +SWEP.SlotPos = 1 +SWEP.DrawAmmo = false +SWEP.DrawCrosshair = false + +SWEP.Weight = 5 +SWEP.AutoSwitchTo = false +SWEP.AutoSwitchFrom = false + +SWEP.Author = "grea$emonkey" +SWEP.Contact = "" +SWEP.Purpose = "" +SWEP.Instructions = "Press reload to make a cute sound.\nJump to start flying, jump again to speed up." + +SWEP.Spawnable = false + +SWEP.Primary.ClipSize, SWEP.Secondary.ClipSize = -1, -1 +SWEP.Primary.DefaultClip, SWEP.Secondary.DefaultClip = -1, -1 +SWEP.Primary.Automatic, SWEP.Primary.Automatic = false, false +SWEP.Primary.Ammo, SWEP.Secondary.Ammo = "none", "none" +SWEP.ViewModel = Model( "models/weapons/v_hands.mdl" ) +SWEP.WorldModel = Model( "models/weapons/w_crowbar.mdl" ) + +function SWEP:Deploy() + CROW.Enable( self.Owner ) + if ( CLIENT ) then return end + self.Owner:DrawViewModel( false ) + timer.Simple( 0.01, function() self.Owner:DrawViewModel( false ) end ) + self.Owner:DrawWorldModel( false ) + umsg.Start( "CROW.enable", self.Owner ) + umsg.End() + return true +end + +function SWEP:Holster() + CROW.Disable( self.Owner ) + if ( CLIENT ) then return end + if ( self.Owner:Health() <= 0 ) then + umsg.Start( "CROW.disable", self.Owner ) + umsg.End() + end + return true +end + +if ( CLIENT ) then + +function SWEP:PrimaryAttack() +end + +function SWEP:SecondaryAttack() +end + +function SWEP:DrawWeaponSelection( x, y, wide, tall, alpha ) + draw.SimpleText( "5", "HL2MPTypeDeath", x + wide / 2, y + tall * 0.2, Color( 255, 210, 0, 255 ), TEXT_ALIGN_CENTER ) +end + +function SWEP:CalcView( ply, pos, ang, fov ) + if ( !ply.CROW ) then return end + ang = ply:GetAimVector():Angle() + local ghost = ply:GetNetworkedEntity( "CROW.ghost" ) + if ( ghost and ghost:IsValid() ) then + if ( GetViewEntity() == ply ) then + ghost:SetColor( Color( 255, 255, 255, 255 ) ) + else + ghost:SetColor( Color( 255, 255, 255, 255 ) ) + return + end + end + + local t = {} + t.start = ply:GetPos() + ang:Up() * 20 + t.endpos = t.start + ang:Forward() * -50 + t.filter = ply + local tr = util.TraceLine( t ) + pos = tr.HitPos + + if ( tr.Fraction < 1 ) then pos = pos + tr.HitNormal * 2 end + return pos, ang, fov +end + +return end + +function SWEP:Destroy() + hook.Remove( "KeyPress","CROW.KeyPress" ) + hook.Remove( "PlayerHurt", "CROW.PlayerHurt" ) + hook.Remove( "PlayerSetModel", "CROW.PlayerSetModel" ) + hook.Remove( "SetPlayerAnimation", "CROW.SetPlayerAnimation" ) + hook.Remove( "UpdateAnimation", "CROW.UpdateAnimation" ) +end + +function SWEP:PrimaryAttack() + CROW.Burrow( self.Owner ) +end + +function SWEP:SecondaryAttack() + self:PrimaryAttack() +end + +SWEP.NextCrowTimer = 0 +function SWEP:Reload() + if ( CurTime() >= self.NextCrowTimer ) then + self.NextCrowTimer = CurTime() + 2 + self.Owner:EmitSound( Sound( "npc/crow/idle" .. math.random( 1, 4 ) .. ".wav", 100, math.random( 90, 110 ) ) ) + end +end + +function SWEP:Think() + self.Owner.CROW.ghost:SetLocalAngles( self.Owner:GetAngles() ) + self.Owner.CROW.ghost:SetAngles( self.Owner:GetAngles() ) + CROW.BurrowThink( self.Owner ) +end |
