diff options
Diffstat (limited to 'ftp_gmstranded')
210 files changed, 0 insertions, 30761 deletions
diff --git a/ftp_gmstranded/backgrounds/gm_forest.jpg b/ftp_gmstranded/backgrounds/gm_forest.jpg Binary files differdeleted file mode 100644 index 519fffc..0000000 --- a/ftp_gmstranded/backgrounds/gm_forest.jpg +++ /dev/null diff --git a/ftp_gmstranded/backgrounds/gm_gunkanjima.jpg b/ftp_gmstranded/backgrounds/gm_gunkanjima.jpg Binary files differdeleted file mode 100644 index c8da547..0000000 --- a/ftp_gmstranded/backgrounds/gm_gunkanjima.jpg +++ /dev/null diff --git a/ftp_gmstranded/backgrounds/tf_loghouse_alpine.jpg b/ftp_gmstranded/backgrounds/tf_loghouse_alpine.jpg Binary files differdeleted file mode 100644 index cf50edc..0000000 --- a/ftp_gmstranded/backgrounds/tf_loghouse_alpine.jpg +++ /dev/null diff --git a/ftp_gmstranded/entities/effects/gms_loot_effect.lua b/ftp_gmstranded/entities/effects/gms_loot_effect.lua deleted file mode 100644 index 0b8d1ef..0000000 --- a/ftp_gmstranded/entities/effects/gms_loot_effect.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 24a23e8..0000000 --- a/ftp_gmstranded/entities/effects/m9k_effect_mad_penetration_trace/init.lua +++ /dev/null @@ -1,45 +0,0 @@ -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 deleted file mode 100644 index 1a9ebaf..0000000 --- a/ftp_gmstranded/entities/effects/m9k_effect_mad_ricochet_trace/init.lua +++ /dev/null @@ -1,100 +0,0 @@ -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 deleted file mode 100644 index 2b9b210..0000000 --- a/ftp_gmstranded/entities/effects/m9k_rg_muzzle_rifle/init.lua +++ /dev/null @@ -1,117 +0,0 @@ -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 deleted file mode 100644 index c939201..0000000 --- a/ftp_gmstranded/entities/entities/gms_advancedtransmutator.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 9c6000d..0000000 --- a/ftp_gmstranded/entities/entities/gms_antlionbarrow.lua +++ /dev/null @@ -1,101 +0,0 @@ - -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 deleted file mode 100644 index 074633e..0000000 --- a/ftp_gmstranded/entities/entities/gms_base_entity.lua +++ /dev/null @@ -1,54 +0,0 @@ - -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 deleted file mode 100644 index 5fb4698..0000000 --- a/ftp_gmstranded/entities/entities/gms_buildsite.lua +++ /dev/null @@ -1,117 +0,0 @@ - -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 deleted file mode 100644 index 4fe66e2..0000000 --- a/ftp_gmstranded/entities/entities/gms_clock_big.lua +++ /dev/null @@ -1,71 +0,0 @@ - -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 deleted file mode 100644 index 1aaa970..0000000 --- a/ftp_gmstranded/entities/entities/gms_copperfurnace.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index ab6e8c4..0000000 --- a/ftp_gmstranded/entities/entities/gms_copperworkbench.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 7de9677..0000000 --- a/ftp_gmstranded/entities/entities/gms_factory.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 2ad1297..0000000 --- a/ftp_gmstranded/entities/entities/gms_food.lua +++ /dev/null @@ -1,99 +0,0 @@ - -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 deleted file mode 100644 index 14bf3d1..0000000 --- a/ftp_gmstranded/entities/entities/gms_fridge.lua +++ /dev/null @@ -1,22 +0,0 @@ - -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 deleted file mode 100644 index 1302d67..0000000 --- a/ftp_gmstranded/entities/entities/gms_goldfurnace.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 647bc69..0000000 --- a/ftp_gmstranded/entities/entities/gms_goldworkbench.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 267d165..0000000 --- a/ftp_gmstranded/entities/entities/gms_gravestone.lua +++ /dev/null @@ -1,88 +0,0 @@ - -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 deleted file mode 100644 index 0e394d6..0000000 --- a/ftp_gmstranded/entities/entities/gms_grindingstone.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 3218bc0..0000000 --- a/ftp_gmstranded/entities/entities/gms_gunchunks.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index bd5f8c2..0000000 --- a/ftp_gmstranded/entities/entities/gms_hightechgunlab.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 7769e83..0000000 --- a/ftp_gmstranded/entities/entities/gms_ironfurnace.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 5204f47..0000000 --- a/ftp_gmstranded/entities/entities/gms_ironworkbench.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 7588d4c..0000000 --- a/ftp_gmstranded/entities/entities/gms_loot.lua +++ /dev/null @@ -1,24 +0,0 @@ - -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 deleted file mode 100644 index 8b3ce3a..0000000 --- a/ftp_gmstranded/entities/entities/gms_mithrilfactory.lua +++ /dev/null @@ -1,17 +0,0 @@ - -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 deleted file mode 100644 index 18b849f..0000000 --- a/ftp_gmstranded/entities/entities/gms_mithrilworkbench.lua +++ /dev/null @@ -1,17 +0,0 @@ - -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 deleted file mode 100644 index 7a415ac..0000000 --- a/ftp_gmstranded/entities/entities/gms_obelisk.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index c55afa0..0000000 --- a/ftp_gmstranded/entities/entities/gms_pistolgunlab.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 1b974c6..0000000 --- a/ftp_gmstranded/entities/entities/gms_platinumfurnace.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index fd22f8c..0000000 --- a/ftp_gmstranded/entities/entities/gms_platinumworkbench.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index f6f4f2b..0000000 --- a/ftp_gmstranded/entities/entities/gms_renbuyshop.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 75e43f4..0000000 --- a/ftp_gmstranded/entities/entities/gms_rensellshop.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index ea02813..0000000 --- a/ftp_gmstranded/entities/entities/gms_resourcedrop.lua +++ /dev/null @@ -1,63 +0,0 @@ - -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 deleted file mode 100644 index deae2e2..0000000 --- a/ftp_gmstranded/entities/entities/gms_resourcepack.lua +++ /dev/null @@ -1,70 +0,0 @@ - -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 deleted file mode 100644 index 357ea06..0000000 --- a/ftp_gmstranded/entities/entities/gms_runealtar.lua +++ /dev/null @@ -1,17 +0,0 @@ - -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 deleted file mode 100644 index 68a7e9a..0000000 --- a/ftp_gmstranded/entities/entities/gms_runicinfuser.lua +++ /dev/null @@ -1,17 +0,0 @@ - -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 deleted file mode 100644 index 626669f..0000000 --- a/ftp_gmstranded/entities/entities/gms_seed.lua +++ /dev/null @@ -1,160 +0,0 @@ - -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 deleted file mode 100644 index bd29e69..0000000 --- a/ftp_gmstranded/entities/entities/gms_silverfurnace.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 467e4b8..0000000 --- a/ftp_gmstranded/entities/entities/gms_silverworkbench.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index c483e67..0000000 --- a/ftp_gmstranded/entities/entities/gms_smggunlab.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 1621a67..0000000 --- a/ftp_gmstranded/entities/entities/gms_steelfurnace.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 848ea43..0000000 --- a/ftp_gmstranded/entities/entities/gms_steelworkbench.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 742b1d4..0000000 --- a/ftp_gmstranded/entities/entities/gms_stonefurnace.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 71f26e5..0000000 --- a/ftp_gmstranded/entities/entities/gms_stoneworkbench.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 897ef73..0000000 --- a/ftp_gmstranded/entities/entities/gms_stove.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 694d467..0000000 --- a/ftp_gmstranded/entities/entities/gms_techfurnace.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 96d8c58..0000000 --- a/ftp_gmstranded/entities/entities/gms_techworkbench.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index 582622e..0000000 --- a/ftp_gmstranded/entities/entities/gms_transmutator.lua +++ /dev/null @@ -1,13 +0,0 @@ - -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 deleted file mode 100644 index cd73761..0000000 --- a/ftp_gmstranded/entities/entities/gms_tree.lua +++ /dev/null @@ -1,22 +0,0 @@ -//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 deleted file mode 100644 index 1cbf275..0000000 --- a/ftp_gmstranded/entities/entities/gms_waterfountain.lua +++ /dev/null @@ -1,29 +0,0 @@ - -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 deleted file mode 100644 index 0ac5a6d..0000000 --- a/ftp_gmstranded/entities/weapons/bobs_blacklisted/shared.lua +++ /dev/null @@ -1,74 +0,0 @@ --- 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 deleted file mode 100644 index 6e182de..0000000 --- a/ftp_gmstranded/entities/weapons/bobs_gun_base/shared.lua +++ /dev/null @@ -1,1359 +0,0 @@ --- //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 deleted file mode 100644 index cb3dfa3..0000000 --- a/ftp_gmstranded/entities/weapons/bobs_scoped_base/cl_init.lua +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 3f157ab..0000000 --- a/ftp_gmstranded/entities/weapons/bobs_scoped_base/init.lua +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 762ca4c..0000000 --- a/ftp_gmstranded/entities/weapons/bobs_scoped_base/shared.lua +++ /dev/null @@ -1,461 +0,0 @@ --- 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 deleted file mode 100644 index cb3dfa3..0000000 --- a/ftp_gmstranded/entities/weapons/bobs_shotty_base/cl_init.lua +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 3f157ab..0000000 --- a/ftp_gmstranded/entities/weapons/bobs_shotty_base/init.lua +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index dcfb499..0000000 --- a/ftp_gmstranded/entities/weapons/bobs_shotty_base/shared.lua +++ /dev/null @@ -1,192 +0,0 @@ -// 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 deleted file mode 100644 index b7cac72..0000000 --- a/ftp_gmstranded/entities/weapons/gmod_tool/stools/gms_rope.lua +++ /dev/null @@ -1,170 +0,0 @@ - -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 deleted file mode 100644 index 56f6322..0000000 --- a/ftp_gmstranded/entities/weapons/gms_advancedfishingrod.lua +++ /dev/null @@ -1,38 +0,0 @@ - -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 deleted file mode 100644 index ec4124a..0000000 --- a/ftp_gmstranded/entities/weapons/gms_base_weapon.lua +++ /dev/null @@ -1,275 +0,0 @@ - -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 deleted file mode 100644 index 191ba09..0000000 --- a/ftp_gmstranded/entities/weapons/gms_bucket.lua +++ /dev/null @@ -1,23 +0,0 @@ - -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 deleted file mode 100644 index 0355b49..0000000 --- a/ftp_gmstranded/entities/weapons/gms_chisel.lua +++ /dev/null @@ -1,34 +0,0 @@ - -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 deleted file mode 100644 index e0a7954..0000000 --- a/ftp_gmstranded/entities/weapons/gms_copperhatchet.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 634f6d9..0000000 --- a/ftp_gmstranded/entities/weapons/gms_copperpickaxe.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index c23f65d..0000000 --- a/ftp_gmstranded/entities/weapons/gms_essencedrainer.lua +++ /dev/null @@ -1,38 +0,0 @@ - -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 deleted file mode 100644 index ad9b81c..0000000 --- a/ftp_gmstranded/entities/weapons/gms_fists.lua +++ /dev/null @@ -1,39 +0,0 @@ - -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 deleted file mode 100644 index 7c9f530..0000000 --- a/ftp_gmstranded/entities/weapons/gms_fryingpan.lua +++ /dev/null @@ -1,23 +0,0 @@ - -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 deleted file mode 100644 index 8d350ae..0000000 --- a/ftp_gmstranded/entities/weapons/gms_goldhatchet.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 6a3a993..0000000 --- a/ftp_gmstranded/entities/weapons/gms_goldpickaxe.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 3067424..0000000 --- a/ftp_gmstranded/entities/weapons/gms_hands.lua +++ /dev/null @@ -1,17 +0,0 @@ - -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 deleted file mode 100644 index 15aaa27..0000000 --- a/ftp_gmstranded/entities/weapons/gms_inventory.lua +++ /dev/null @@ -1,277 +0,0 @@ - -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 deleted file mode 100644 index 656878e..0000000 --- a/ftp_gmstranded/entities/weapons/gms_ironhatchet.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 79427e6..0000000 --- a/ftp_gmstranded/entities/weapons/gms_ironpickaxe.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 2326d8e..0000000 --- a/ftp_gmstranded/entities/weapons/gms_mithrilpickaxe.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index d1411b1..0000000 --- a/ftp_gmstranded/entities/weapons/gms_pickaxeofdjarex.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 2a8d14c..0000000 --- a/ftp_gmstranded/entities/weapons/gms_platinumhatchet.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 33f89b5..0000000 --- a/ftp_gmstranded/entities/weapons/gms_platinumpickaxe.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 18455bf..0000000 --- a/ftp_gmstranded/entities/weapons/gms_runeapickaxe.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index c0429f5..0000000 --- a/ftp_gmstranded/entities/weapons/gms_runeepickaxe.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index db208b2..0000000 --- a/ftp_gmstranded/entities/weapons/gms_runefpickaxe.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 9571432..0000000 --- a/ftp_gmstranded/entities/weapons/gms_runewpickaxe.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 8c64910..0000000 --- a/ftp_gmstranded/entities/weapons/gms_shovel.lua +++ /dev/null @@ -1,69 +0,0 @@ - -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 deleted file mode 100644 index 801f564..0000000 --- a/ftp_gmstranded/entities/weapons/gms_sickle.lua +++ /dev/null @@ -1,23 +0,0 @@ - -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 deleted file mode 100644 index 9889131..0000000 --- a/ftp_gmstranded/entities/weapons/gms_silverhatchet.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index ef75952..0000000 --- a/ftp_gmstranded/entities/weapons/gms_silverpickaxe.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 02c570c..0000000 --- a/ftp_gmstranded/entities/weapons/gms_steelhatchet.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index a60066f..0000000 --- a/ftp_gmstranded/entities/weapons/gms_steelpickaxe.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 980b44c..0000000 --- a/ftp_gmstranded/entities/weapons/gms_stonehatchet.lua +++ /dev/null @@ -1,40 +0,0 @@ - -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 deleted file mode 100644 index 6cec759..0000000 --- a/ftp_gmstranded/entities/weapons/gms_stonepickaxe.lua +++ /dev/null @@ -1,40 +0,0 @@ - -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 deleted file mode 100644 index 03edd78..0000000 --- a/ftp_gmstranded/entities/weapons/gms_strainer.lua +++ /dev/null @@ -1,30 +0,0 @@ - -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 deleted file mode 100644 index 3b5cc4b..0000000 --- a/ftp_gmstranded/entities/weapons/gms_techhatchet.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 0154a56..0000000 --- a/ftp_gmstranded/entities/weapons/gms_techpickaxe.lua +++ /dev/null @@ -1,41 +0,0 @@ - -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 deleted file mode 100644 index 29d2f6f..0000000 --- a/ftp_gmstranded/entities/weapons/gms_woodenfishingrod.lua +++ /dev/null @@ -1,38 +0,0 @@ - -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 deleted file mode 100644 index 89d4b2c..0000000 --- a/ftp_gmstranded/entities/weapons/gms_woodenspoon.lua +++ /dev/null @@ -1,23 +0,0 @@ - -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 deleted file mode 100644 index d05ef61..0000000 --- a/ftp_gmstranded/entities/weapons/gms_wrench.lua +++ /dev/null @@ -1,23 +0,0 @@ - -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 deleted file mode 100644 index ac3754f..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_1887winchester/shared.lua +++ /dev/null @@ -1,89 +0,0 @@ --- 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 deleted file mode 100644 index 6140f08..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_1897winchester/shared.lua +++ /dev/null @@ -1,85 +0,0 @@ --- 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 deleted file mode 100644 index 317ce1d..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_acr/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index f968369..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_ak47/shared.lua +++ /dev/null @@ -1,86 +0,0 @@ --- 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 deleted file mode 100644 index 4ba7b6f..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_ak74/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index a333318..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_amd65/shared.lua +++ /dev/null @@ -1,82 +0,0 @@ --- 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 deleted file mode 100644 index 801f127..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_an94/shared.lua +++ /dev/null @@ -1,167 +0,0 @@ --- 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 deleted file mode 100644 index ebb0456..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_ares_shrike/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index 5458b3c..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_auga3/shared.lua +++ /dev/null @@ -1,90 +0,0 @@ --- 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 deleted file mode 100644 index 513d6f1..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_aw50/shared.lua +++ /dev/null @@ -1,89 +0,0 @@ --- 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 deleted file mode 100644 index 286c8de..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_barret_m82/shared.lua +++ /dev/null @@ -1,90 +0,0 @@ --- 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 deleted file mode 100644 index 688baad..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_bizonp19/shared.lua +++ /dev/null @@ -1,81 +0,0 @@ --- 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 deleted file mode 100644 index 5652aec..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_browningauto5/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index 321ee9c..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_colt1911/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index 325abf9..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_coltpython/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index 570d348..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_contender/shared.lua +++ /dev/null @@ -1,233 +0,0 @@ --- 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 deleted file mode 100644 index 2de2a9d..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_dbarrel/shared.lua +++ /dev/null @@ -1,316 +0,0 @@ --- 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 deleted file mode 100644 index c671ebf..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_deagle/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index 942e2ba..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_dragunov/shared.lua +++ /dev/null @@ -1,89 +0,0 @@ --- 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 deleted file mode 100644 index 9734a83..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_f2000/shared.lua +++ /dev/null @@ -1,90 +0,0 @@ --- 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 deleted file mode 100644 index 0a4af98..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_fal/shared.lua +++ /dev/null @@ -1,80 +0,0 @@ --- 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 deleted file mode 100644 index 6f20bde..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_famas/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index ae86d31..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_fg42/shared.lua +++ /dev/null @@ -1,78 +0,0 @@ --- 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 deleted file mode 100644 index c8ed03a..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_g36/shared.lua +++ /dev/null @@ -1,80 +0,0 @@ --- 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 deleted file mode 100644 index 272f3eb..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_g3a3/shared.lua +++ /dev/null @@ -1,81 +0,0 @@ --- 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 deleted file mode 100644 index 6d2ab5c..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_glock/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index 2d7318b..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_hk45/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index 476c1c8..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_honeybadger/shared.lua +++ /dev/null @@ -1,101 +0,0 @@ --- 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 deleted file mode 100644 index 8e4a17a..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_intervention/shared.lua +++ /dev/null @@ -1,88 +0,0 @@ --- 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 deleted file mode 100644 index ea57e06..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_ithacam37/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index b069e27..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_jackhammer/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index 72e2383..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_kac_pdw/shared.lua +++ /dev/null @@ -1,94 +0,0 @@ --- 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 deleted file mode 100644 index 1e30308..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_l85/shared.lua +++ /dev/null @@ -1,91 +0,0 @@ --- 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 deleted file mode 100644 index aebad26..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_luger/shared.lua +++ /dev/null @@ -1,78 +0,0 @@ --- 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 deleted file mode 100644 index d4bf65c..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_m14sp/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index 952eb89..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_m16a4_acog/shared.lua +++ /dev/null @@ -1,88 +0,0 @@ --- 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 deleted file mode 100644 index e227975..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_m1918bar/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index 6c7cf25..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_m24/shared.lua +++ /dev/null @@ -1,89 +0,0 @@ --- 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 deleted file mode 100644 index 4d7f08a..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_m249lmg/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index 03359aa..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_m29satan/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index f49fb21..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_m3/shared.lua +++ /dev/null @@ -1,80 +0,0 @@ --- 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 deleted file mode 100644 index 3849658..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_m416/shared.lua +++ /dev/null @@ -1,83 +0,0 @@ --- 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 deleted file mode 100644 index ddad4da..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_m4a1/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index 85aca0a..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_m60/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index 9a9e646..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_m92beretta/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index 882aefe..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_m98b/shared.lua +++ /dev/null @@ -1,90 +0,0 @@ --- 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 deleted file mode 100644 index 3246a4b..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_magpulpdr/shared.lua +++ /dev/null @@ -1,80 +0,0 @@ --- 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 deleted file mode 100644 index 3d23239..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_minigun/shared.lua +++ /dev/null @@ -1,125 +0,0 @@ --- 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 deleted file mode 100644 index 9007923..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_model3russian/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index 5d1b2cf..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_model500/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index 1cd7a4b..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_model627/shared.lua +++ /dev/null @@ -1,78 +0,0 @@ --- 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 deleted file mode 100644 index f03b634..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_mossberg590/shared.lua +++ /dev/null @@ -1,80 +0,0 @@ --- 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 deleted file mode 100644 index bbc194d..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_mp40/shared.lua +++ /dev/null @@ -1,80 +0,0 @@ --- 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 deleted file mode 100644 index 1af1e02..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_mp5/shared.lua +++ /dev/null @@ -1,81 +0,0 @@ --- 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 deleted file mode 100644 index 52a8ffe..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_mp5sd/shared.lua +++ /dev/null @@ -1,81 +0,0 @@ --- 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 deleted file mode 100644 index dc62838..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_mp7/shared.lua +++ /dev/null @@ -1,95 +0,0 @@ --- 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 deleted file mode 100644 index ce01a55..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_mp9/shared.lua +++ /dev/null @@ -1,87 +0,0 @@ --- 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 deleted file mode 100644 index e1c223a..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_pkm/shared.lua +++ /dev/null @@ -1,80 +0,0 @@ --- 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 deleted file mode 100644 index 50ff7d9..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_psg1/shared.lua +++ /dev/null @@ -1,90 +0,0 @@ --- 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 deleted file mode 100644 index 0bd6da7..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_ragingbull/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index ff573c1..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_remington1858/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index 611b9b5..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_remington7615p/shared.lua +++ /dev/null @@ -1,89 +0,0 @@ --- 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 deleted file mode 100644 index 3ce0bb7..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_remington870/shared.lua +++ /dev/null @@ -1,80 +0,0 @@ --- 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 deleted file mode 100644 index 1a20aa7..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_scar/shared.lua +++ /dev/null @@ -1,84 +0,0 @@ --- 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 deleted file mode 100644 index cedd3f2..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_scoped_taurus/shared.lua +++ /dev/null @@ -1,85 +0,0 @@ --- 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 deleted file mode 100644 index 7164fc0..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_sig_p229r/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index 873b03b..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_sl8/shared.lua +++ /dev/null @@ -1,90 +0,0 @@ --- 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 deleted file mode 100644 index e2e8d71..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_smgp90/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index 00542e3..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_spas12/shared.lua +++ /dev/null @@ -1,80 +0,0 @@ --- 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 deleted file mode 100644 index b8a8a30..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_sten/shared.lua +++ /dev/null @@ -1,84 +0,0 @@ --- 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 deleted file mode 100644 index 31bfb5c..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_striker12/shared.lua +++ /dev/null @@ -1,74 +0,0 @@ --- 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 deleted file mode 100644 index 06b3c9b..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_svt40/shared.lua +++ /dev/null @@ -1,91 +0,0 @@ --- 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 deleted file mode 100644 index fbdbadc..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_svu/shared.lua +++ /dev/null @@ -1,89 +0,0 @@ --- 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 deleted file mode 100644 index 571f758..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_tar21/shared.lua +++ /dev/null @@ -1,81 +0,0 @@ --- 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 deleted file mode 100644 index 56130ae..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_tec9/shared.lua +++ /dev/null @@ -1,87 +0,0 @@ --- 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 deleted file mode 100644 index f3ec11a..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_thompson/shared.lua +++ /dev/null @@ -1,88 +0,0 @@ --- 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 deleted file mode 100644 index 10965bf..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_ump45/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index d62387d..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_usas/shared.lua +++ /dev/null @@ -1,149 +0,0 @@ --- 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 deleted file mode 100644 index 8136921..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_usc/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index 2301724..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_usp/shared.lua +++ /dev/null @@ -1,79 +0,0 @@ --- 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 deleted file mode 100644 index 02cb39f..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_uzi/shared.lua +++ /dev/null @@ -1,87 +0,0 @@ --- 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 deleted file mode 100644 index b4e8b5a..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_val/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index 8cc8ff1..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_vector/shared.lua +++ /dev/null @@ -1,81 +0,0 @@ --- 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 deleted file mode 100644 index 2ba9b44..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_vikhr/shared.lua +++ /dev/null @@ -1,77 +0,0 @@ --- 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 deleted file mode 100644 index 11e9b0f..0000000 --- a/ftp_gmstranded/entities/weapons/m9k_winchester73/shared.lua +++ /dev/null @@ -1,91 +0,0 @@ --- 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 deleted file mode 100644 index c9dd11d..0000000 --- a/ftp_gmstranded/entities/weapons/pill_pigeon/pigeon.lua +++ /dev/null @@ -1,266 +0,0 @@ - -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 deleted file mode 100644 index 445f1d2..0000000 --- a/ftp_gmstranded/entities/weapons/pill_pigeon/shared.lua +++ /dev/null @@ -1,118 +0,0 @@ - -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 diff --git a/ftp_gmstranded/gamemode/chatcommands.lua b/ftp_gmstranded/gamemode/chatcommands.lua deleted file mode 100644 index 54d4bba..0000000 --- a/ftp_gmstranded/gamemode/chatcommands.lua +++ /dev/null @@ -1,466 +0,0 @@ - -function GM:PlayerSay( ply, text, teamonly ) - local args = string.Explode( " ", text ) - if ( args == nil ) then args = {} end - - if ( teamonly ) then - if ( GMS.RunChatCmd( ply, args ) != "" ) then - for k, v in pairs( player.GetAll() ) do - if ( IsValid( v ) && v:IsPlayer() && v:Team() == ply:Team() ) then - v:PrintMessage( 3, "[TRIBE] " .. ply:Nick() .. ": " .. text ) - end - end - end - return "" - else - return GMS.RunChatCmd( ply, args ) or text - end -end - -GMS.ChatCommands = {} -function GMS.RegisterChatCmd( tbl ) - GMS.ChatCommands[ tbl.Command ] = tbl -end - -function GMS.RunChatCmd( ply, arg ) - if ( #arg > 0 && ( string.Left( arg[ 1 ], 1 ) == "/" or string.Left( arg[1], 1 ) == "!" ) ) then - local cmd = string.sub( arg[ 1 ], 2, string.len( arg[ 1 ] ) ) - table.remove( arg, 1 ) - - if ( ply:GetNWBool( "AFK" ) && cmd != "afk" ) then - ply:SendMessage( "You can't do this while afk.", 3, Color( 200, 0, 0, 255 ) ) - elseif ( ply:GetNWBool( "Sleeping" ) && cmd != "wakeup" ) then - ply:SendMessage( "You can't do this while sleeping.", 3, Color( 200, 0, 0, 255 ) ) - end - - if ( GMS.ChatCommands[ cmd ] != nil ) then - GMS.ChatCommands[cmd]:Run( ply, arg ) - return "" - end - end -end - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "commands" -CHATCMD.Desc = "Prints all possible commands" - -function CHATCMD:Run( ply ) - ply:PrintMessage( HUD_PRINTCONSOLE, "\n\n\nGarry's Mod Stranded chat commands:\n\n" ) - for _, v in pairs( GMS.ChatCommands ) do - if ( v.Command != nil ) then - local desc = v.Desc or "No description given." - local syntax = v.Syntax or "" - if ( syntax != "" ) then syntax = syntax .. " " end - ply:PrintMessage( HUD_PRINTCONSOLE, v.Command .. " " .. syntax .. "- " .. v.Desc ) - end - end - ply:PrintMessage( HUD_PRINTCONSOLE, "\n<arg> - Required argument, [arg] - Optional argument\n" ) - ply:PrintMessage( HUD_PRINTCONSOLE, "All commands start with '!' or '/'." ) - ply:PrintMessage( HUD_PRINTCONSOLE, "For item names with spaces use '_', for example !drop Water_Bottles 5\n\n" ) - ply:PrintMessage( HUD_PRINTTALK, "All commands were printed into console (~)" ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "help" -CHATCMD.Desc = "Open help menu" -CHATCMD.CCName = "gms_help" - -function CHATCMD:Run( ply, args ) - ply:ConCommand( self.CCName ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "drop" -CHATCMD.Desc = "No amount will drop all" -CHATCMD.Syntax = "<Resource Type> [Amount]" -CHATCMD.CCName = "gms_dropresources" - -function CHATCMD:Run( ply, args ) - GAMEMODE.DropResource( ply, self.CCName, args ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "sleep" -CHATCMD.Desc = "Goto sleep" -CHATCMD.CCName = "gms_sleep" - -function CHATCMD:Run( ply ) - ply:Sleep() -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "stuck" -CHATCMD.Desc = "In case you are stuck" -CHATCMD.CCName = "gms_stuck" - -function CHATCMD:Run( ply ) - GAMEMODE.PlayerStuck( ply ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "adrop" -CHATCMD.Desc = "Drops a specified of resources out of nowhere. Admin only." -CHATCMD.Syntax = "<Resource Type> <Amount>" -CHATCMD.CCName = "gms_adropresources" - -function CHATCMD:Run( ply, args ) - GAMEMODE.ADropResource( ply, self.CCName, args ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "wakeup" -CHATCMD.Desc = "Wakeup from sleep." -CHATCMD.CCName = "gms_wakeup" - -function CHATCMD:Run( ply ) - ply:Wakeup() -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} -CHATCMD.Command = "campfire" -CHATCMD.Desc = "Make a camp fire." -CHATCMD.CCName = "gms_makefire" - -function CHATCMD:Run( ply ) - GAMEMODE.MakeCampfire( ply ) -end -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "drink" -CHATCMD.Desc = "Drink a water bottle." -CHATCMD.CCName = "gms_drinkbottle" - -function CHATCMD:Run( ply ) - GAMEMODE.DrinkFromBottle( ply ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "melon" -CHATCMD.Desc = "Plant a watermelon." -CHATCMD.CCName = "gms_plantmelon" - -function CHATCMD:Run( ply ) - GAMEMODE.PlantMelon( ply ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "banana" -CHATCMD.Desc = "Plant a banana." -CHATCMD.CCName = "gms_plantbanana" - -function CHATCMD:Run( ply ) - GAMEMODE.PlantBanana( ply ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "orange" -CHATCMD.Desc = "Plant an orange." -CHATCMD.CCName = "gms_plantorange" - -function CHATCMD:Run( ply ) - GAMEMODE.PlantOrange( ply ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "grain" -CHATCMD.Desc = "Plant grain." -CHATCMD.CCName = "gms_plantgrain" - -function CHATCMD:Run( ply ) - GAMEMODE.PlantGrain( ply ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "berrybush" -CHATCMD.Desc = "Plant berry bush." -CHATCMD.CCName = "gms_plantbush" - -function CHATCMD:Run( ply ) - GAMEMODE.PlantBush( ply ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "tree" -CHATCMD.Desc = "Plant a tree." -CHATCMD.CCName = "gms_planttree" - -function CHATCMD:Run( ply ) - GAMEMODE.PlantTree( ply ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "dropweapon" -CHATCMD.Desc = "Drop your current weapon." -CHATCMD.CCName = "gms_dropweapon" - -function CHATCMD:Run( ply ) - GAMEMODE.DropWeapon( ply ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "take" -CHATCMD.Desc = "Take resources out of Resource Pack/Box." -CHATCMD.Syntax = "[Resource Type] [Amount]" -CHATCMD.CCName = "gms_takeresources" -function CHATCMD:Run( ply, args ) - GAMEMODE.TakeResource( ply, self.CCName, args ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "medicine" -CHATCMD.Desc = "Take a Medicine." -CHATCMD.CCName = "gms_takemedicine" - -function CHATCMD:Run( ply ) - GAMEMODE.TakeAMedicine( ply ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "afk" -CHATCMD.Desc = "Go away from keyboard. ( Doesn't reduce your needs )" -CHATCMD.CCName = "gms_afk" - -function CHATCMD:Run( ply, args ) - GAMEMODE.AFK( ply, self.CCName, args ) - ply:ConCommand("-menu") -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "rn" -CHATCMD.Syntax = "[Player]" -CHATCMD.Desc = "Reset your / someone's needs. Admin Only." - -function CHATCMD:Run( ply, args ) - if ( !ply:IsAdmin() ) then return end - if ( args && #args > 0 ) then - pl = player.FindByName( args[ 1 ] ) - if ( !pl ) then ply:SendMessage( "Player not found!", 3, Color( 200, 10, 10, 255 ) ) return end - pl.Hunger = 1000 - pl.Thirst = 1000 - pl.Sleepiness = 1000 - pl:UpdateNeeds() - else - ply.Hunger = 1000 - ply.Thirst = 1000 - ply.Sleepiness = 1000 - ply:UpdateNeeds() - end -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "finish" -CHATCMD.Desc = "Finish the structure you are looking at." - -function CHATCMD:Run( ply, args ) - if ( !ply:IsAdmin() || ply:GetEyeTrace().Entity:GetClass() != "gms_buildsite" ) then return end - ply:GetEyeTrace().Entity:Finish() -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "r" -CHATCMD.Desc = "Give resources to yourself / someone" -CHATCMD.Syntax = "[player] <Resource> <Amount>" - -function CHATCMD:Run(ply, arg) - if ( !ply:IsAdmin() || !arg ) then return end - if ( #arg > 2 ) then - local pl = player.FindByName( arg[ 1 ] ) - if ( !pl ) then ply:SendMessage( "Player not found!", 3, Color( 200, 10, 10, 255 ) ) return end - pl:IncResource( arg[ 2 ], tonumber( arg[ 3 ] ) ) - elseif ( #arg == 2 ) then - ply:IncResource( arg[ 1 ], tonumber( arg[ 2 ] ) ) - end -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "steal" -CHATCMD.Desc = "Steal a prop." -CHATCMD.CCName = "gms_steal" - -function CHATCMD:Run( ply ) - ply.ConCommand( ply, "gms_steal" ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "createtribe" -CHATCMD.Desc = "Opens create tribe menu." -CHATCMD.CCName = "gms_tribemenu" - -function CHATCMD:Run( ply, args ) - ply:ConCommand( self.CCName ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "invite" -CHATCMD.Desc = "Invite someone to your tribe" -CHATCMD.Syntax = "<player>" - -function CHATCMD:Run( ply, args ) - local him = player.FindByName( args[ 1 ] ) - if ( !him ) then ply:SendMessage( "Player not found!", 3, Color( 200, 10, 10, 255 ) ) return end - if ( him == ply ) then ply:SendMessage( "Why invite yourself?", 3, Color( 200, 64, 10, 255 ) ) return end - if ( him.LastInvite && him.LastInvite > CurTime() ) then ply:SendMessage( "Too much invitations to " .. him:Name() .. "! Wait " .. ( CurTime() - him.LastInvite) .. " seconds.", 3, Color( 200, 10, 10, 255 ) ) return end - local mahTribe = GAMEMODE.FindTribeByID( ply:Team() ) - - him.LastInvite = CurTime() + 30 - - if ( !mahTribe ) then ply:SendMessage( "Something went wrong! Report this to admins: " .. ply:Team(), 3, Color( 200, 10, 10, 255 ) ) return end - - ply:SendMessage( "Invitation sent!", 3, Color( 200, 200, 200, 255 ) ) - - umsg.Start( "gms_invite", him ) - umsg.String( mahTribe.name ) - umsg.String( tostring( mahTribe.password ) ) - umsg.End() -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "join" -CHATCMD.Desc = "Opens join tribe menu." -CHATCMD.CCName = "gms_tribes" - -function CHATCMD:Run( ply, args ) - ply:ConCommand( self.CCName ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - -CHATCMD.Command = "leave" -CHATCMD.Desc = "Leave a tribe." -CHATCMD.CCName = "gms_leave" - -function CHATCMD:Run( ply, args ) - GAMEMODE.LeaveTribeCmd( ply, self.CCName, args ) -end - -GMS.RegisterChatCmd( CHATCMD ) diff --git a/ftp_gmstranded/gamemode/cl_deathmenu.lua b/ftp_gmstranded/gamemode/cl_deathmenu.lua deleted file mode 100644 index 472547a..0000000 --- a/ftp_gmstranded/gamemode/cl_deathmenu.lua +++ /dev/null @@ -1,368 +0,0 @@ - -surface.CreateFont( "Header", { - font = "Arial", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name - size = 16, - weight = 500, - blursize = 0, - scanlines = 0, - antialias = true, - underline = false, - italic = false, - strikeout = false, - symbol = false, - rotary = false, - shadow = false, - additive = false, - outline = false, -} ) - -surface.CreateFont( "Items", { - font = "Arial", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name - size = 14, - weight = 0, - blursize = 0, - scanlines = 0, - antialias = true, - underline = false, - italic = false, - strikeout = false, - symbol = false, - rotary = false, - shadow = false, - additive = false, - outline = false, -} ) - - - -active = 0 - -local res -local wep -local dmFrame - -local function receive_message(len) - -res = net.ReadTable() -wep = net.ReadTable() - -if (active == 0) then dmFrame = vgui.Create("dmFrame") active = 1 end - -end -net.Receive('deathmenu', receive_message) - - - -local PANEL = {} - -width = 100 -height = 100 - -function PANEL:Init() - - self:SetSize( 440, 400 ) - self:Center() - self:MakePopup() - self:SetTitle("") - - local pnl = vgui.Create( "DPanel", self ) - pnl:SetSize(self:GetWide()-10, self:GetTall()-25) - pnl:SetPos(5,25) - - local DScrollPanel = vgui.Create( "DScrollPanel", pnl ) - DScrollPanel:SetSize( pnl:GetWide(), pnl:GetTall() ) - DScrollPanel:SetPos( 0, 0 ) - - // Weapons - - local wepPnlHeader = vgui.Create("DPanel", DScrollPanel) - wepPnlHeader:SetSize( DScrollPanel:GetWide(), 25 ) - wepPnlHeader:SetPos(0,0) - wepPnlHeader.Paint = function() - - draw.RoundedBox( 0, 0, 0, wepPnlHeader:GetWide(), wepPnlHeader:GetTall(), Color( 48, 48, 48, 255 ) ) - draw.SimpleText( "Weapons", "Header", 30, 12, Color(255, 255, 255), 1, 1 ) - end - - column = 1 - row = 1 - XOffset = 12 - for k,v in pairs(wep) do - local wepPNL = vgui.Create( "DButton", DScrollPanel ) - wepPNL:SetSize( width, height ) - if (k/4 <= column) then - wepPNL:SetPos( (row-1)*(width+2) + XOffset,(column-1)*(height+2) + 25) - row=row+1 - else - column=column+1 - row=1 - wepPNL:SetPos( (row-1)*(width+2) + XOffset,(column-1)*(height+2) + 25) - row=row+1 - end - - wepPNL:SetDrawBackground( false ) - - wepPNL.Paint = function() - - draw.RoundedBox( 0, 0, 0, wepPNL:GetWide(), wepPNL:GetTall(), Color(69,69,69,125) ) - - surface.SetFont("Items") - surface.SetTextColor( 0,0,0 ) - surface.SetTextPos( (width/2)-(surface.GetTextSize(v)/2), height-20 ) - surface.DrawText(v) - end - - wepPNL.DoClick = function() - if (!LocalPlayer():HasWeapon(v)) then - - net.Start('givePlayerWeapon') - net.WriteString(v) - for i,o in pairs(wep) do - if (v == o) then - net.WriteInt(i, 32) - table.remove(wep,i) - end - end - wepPNL:Remove() - - net.SendToServer() - end - end - - local img = vgui.Create("DImage", wepPNL) - img:SetPos(0, 0) - img:SetSize(wepPNL:GetSize()) - img:SetImage("gms_icons/gms_weapon.png") - - - end - - // Resources - - local resPnlHeader = vgui.Create("DPanel", DScrollPanel) - resPnlHeader:SetSize( DScrollPanel:GetWide(), 25 ) - resPnlHeader:SetPos(0,column*height + 25) - resPnlHeader.Paint = function() - draw.RoundedBox( 0, 0, 0, resPnlHeader:GetWide(), resPnlHeader:GetTall(), Color( 48, 48, 48, 255 ) ) - draw.SimpleText( "Resources", "Header", 35, 12, Color(255, 255, 255), 1, 1 ) - end - - row2 = 1 - column2 = 1 - for k,v in pairs(res) do - local resPNL = vgui.Create( "DButton", DScrollPanel ) - resPNL:SetSize( width, height ) - if (k/4 <= column2) then - resPNL:SetPos( (row2-1)*(width+2) + XOffset,(column2-1)*(height+2) + (column*height + 50)) - row2=row2+1 - else - column2=column2+1 - row2=1 - resPNL:SetPos( (row2-1)*(width+2) + XOffset,(column2-1)*(height+2) + (column*height + 50)) - row2=row2+1 - end - - local tbl1 = string.Split(res[k], " ") - local tbl2 = string.Split(tbl1[2], "x") - local amount = tbl2[2] - - resPNL.DoClick = function() - local mb = DermaMenu() - - - mb:AddOption("Take x1", function() - - if (amount - 1 <= 0) then - amount = 0 - for i,o in pairs(res) do - spl1 = string.Split(v, " ") - spl2 = string.Split(o, " ") - if (spl1[1] == spl2[1]) then - giveRes(tbl1[1], 1, i) - table.remove(res,i) - end - end - resPNL:Remove() - else - amount = amount - 1 - - - for i,o in pairs(res) do - spl1 = string.Split(v, " ") - spl2 = string.Split(o, " ") - if (spl1[1] == spl2[1]) then - giveRes(tbl1[1], 1, i) - res[i] = tbl1[1] .. " x" .. amount - v = res[i] - end - end - - end - - end) - mb:AddOption("Take x5", function() - - if (amount - 5 <= 0) then - - if (amount - 5 == 0) then - amount = 0 - - - for i,o in pairs(res) do - spl1 = string.Split(v, " ") - spl2 = string.Split(o, " ") - if (spl1[1] == spl2[1]) then - giveRes(tbl1[1], 5, i) - table.remove(res, i) - end - end - resPNL:Remove() - else - - num1 = amount - 5 - num2 = 5 + num1 - amount = 0 - - - - for i,o in pairs(res) do - spl1 = string.Split(v, " ") - spl2 = string.Split(o, " ") - if (spl1[1] == spl2[1]) then - giveRes(tbl1[1], num2, i) - print(i) - table.remove(res,i) - end - end - resPNL:Remove() - end - else - amount = amount - 5 - - - for i,o in pairs(res) do - spl1 = string.Split(v, " ") - spl2 = string.Split(o, " ") - if (spl1[1] == spl2[1]) then - giveRes(tbl1[1], 5, i) - res[i] = tbl1[1] .. " x" .. amount - v = res[i] - end - end - - end - - end) - mb:AddOption("Take x10", function() - - if (amount - 10 <= 0) then - - if (amount - 10 == 0) then - amount = 0 - - for i,o in pairs(res) do - spl1 = string.Split(v, " ") - spl2 = string.Split(o, " ") - if (spl1[1] == spl2[1]) then - giveRes(tbl1[1], 10, i) - table.remove(res, i) - end - end - resPNL:Remove() - else - - num1 = amount - 10 - num2 = 10 + num1 - amount = 0 - - - for i,o in pairs(res) do - spl1 = string.Split(v, " ") - spl2 = string.Split(o, " ") - if (spl1[1] == spl2[1]) then - giveRes(tbl1[1], num2, i) - table.remove(res,i) - end - end - - resPNL:Remove() - - end - else - amount = amount - 10 - - - for i,o in pairs(res) do - spl1 = string.Split(v, " ") - spl2 = string.Split(o, " ") - if (spl1[1] == spl2[1]) then - giveRes(tbl1[1], 10, i) - res[i] = tbl1[1] .. " x" .. amount - v = res[i] - end - end - - end - - end) - mb:AddOption("Take All", function() - - - for i,o in pairs(res) do - spl1 = string.Split(v, " ") - spl2 = string.Split(o, " ") - if (spl1[1] == spl2[1]) then - giveRes(tbl1[1], amount, i) - amount = 0 - table.remove(res,i) - end - end - - resPNL:Remove() - end) - mb:Open() - end - - resPNL.Paint = function() - draw.RoundedBox( 0, 0, 0, resPNL:GetWide(), resPNL:GetTall(), Color( 69, 69, 69, 125 ) ) - - - surface.SetFont("Items") - surface.SetTextColor( 0,0,0 ) - surface.SetTextPos( (width/2)-(surface.GetTextSize(v)/2), height-20 ) - surface.DrawText(v) - - end - - local img = vgui.Create("DImage", resPNL) - img:SetPos(0, 0) - img:SetSize(resPNL:GetSize()) - img:SetImage("gms_icons/gms_resourcepack.png") - end - -end - -function PANEL:Close() - active = 0 - self:Remove() -end - -function giveRes(res, amount, slot) - - net.Start('givePlayerResource') - - net.WriteString(res) - net.WriteInt(amount, 32) - net.WriteInt(slot, 32) - - net.SendToServer() - -end - -function PANEL:Paint( w, h ) - draw.RoundedBox( 0, 0, 0, w, h, Color( 69, 69, 69, 125 ) ) -end - -vgui.Register( "dmFrame", PANEL, "DFrame" ) - - diff --git a/ftp_gmstranded/gamemode/cl_hud.lua b/ftp_gmstranded/gamemode/cl_hud.lua deleted file mode 100644 index b217c2c..0000000 --- a/ftp_gmstranded/gamemode/cl_hud.lua +++ /dev/null @@ -1,412 +0,0 @@ -surface.CreateFont( "DefaultSmall", { - font = "Tahoma", - size = ScreenScale( 7 ), - weight = 500 -} ) - -surface.CreateFont( "DefaultHealth", { - font = "Tahoma", - size = ScreenScale( 30 ), - weight = 900 -} ) - -function GM:DrawStrandedHUD() - - local w = ScrW() / 6 - local h = 4 * 12 + 10 - - if ( self.SkillsHud ) then self.SkillsHud:SetPos( 0, h ) end - - surface.SetDrawColor( StrandedBackgroundColor ) - surface.DrawRect( 0, 0, w, h ) - - surface.SetDrawColor( StrandedBorderColor ) - surface.DrawLine( w - 1, 0, w - 1, h ) -- Nice line instead of messy outlined rect - surface.DrawLine( 0, h - 1, w, h - 1 ) - - local width = w - 10 - - //Health - local hp_w = math.floor( ( LocalPlayer():Health() / 200 ) * width ) - surface.SetDrawColor( 0, 0, 0, 255 ) - surface.DrawRect( 5, 5, width, 10 ) - - surface.SetDrawColor( 176, 0, 0, 255 ) - surface.DrawRect( 5, 5, math.min( hp_w, width ), 10 ) - - draw.SimpleTextOutlined( "Health", "DefaultSmall", w / 2, 9, StrandedTextColor, 1, 1, 0.5, StrandedTextShadowColor ) - - //Hunger - local hunger_w = math.floor( ( Hunger / 1000 ) * width ) - surface.SetDrawColor( 0, 0, 0, 255 ) - surface.DrawRect( 5, 17, width, 10 ) - - surface.SetDrawColor( 0, 176, 0, 255 ) - surface.DrawRect( 5, 17, hunger_w, 10 ) - - draw.SimpleTextOutlined( "Hunger","DefaultSmall", w / 2, 21, StrandedTextColor, 1, 1, 0.5, StrandedTextShadowColor ) - - //Thirst - local thrst_w = math.floor( ( Thirst / 1000 ) * width ) - surface.SetDrawColor( 0, 0, 0, 255 ) - surface.DrawRect( 5, 29, width, 10 ) - - surface.SetDrawColor( 0, 0, 176, 255 ) - surface.DrawRect( 5, 29, thrst_w, 10 ) - - draw.SimpleTextOutlined( "Thirst", "DefaultSmall", w / 2, 33, StrandedTextColor, 1, 1, 0.5, StrandedTextShadowColor ) - - //Fatigue - local sleep_w = math.floor( math.min( Sleepiness / 1000, 1000 ) * width ) - surface.SetDrawColor( 0, 0, 0, 255 ) - surface.DrawRect( 5, 41, width, 10 ) - - surface.SetDrawColor( 176, 0, 176, 255 ) - surface.DrawRect( 5, 41, sleep_w, 10 ) - - draw.SimpleTextOutlined( "Fatigue", "DefaultSmall", w / 2, 45, StrandedTextColor, 1, 1, 0.5, StrandedTextShadowColor ) -end - -function GM:DrawStrandedHUD() - local w = ScrW() / 12 - local h = ScrW() / 22 - local x = 5 - local y = ScrH() - h - 5 - - local w_bar = ScrW() / 8 - local h_bar = ScrW() / 80 - local x_bar = x + w + 5 - local bar_spacing = ScrW() / 300 - - surface.SetDrawColor( StrandedBackgroundColor ) - surface.DrawRect( x, y, w, h ) - - surface.SetDrawColor( StrandedBorderColor ) - surface.DrawOutlinedRect( x, y, w, h ) - - local hpColor = StrandedTextColor - if ( LocalPlayer():Health() < 25 ) then hpColor = StrandedHealthColor end - draw.SimpleTextOutlined( tostring( LocalPlayer():Health() ), "DefaultHealth", x + w / 2, y + h / 2, hpColor, 1, 1, 0.5, StrandedBorderColor ) - - local bar_y = y + h / 2 - h_bar / 2 - h_bar - bar_spacing - local hunger_w = math.floor( ( Hunger / 1000 ) * w_bar ) - surface.SetDrawColor( StrandedBackgroundColor ) - surface.DrawRect( x_bar, bar_y, w_bar, h_bar ) - - surface.SetDrawColor( StrandedHungerColor ) - surface.DrawRect( x_bar, bar_y, hunger_w, h_bar ) - - surface.SetDrawColor( StrandedBorderColor ) - surface.DrawOutlinedRect( x_bar, bar_y, w_bar, h_bar ) - - draw.SimpleTextOutlined( "Hunger","DefaultSmall", x_bar + w_bar / 2, bar_y + h_bar / 2, StrandedTextColor, 1, 1, 0.5, StrandedTextShadowColor ) - - local bar_y = y + h / 2 - h_bar / 2 - local thrst_w = math.floor( ( Thirst / 1000 ) * w_bar ) - surface.SetDrawColor( StrandedBackgroundColor ) - surface.DrawRect( x_bar, bar_y, w_bar, h_bar ) - - surface.SetDrawColor( StrandedThirstColor ) - surface.DrawRect( x_bar, bar_y, thrst_w, h_bar ) - - surface.SetDrawColor( StrandedBorderColor ) - surface.DrawOutlinedRect( x_bar, bar_y, w_bar, h_bar ) - - draw.SimpleTextOutlined( "Thirst", "DefaultSmall", x_bar + w_bar / 2, bar_y + h_bar / 2, StrandedTextColor, 1, 1, 0.5, StrandedTextShadowColor ) - - local bar_y = y + h / 2 - h_bar / 2 + h_bar + bar_spacing - local sleep_w = math.floor( math.min( Sleepiness / 1000, 1000 ) * w_bar ) - surface.SetDrawColor( StrandedBackgroundColor ) - surface.DrawRect( x_bar, bar_y, w_bar, h_bar ) - - surface.SetDrawColor( StrandedFatigueColor ) - surface.DrawRect( x_bar, bar_y, sleep_w, h_bar ) - - surface.SetDrawColor( StrandedBorderColor ) - surface.DrawOutlinedRect( x_bar, bar_y, w_bar, h_bar ) - - draw.SimpleTextOutlined( "Fatigue", "DefaultSmall", x_bar + w_bar / 2, bar_y + h_bar / 2, StrandedTextColor, 1, 1, 0.5, StrandedTextShadowColor ) -end - -function GM:DrawWristWatch() - - if ( GetConVarNumber( "gms_daynight" ) <= 0 || !Resources[ "Wrist_Watch" ] || Resources[ "Wrist_Watch" ] < 1 ) then return end - - local w = ScrW() / 12 - local h = ScrH() / 25 - local x = 5//ScrW() - ScrH() / 16 - w - local y = ScrH() - ScrW() / 22 - 10 - h //ScrH() / 16 - - surface.SetDrawColor( StrandedBackgroundColor ) - surface.DrawRect( x, y, w, h ) - - surface.SetDrawColor( StrandedBorderColor ) - surface.DrawOutlinedRect( x, y, w, h ) - - local hours = os.date( "%M", Time ) - local mins = os.date( "%S", Time ) - draw.SimpleTextOutlined( hours .. ":" .. mins, "ScoreboardSub", x + w / 2, y + h / 2, StrandedTextColor, 1, 1, 0.5, StrandedTextShadowColor ) - -end - -function GM:DrawOxygenBar() - - if ( Oxygen >= 1000 ) then return end - - local w = ScrW() / 5 - local h = ScrH() / 48 - local x = ScrW() / 2 - w / 2 - local y = ScrH() / 6 - - surface.SetDrawColor( StrandedBackgroundColor ) - surface.DrawRect( x, y, w, h ) - - surface.SetDrawColor( StrandedOxygenColor ) - surface.DrawRect( x, y, math.min( math.floor( math.min( Oxygen / 1000, 1000 ) * w ), w ), h ) - - surface.SetDrawColor( StrandedBorderColor ) - surface.DrawOutlinedRect( x, y, w, h ) - - draw.SimpleTextOutlined( "Oxygen", "DefaultSmall", x + w / 2, y + h / 2, StrandedTextColor, 1, 1, 0.5, StrandedTextShadowColor ) - -end - -function GM:DrawPowerBar() - - if ( !Resources[ "Flashlight" ] or Resources[ "Flashlight" ] < 1 ) then return end - - local maxPower = 50 - if ( Resources[ "Batteries" ] ) then maxPower = math.min( maxPower + Resources[ "Batteries" ] * 50, 500 ) end - - if ( Power >= maxPower ) then return end - - local w = ScrW() / 6 - local h = ScrH() / 48 - local x = ScrW() / 2 - w / 2 - local y = ScrH() - ScrH() / 16 - h * 2 - - surface.SetDrawColor( StrandedBackgroundColor ) - surface.DrawRect( x, y, w, h ) - - surface.SetDrawColor( StrandedPowerColor ) - surface.DrawRect( x, y, math.min( math.floor( math.min( Power / maxPower, maxPower ) * w ), w ), h ) - - surface.SetDrawColor( StrandedBorderColor ) - surface.DrawOutlinedRect( x, y, w, h ) - - draw.SimpleTextOutlined( "Flashlight Power", "DefaultSmall", x + w / 2, y + h / 2.5, StrandedTextColor, 1, 1, 0.5, StrandedTextShadowColor ) - -end - -function GM:DrawProcessBar() - if ( !ProcessCompleteTime ) then return end - - local w = ScrW() / 3.2 - local h = ScrH() / 30 - local x = ScrW() / 2 - w / 2 - local y = ScrH() / 8 - - local width = math.min( ( CurTime() - ProcessStart ) / ProcessCompleteTime * w, w ) - if ( width > w ) then GAMEMODE.StopProgressBar() end - - surface.SetDrawColor( StrandedBackgroundColor ) - surface.DrawRect( x, y, w, h ) - - surface.SetDrawColor( StrandedForegroundColor ) - surface.DrawRect( x, y, width, h ) - - surface.SetDrawColor( StrandedBorderColor ) - surface.DrawOutlinedRect( x, y, w, h ) - - local txt = CurrentProcess - if ( ProcessCancelAble ) then txt = txt .. " ( F4 to Cancel )" end - - draw.SimpleText( txt, "ScoreboardText", x + w / 2, y + h / 2, StrandedTextColor, 1, 1 ) - -end - -function GM:HUDDrawTargetID() - local tr = util.GetPlayerTrace( LocalPlayer() ) - local trace = util.TraceLine( tr ) - if (!trace.Hit) then return end - if (!trace.HitNonWorld) then return end - - local text = "ERROR" - local font = "TargetID" - - if (trace.Entity:IsPlayer()) then - text = trace.Entity:Nick() - else - return - end - - surface.SetFont( font ) - local w, h = surface.GetTextSize( text ) - - local MouseX, MouseY = gui.MousePos() - - if ( MouseX == 0 && MouseY == 0 ) then - MouseX = ScrW() / 2 - MouseY = ScrH() / 2 - end - - local x = MouseX - local y = MouseY - - x = x - w / 2 - y = y + 30 - - -- The fonts internal drop shadow looks lousy with AA on - draw.SimpleText( text, font, x+1, y+1, Color(0,0,0,120) ) - draw.SimpleText( text, font, x+2, y+2, Color(0,0,0,50) ) - draw.SimpleText( text, font, x, y, self:GetTeamColor( trace.Entity ) ) - - y = y + h - - local text = trace.Entity:Team() - local font = "TargetIDSmall" - - for id, tabl in pairs( Tribes ) do - if ( id == text ) then text = tabl.name end - end - - surface.SetFont( font ) - local w, h = surface.GetTextSize( text ) - local x = MouseX - w / 2 - - draw.SimpleText( text, font, x+1, y+1, Color(0,0,0,120) ) - draw.SimpleText( text, font, x+2, y+2, Color(0,0,0,50) ) - draw.SimpleText( text, font, x, y, self:GetTeamColor( trace.Entity ) ) - - y = y + h + 5 - - local text = trace.Entity:Health() .. "%" - local font = "TargetIDSmall" - - surface.SetFont( font ) - local w, h = surface.GetTextSize( text ) - local x = MouseX - w / 2 - - draw.SimpleText( text, font, x+1, y+1, Color(0,0,0,120) ) - draw.SimpleText( text, font, x+2, y+2, Color(0,0,0,50) ) - draw.SimpleText( text, font, x, y, self:GetTeamColor( trace.Entity ) ) -end - -function GM:DrawResourceDropsHUD() - local ply = LocalPlayer() - local str = nil - local draw_loc = nil - local w, h = nil, nil - local tr = nil - local cent = nil - local pos = ply:GetShootPos() - - for _, v in ipairs( ents.GetAll() ) do - if ( !IsValid( v ) ) then continue end - local class = v:GetClass() - - if ( class == "gms_resourcedrop" ) then - cent = v:LocalToWorld( v:OBBCenter() ) - - tr = { - start = pos, - endpos = cent, - filter = ply - } - - if ( ( cent - pos ):Length() <= 200 && util.TraceLine( tr ).Entity == v ) then - str = ( v.Res or "Loading" ) .. ": " .. tostring( v.Amount or 0 ) - draw_loc = cent:ToScreen() - surface.SetFont( "ChatFont" ) - w, h = surface.GetTextSize( str ) - draw.RoundedBox( 4, draw_loc.x - ( w / 2 ) - 3, draw_loc.y - ( h / 2 ) - 3, w + 6, h + 6, Color( 50, 50, 50, 200 ) ) - surface.SetTextColor( 255, 255, 255, 200 ) - surface.SetTextPos( draw_loc.x - ( w / 2 ), draw_loc.y -( h / 2 ) ) - surface.DrawText( str ) - end - continue - end - - if ( class == "gms_resourcepack" or class == "gms_fridge" ) then - cent = v:LocalToWorld( v:OBBCenter() ) - - tr = { - start = pos, - endpos = cent, - filter = ply - } - - if ( ( cent - pos ):Length() <= 200 and util.TraceLine( tr ).Entity == v ) then - draw_loc = cent:ToScreen() - surface.SetFont( "ChatFont" ) - str = "Resource pack" - if ( class == "gms_fridge" ) then str = "Fridge" end - for res, num in pairs( v.Resources or {} ) do - str = str .. "\n" .. res .. ": " .. num - end - w, h = surface.GetTextSize( str ) - draw.RoundedBox( 4, draw_loc.x - ( w / 2 ) - 3, draw_loc.y - ( h / 2 ) - 3, w + 6, h + 6, Color( 50, 50, 50, 200 ) ) - surface.SetTextColor( 255, 255, 255, 200 ) - for id, st in pairs( string.Explode( "\n", str ) ) do - id = id - 1 - w2, h2 = surface.GetTextSize( st ) - surface.SetTextPos( draw_loc.x - ( w / 2 ), draw_loc.y - ( h / 2 ) + ( id * h2 ) ) - surface.DrawText( st ) - end - end - continue - end - - if ( table.HasValue( GMS.StructureEntities, class ) ) then - cent = v:LocalToWorld( v:OBBCenter() ) - local minimum = v:LocalToWorld( v:OBBMins() ) - local maximum = v:LocalToWorld( v:OBBMaxs() ) - local distance = ( maximum - minimum ):Length() - if ( distance < 200 ) then distance = 200 end - - - - tr2 = {} - tr2.start = pos - tr2.endpos = Vector( cent.x, cent.y, pos.z ) - tr2.filter = ply - - if ( ( cent - pos ):Length() <= distance and ( util.TraceLine( tr2 ).Entity == v or !util.TraceLine( tr2 ).Hit ) ) then - str = language.GetPhrase( class ) -- ( v:GetNWString( "Name" ) or "Loading" ) - if ( class == "gms_buildsite" ) then - str = v:GetNWString( "Name" ) .. v:GetNWString( "Resources" ) - end - - draw_loc = cent:ToScreen() - surface.SetFont( "ChatFont" ) - w, h = surface.GetTextSize( str ) - draw.RoundedBox( 4, draw_loc.x - ( w / 2 ) - 3, draw_loc.y - ( h / 2 ) - 3, w + 6, h + 6, Color( 50, 50, 50, 200 ) ) - surface.SetTextColor( Color( 255, 255, 255, 200 ) ) - - local strs = string.Explode( "\n", str ) - for id, str in pairs( strs ) do - surface.SetTextPos( draw_loc.x - ( w / 2 ), draw_loc.y - ( h / 2 ) + ( id - 1 ) * 15 ) - surface.DrawText( str ) - end - end - end - end -end - - -function GM:HUDPaint() - self.BaseClass:HUDPaint() - self:DrawResourceDropsHUD() - - self:DrawStrandedHUD() - self:DrawWristWatch() - self:DrawProcessBar() - self:DrawOxygenBar() - self:DrawPowerBar() -end - -function GM:HUDShouldDraw( name ) - if ( name != "CHudHealth" && name != "CHudBattery" ) then - return true - end -end
\ No newline at end of file diff --git a/ftp_gmstranded/gamemode/cl_init.lua b/ftp_gmstranded/gamemode/cl_init.lua deleted file mode 100644 index bbf57a5..0000000 --- a/ftp_gmstranded/gamemode/cl_init.lua +++ /dev/null @@ -1,605 +0,0 @@ - -include( "shared.lua" ) - -include( "cl_qmenu.lua" ) -include( "cl_scoreboard.lua" ) -include( "cl_panels.lua" ) -include( "cl_hud.lua" ) -include( "cl_deathmenu.lua" ) - --- HUD Theme -StrandedColorTheme = Color( 0, 0, 0, 240 ) -StrandedBorderTheme = Color( 0, 0, 0, 180 ) - -StrandedBackgroundColor = Color( 0, 0, 0, 180 ) -StrandedForegroundColor = Color( 0, 128, 176, 220 ) -StrandedBorderColor = Color( 0, 0, 0, 150 ) -StrandedTextColor = color_white -StrandedTextShadowColor = Color( 100, 100, 100, 140 ) - -StrandedHealthColor = Color( 176, 0, 0, 240 ) -StrandedHungerColor = Color( 0, 176, 0, 240 ) -StrandedThirstColor = Color( 0, 0, 176, 240 ) -StrandedFatigueColor = Color( 176, 0, 176, 240 ) -StrandedOxygenColor = Color( 0, 200, 200, 220 ) -StrandedPowerColor = Color( 200, 200, 0, 220 ) - --- Clientside player variables -Tribes = Tribes or {} -Skills = Skills or {} -Resources = Resources or {} -Experience = Experience or {} -FeatureUnlocks = FeatureUnlocks or {} -MaxResources = MaxResources or 25 -CampFires = CampFires or {} - -Sleepiness = Sleepiness or 1000 -Hunger = Hunger or 1000 -Thirst = Thirst or 1000 -Oxygen = Oxygen or 1000 -Power = Power or 50 - -/* Language */ -language.Add( "gms_stonefurnace", "Stone Furnace" ) -language.Add( "gms_stoneworkbench", "Stone Workbench" ) -language.Add( "gms_copperfurnace", "Copper Furnace" ) -language.Add( "gms_copperworkbench", "Copper Workbench" ) -language.Add( "gms_ironfurnace", "Iron Furnace" ) -language.Add( "gms_ironworkbench", "Iron Workbench" ) -language.Add( "gms_techfurnace", "Tech Furnace" ) -language.Add( "gms_techworkbench", "Tech Workbench" ) -language.Add( "gms_silverfurnace", "Silver Furnace" ) -language.Add( "gms_silverworkbench", "Silver Workbench" ) -language.Add( "gms_goldfurnace", "Gold Furnace" ) -language.Add( "gms_goldworkbench", "Gold Workbench" ) -language.Add( "gms_steelfurnace", "Steel Furnace" ) -language.Add( "gms_steelworkbench", "Steel Workbench" ) -language.Add( "gms_platinumfurnace", "Platinum Furnace" ) -language.Add( "gms_platinumworkbench", "Platinum Workbench" ) -language.Add( "gms_factory", "Factory" ) -language.Add( "gms_fridge", "Fridge" ) -language.Add( "gms_pistolgunlab", "Pistol Gun Lab" ) -language.Add( "gms_smggunlab", "SMG Gun Lab" ) -language.Add( "gms_hightechgunlab", "High Tech Gun Lab" ) -language.Add( "gms_transmutator", "Transmutator" ) -language.Add( "gms_advancedtransmutator", "Advanced Transmutator" ) -language.Add( "gms_gunchunks", "Gun Chunks" ) -language.Add( "gms_resourcepack", "Resource Pack" ) -language.Add( "gms_grindingstone", "Grinding Stone" ) -language.Add( "gms_waterfountain", "Water Fountain" ) -language.Add( "gms_stove", "Stove" ) -language.Add( "gms_renbuyshop", "Ren Buy Shop" ) -language.Add( "gms_rensellshop", "Ren Sell Shop" ) -language.Add( "gms_obelisk", "Obelisk") -language.Add( "gms_mithrilfactory", "Mithril Factory") -language.Add( "gms_mithrilworkbench", "Mithril WorkBench" ) -language.Add( "gms_runealtar", "Rune Altar" ) -language.Add( "gms_runicinfuser", "Runic Infuser") - -/* The chat hints */ -HintsRus = { - "Держите Ваши реÑурÑÑ‹ в реÑÑƒÑ€Ñ Ð¿Ð°ÐºÐµ, чтобы их не украли ночью.", - "Рзнаете ли Ð’Ñ‹, что реÑурÑÑ‹ в меню реÑурÑов ( F2 ) нажимаемы мышью?", - "Храните Вашу еду в холодильнике, чтобы она не портилаÑÑŒ.", - "Чтобы Ð¿Ð»ÐµÐ¼Ñ Ð¼Ð¾Ð³Ð»Ð¾ иÑпользовать вещи друг друга, Ñто Ð¿Ð»ÐµÐ¼Ñ Ð´Ð¾Ð»Ð¶Ð½Ð¾ иметь пароль.", - "Чтобы иÑпользовать фонарь, Вам нужно его Ñделать.", - "Чем больше у Ð’Ð°Ñ Ð±Ð°Ñ‚Ð°Ñ€ÐµÐµÐº, тем больше у Ð’Ð°Ñ Ñнергии Ð´Ð»Ñ Ñ„Ð¾Ð½Ð°Ñ€Ñ.", - "Ð¨Ð°Ð½Ñ Ð¿Ð¾Ð¹Ð¼Ð°Ñ‚ÑŒ что-то без наживки ( Baits ) в 4 раза ниже, чем Ñ Ð½Ð°Ð¶Ð¸Ð²ÐºÐ¾Ð¹.", - "Чтобы добыть железо ( Iron ) или медь ( Copper ) вам нужна кирка.", - "Проблемы? Прочтите !help Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð±Ð°Ð·Ð¾Ð²Ð¾Ð¹ информации об Ñтом игровом режиме.", - "Чтобы приглаÑить игрока в племÑ, напишите !invite <Ð¸Ð¼Ñ Ð¸Ð³Ñ€Ð¾ÐºÐ°>" -} - -HintsEng = { - "Store your resources in resource pack, so they wont get stolen at night.", - "Did you know that resources in Resources menu ( F2 ) are clickable?", - "Keep your food in fridge, so it does not spoil.", - "In order to share items within a tribe, the tribe must have a password.", - "In order to use flashlight, you need to craft it.", - "The more batteries you have, the more flashlight power you have.", - "Chance to catch something without Baits is 4 times lower, then with Baits.", - "In order to get Iron or Copper you need a pickaxe.", - "Having trouble? Read !help to learn the basics of this gamemode.", - "In order to invite a player into a tribe, type !invite <player name>" -} - -timer.Create( "Client.HINTS", 360, 0, function() - if ( GetConVarString( "gmod_language" ) == "ru" ) then - chat.AddText( Color( 50, 255, 50 ), "[HINT] ", Color( 255, 255, 255 ), HintsRus[ math.random( 1, #HintsRus ) ] ) - else - chat.AddText( Color( 50, 255, 50 ), "[HINT] ", Color( 255, 255, 255 ), HintsEng[ math.random( 1, #HintsEng ) ] ) - end -end ) - -function GM.FindTribeByID( Tid ) - for id, tabl in pairs( Tribes ) do - if ( tabl.id == Tid ) then return tabl end - end - return false -end - -concommand.Add( "gms_resetcharacter_verify", function( ply, cmd, args ) - Derma_StringRequest( "Character Reset", "WARNING! This will reset all your skills and resources back to where you started.\nIf you are sure you want to do this, type 'I agree' into box below:", "", function( text ) - RunConsoleCommand( "gms_resetcharacter", text ) - end ) -end ) - -/* Resource pack GUI */ - -GM.ResourcePackFrame = nil - -concommand.Add( "gms_openrespackmenu", function( ply, cmd, args ) - local resPack = ply:GetEyeTrace().Entity - - if ( !IsValid( resPack ) ) then return end - - local frame = vgui.Create( "DFrame" ) - frame:SetSize( ScrW() / 1.5, ScrH() / 2 ) - frame:MakePopup() - frame:Center() - function frame:Update() - // Left side - for id, item in pairs( self.Resources:GetItems() ) do item:Remove() end - for res, num in SortedPairs( self.ResourcePack.Resources or {} ) do - local reso = vgui.Create( "gms_resourceLine" ) - if ( self.ResourcePack:GetClass() == "gms_fridge" ) then - reso:SetRes( res, num, false ) - else - reso:SetRes( res, num, true ) - end - self.Resources:AddItem( reso ) - end - - // Right side - if ( self.ResourcePack:GetClass() == "gms_fridge" || !IsValid( self.Inventory ) ) then return end - timer.Simple( 0, function() - if ( !IsValid( self.Inventory ) ) then return end - for id, item in pairs( self.Inventory:GetItems() ) do item:Remove() end - for res, num in SortedPairs( Resources or {} ) do - if ( num <= 0 ) then continue end - local reso = vgui.Create( "gms_resourceLineStore" ) - reso:SetRes( res, num ) - self.Inventory:AddItem( reso ) - end - end ) - end - - local panelList = vgui.Create( "DPanelList", frame ) - panelList:SetPos( 5, 30 ) - panelList:SetSpacing( 5 ) - panelList:SetPadding( 5 ) - panelList:EnableHorizontal( false ) - panelList:EnableVerticalScrollbar( true ) - function panelList:Paint( w, h ) - draw.RoundedBox( 2, 0, 0, w, h, Color( 80, 80, 80 ) ) - end - - if ( resPack:GetClass() == "gms_fridge" ) then - frame:SetSize( ScrW() / 2, ScrH() / 2 ) - frame:SetTitle( "Fridge" ) - frame:Center() - panelList:SetSize( frame:GetWide() - 10, frame:GetTall() - 35 ) - else - frame:SetTitle( "Resource pack" ) - panelList:SetSize( frame:GetWide() - 15 - ScrW() / 4, frame:GetTall() - 35 ) - end - - frame.Resources = panelList - frame.ResourcePack = resPack - - if ( resPack:GetClass() != "gms_fridge" ) then - local panelListInv = vgui.Create( "DPanelList", frame ) - panelListInv:SetPos( frame:GetWide() - 10 - ScrW() / 4 + 5, 30 ) - panelListInv:SetSize( ScrW() / 4, frame:GetTall() - 35 ) - panelListInv:SetSpacing( 5 ) - panelListInv:SetPadding( 5 ) - panelListInv:EnableHorizontal( false ) - panelListInv:EnableVerticalScrollbar( true ) - function panelListInv:Paint( w, h ) - draw.RoundedBox( 2, 0, 0, w, h, Color( 80, 128, 80 ) ) - end - frame.Inventory = panelListInv - end - - GAMEMODE.ResourcePackFrame = frame - frame:Update() -end ) - -hook.Add( "Think", "CampFireLight", function() - for id, e in pairs( ents.FindByClass("prop_p*") ) do - if ( !e:IsOnFire() ) then continue end - local campfire = DynamicLight( e:EntIndex() ) - if ( campfire ) then - campfire.Pos = e:GetPos() - campfire.r = math.random( 224, 255 ) - campfire.g = math.random( 128, 150 ) - campfire.b = 0 - campfire.Brightness = 2.4 - - if ( !e.campfireSize ) then - local min, max = e:OBBMins(), e:OBBMaxs() - local vol = math.abs( max.x - min.x ) * math.abs( max.y - min.y ) * math.abs( max.z - min.z ) - e.campfireSize = vol / 5 - end - - campfire.Size = e.campfireSize - campfire.Decay = 0 - campfire.DieTime = CurTime() + 0.25 - end - end -end ) - -/* ---------------------------------------------------------------------------------------------------- - Hooks ----------------------------------------------------------------------------------------------------- */ - -function GM:Initialize() - if ( !IsValid( self.SkillsHud ) ) then self.SkillsHud = vgui.Create( "gms_SkillsHud" ) end - if ( !IsValid( self.ResourcesHud ) ) then self.ResourcesHud = vgui.Create( "gms_ResourcesHud" ) end - if ( !IsValid( self.CommandsHud ) ) then self.CommandsHud = vgui.Create( "gms_CommandsHud" ) end - if ( !IsValid( self.LoadingBar ) ) then self.LoadingBar = vgui.Create( "gms_LoadingBar" ) self.LoadingBar:SetVisible( false ) end - if ( !IsValid( self.SavingBar ) ) then self.SavingBar = vgui.Create( "gms_SavingBar" ) self.SavingBar:SetVisible( false ) end -end - -/* ---------------------------------------------------------------------------------------------------- - Skills, Resources & Experience ----------------------------------------------------------------------------------------------------- */ - -usermessage.Hook( "gms_MakeProcessBar", function( um ) - CurrentProcess = um:ReadString() - ProcessStart = CurTime() - ProcessCompleteTime = um:ReadShort() - ProcessCancelAble = um:ReadBool() -end ) - -usermessage.Hook( "gms_ResetPlayer", function() - Tribes = {} - Skills = {} - Skills[ "Survival" ] = 0 - Resources = {} - Experience = {} - Experience[ "Survival" ] = 0 - FeatureUnlocks = {} - MaxResources = 25 - - GAMEMODE.ResourcesHud:RefreshResources() - GAMEMODE.SkillsHud:RefreshSkills() -end ) - -usermessage.Hook( "gms_StopProcessBar", function() - ProcessCompleteTime = false -end ) - -usermessage.Hook( "gms_MakeLoadingBar", function( um ) - GAMEMODE.LoadingBar:Show( um:ReadString() ) -end ) - -usermessage.Hook( "gms_StopLoadingBar", function( um ) - GAMEMODE.LoadingBar:Hide() -end ) - -usermessage.Hook( "gms_MakeSavingBar", function( um ) - GAMEMODE.SavingBar:Show( um:ReadString() ) -end ) - -usermessage.Hook( "gms_StopSavingBar", function( um ) - GAMEMODE.SavingBar:Hide() -end ) - -usermessage.Hook( "gms_SetSkill", function( um ) - Skills[ um:ReadString() ] = um:ReadShort() - MaxResources = 25 + ( GetSkill( "Survival" ) * 5 ) - GAMEMODE.SkillsHud:RefreshSkills() -end ) - -usermessage.Hook( "gms_SetXP", function( um ) - Experience[ um:ReadString() ] = um:ReadShort() -end ) - -usermessage.Hook( "gms_SetResource", function( um ) - local res = um:ReadString() - local amount = um:ReadShort() - - Resources[res] = amount - GAMEMODE.ResourcesHud:RefreshResources() -end ) - -usermessage.Hook( "gms_SetMaxResources", function( um ) - MaxResources = um:ReadShort() - GAMEMODE.ResourcesHud:RefreshResources() -end ) - -usermessage.Hook( "gms_OpenCombiMenu", function( um ) - if ( GAMEMODE.CombiMenu ) then GAMEMODE.CombiMenu:Remove() end - GAMEMODE.CombiMenu = vgui.Create( "GMS_CombinationWindow" ) - GAMEMODE.CombiMenu:SetTable( um:ReadString() ) -end ) - -function GM:PlayerBindPress( ply, bind, pressed ) - if ( string.find( bind, "gm_showhelp" ) ) then GAMEMODE.SkillsHud:ToggleExtend() end - if ( string.find( bind, "gm_showteam" ) ) then GAMEMODE.ResourcesHud:ToggleExtend() end -end - -/* ---------------------------------------------------------------------------------------------------- - Functions ----------------------------------------------------------------------------------------------------- */ - -function GetSkill( skill ) - return Skills[ skill ] or 0 -end - -function GetXP( skill ) - return Experience[ skill ] or 0 -end - -function GetResource( res ) - return Resources[ res ] or 0 -end - -function TraceFromEyes( dist ) - local trace = {} - trace.start = self:GetShootPos() - trace.endpos = trace.start + ( self:GetAimVector() * dist ) - trace.filter = self - - return util.TraceLine( trace ) -end - -/* ---------------------------------------------------------------------------------------------------- - Messages ----------------------------------------------------------------------------------------------------- */ - -GM.InfoMessages = {} -GM.InfoMessageLine = 0 - -usermessage.Hook( "gms_sendmessage", function( um ) - local text = um:ReadString() - local dur = um:ReadShort() - local col = um:ReadString() - local str = string.Explode( ",", col ) - local col = Color( tonumber( str[1] ), tonumber( str[2] ), tonumber( str[3] ), tonumber( str[4] ) ) - - for k,v in pairs( GAMEMODE.InfoMessages ) do - v.drawline = v.drawline + 1 - end - - local message = {} - message.Text = text - message.Col = col - message.Tab = 5 - message.drawline = 1 - - GAMEMODE.InfoMessages[#GAMEMODE.InfoMessages + 1] = message - GAMEMODE.InfoMessageLine = GAMEMODE.InfoMessageLine + 1 - - timer.Simple( dur, function() GAMEMODE.DropMessage( message ) end ) -end ) - -hook.Add( "HUDPaint", "gms_drawmessages", function() - for k,msg in pairs( GAMEMODE.InfoMessages ) do - local txt = msg.Text - local line = ScrH() / 2 + ( msg.drawline * 20 ) - local tab = msg.Tab - local col = msg.Col - draw.SimpleTextOutlined( txt, "ScoreboardText", tab, line, col, 0, 0, 0.5, Color( 100, 100, 100, 150 ) ) - - if ( msg.Fading ) then - msg.Tab = msg.Tab - ( msg.InitTab - msg.Tab - 0.05 ) - - if ( msg.Tab > ScrW() + 10 ) then - GAMEMODE.RemoveMessage( msg ) - end - end - end -end ) - -function GM.DropMessage( msg ) - msg.InitTab = msg.Tab - msg.Fading = true -end - -function GM.RemoveMessage( msg ) - for k, v in pairs( GAMEMODE.InfoMessages ) do - if ( v == msg ) then - GAMEMODE.InfoMessages[k] = nil - GAMEMODE.InfoMessageLine = GAMEMODE.InfoMessageLine - 1 - table.remove( GAMEMODE.InfoMessages, k ) - end - end -end - -/* ---------------------------------------------------------------------------------------------------- - Prop Fading ----------------------------------------------------------------------------------------------------- */ - -GM.FadingProps = {} - -usermessage.Hook( "gms_CreateFadingProp", function( um ) - local mdl = um:ReadString() - local pos = um:ReadVector() - local dir = um:ReadVector() - local col = um:ReadVector() - local speed = um:ReadShort() - - if ( !mdl or !pos or !dir or !speed ) then return end - - local ent = ents.CreateClientProp( mdl ) - ent:SetPos( pos ) - ent:SetColor( Color( col.x, col.y, col.z) ) - ent:SetAngles( Angle( dir.x, dir.y, dir.z ) ) - ent:Spawn() - - ent.Alpha = 255 - ent.Speed = speed - - table.insert( GAMEMODE.FadingProps, ent ) -end ) - -hook.Add( "Think", "gms_FadeFadingPropsHook", function() - for k, v in pairs( GAMEMODE.FadingProps ) do - if ( v.Alpha ) then - if ( v.Alpha <= 0 ) then - v:Remove() - table.remove( GAMEMODE.FadingProps, k ) - else - v.Alpha = v.Alpha - v.Speed - - v:SetRenderMode( RENDERMODE_TRANSALPHA ) - local oldColor = v:GetColor() - v:SetColor( Color( oldColor.r, oldColor.g, oldColor.b, math.min( math.max( v.Alpha, 0 ), 255 ) ) ) - end - end - end -end ) - -/* ---------------------------------------------------------------------------------------------------- - Achievement Messages ----------------------------------------------------------------------------------------------------- */ - -GM.AchievementMessages = {} - -usermessage.Hook( "gms_sendachievement", function( um ) - local tbl = {} - tbl.Text = um:ReadString() - tbl.Alpha = 255 - - table.insert( GAMEMODE.AchievementMessages, tbl ) -end ) - -hook.Add( "HUDPaint", "gms_drawachievementmessages", function() - for k, msg in pairs( GAMEMODE.AchievementMessages ) do - msg.Alpha = msg.Alpha - 1 - draw.SimpleTextOutlined( msg.Text, "ScoreboardHead", ScrW() / 2, ScrH() / 2, Color( 255, 255, 255, msg.Alpha ), 1, 1, 0.5, Color( 100, 100, 100, msg.Alpha ) ) - - if ( msg.Alpha <= 0 ) then - table.remove( GAMEMODE.AchievementMessages, k ) - end - end -end ) - -/* ---------------------------------------------------------------------------------------------------- - Needs ----------------------------------------------------------------------------------------------------- */ - -usermessage.Hook( "gms_setneeds", function( um ) - Sleepiness = um:ReadShort() - Hunger = um:ReadShort() - Thirst = um:ReadShort() - Oxygen = um:ReadShort() - Power = um:ReadShort() - Time = um:ReadShort() -end ) - -/* ---------------------------------------------------------------------------------------------------- - Help menu ----------------------------------------------------------------------------------------------------- */ - -concommand.Add( "gms_help", function() - if ( !LocalPlayer():GetNWBool( "AFK" ) ) then RunConsoleCommand( "gms_afk" ) end - - local HelpMenu = vgui.Create( "DFrame" ) - HelpMenu:MakePopup() - HelpMenu:SetSize( ScrW() - 100, ScrH() - 100 ) - HelpMenu:Center() - HelpMenu:SetTitle( "Garry's Mod Stranded Help" ) - function HelpMenu:OnClose() - if ( LocalPlayer():GetNWBool( "AFK" ) ) then RunConsoleCommand( "gms_afk" ) end - end - - HelpMenu.HTML = vgui.Create( "HTML", HelpMenu ) - HelpMenu.HTML:SetSize( HelpMenu:GetWide() - 10, HelpMenu:GetTall() - 30 ) - HelpMenu.HTML:SetPos( 5, 25 ) - HelpMenu.HTML:OpenURL( "http://steamcommunity.com/sharedfiles/filedetails/?id=135129872" ) - //HelpMenu.HTML:SetHTML( file.Read( "help/helpnew.htm", "GAME" ) ) -end ) - -/* ---------------------------------------------------------------------------------------------------- - Sleep ----------------------------------------------------------------------------------------------------- */ - -local SleepFade = 0 -hook.Add( "HUDPaint", "gms_sleepoverlay", function() - if ( LocalPlayer():GetNWBool( "Sleeping" ) ) then - SleepFade = math.min( SleepFade + 3, 254 ) - else - SleepFade = math.max( SleepFade - 6, 0 ) - end - - if ( SleepFade == 0 ) then return end - - surface.SetDrawColor( 0, 0, 0, SleepFade ) - surface.DrawRect( 0, 0, ScrW(), ScrH() ) - - draw.SimpleText( "Use the command \"!wakeup\" or press F4 to wake up.", "ScoreboardSub", ScrW() / 2, ScrH() / 1.5, Color( 255, 255, 255, SleepFade ), 1, 1 ) -end ) - -/* ---------------------------------------------------------------------------------------------------- - AFK ----------------------------------------------------------------------------------------------------- */ - -local AFKFade = 0 -hook.Add( "HUDPaint", "gms_afkoverlay", function() - if ( LocalPlayer():GetNWBool( "AFK" ) ) then - AFKFade = math.min( AFKFade + 3, 254 ) - else - AFKFade = math.max( AFKFade - 6, 0 ) - end - - if ( AFKFade == 0 ) then return end - - surface.SetDrawColor( 0, 0, 0, AFKFade ) - surface.DrawRect( 0, 0, ScrW(), ScrH() ) - - draw.SimpleText( "Use the command \"!afk\" or press F4 to stop being afk.", "ScoreboardSub", ScrW() / 2, ScrH() / 1.5, Color( 255, 255, 255, AFKFade ), 1, 1 ) -end ) - -/* ---------------------------------------------------------------------------------------------------- - Unlocks ----------------------------------------------------------------------------------------------------- */ - -usermessage.Hook( "gms_AddUnlock", function( um ) - local UnlockWindow = vgui.Create( "GMS_UnlockWindow" ) - UnlockWindow:SetMouseInputEnabled( true ) - UnlockWindow:SetUnlock( um:ReadString() ) -end ) - -/* ---------------------------------------------------------------------------------------------------- - Tribes ----------------------------------------------------------------------------------------------------- */ - -concommand.Add( "gms_tribemenu", function() - if ( !GAMEMODE.TribeMenu ) then - GAMEMODE.TribeMenu = vgui.Create( "GMS_TribeMenu" ) - GAMEMODE.TribeMenu:SetDeleteOnClose( false ) - GAMEMODE.TribeMenu:SetVisible( false ) - end - - GAMEMODE.TribeMenu:SetVisible( !GAMEMODE.TribeMenu:IsVisible() ) -end ) - -concommand.Add( "gms_tribes", function() - if ( #Tribes <= 0 ) then chat.AddText( Color( 255, 255, 255 ), "No tribes created so far. Why not create one?" ) return end - local TribesMenu = vgui.Create( "GMS_TribesList" ) -end ) - -usermessage.Hook( "gms_invite", function( data ) - local tn = data:ReadString() - local p = data:ReadString() - Derma_Query( "You are being invited to " .. tn .. ".\nChoose action below.", "Invitation", - "Join", function() RunConsoleCommand( "gms_join", tn, p ) end, - "Decline", function() RunConsoleCommand( "say", "I don't want to join " .. tn .. "." ) end - ) -end ) - -usermessage.Hook( "sendTribe", function( data ) - - local id = data:ReadShort() - local name = data:ReadString() - local color = data:ReadVector() - local hazpass = data:ReadBool() - - team.SetUp( id, name, Color( color.r, color.g, color.b ) ) - - table.insert( Tribes, { name = name, pass = hazpass, id = id, color = Color( color.r, color.g, color.b ) } ) - -end ) diff --git a/ftp_gmstranded/gamemode/cl_panels.lua b/ftp_gmstranded/gamemode/cl_panels.lua deleted file mode 100644 index 4a1f85d..0000000 --- a/ftp_gmstranded/gamemode/cl_panels.lua +++ /dev/null @@ -1,1160 +0,0 @@ - -surface.CreateFont( "DefaultBold", { - font = "Tahoma", - size = 16, - weight = 1000, - antialias = true, - additive = false -} ) - -surface.CreateFont( "GMSUnlockDescription", { - font = "Tahoma", - size = 14, - weight = 500, - antialias = true, - additive = false -} ) - -/*--------------------------------------------------------- - Unlock window ----------------------------------------------------------*/ - -local PANEL = {} - -function PANEL:Init() - self:SetTitle( "You have unlocked a new ability!" ) - self:MakePopup() - - self.Name = "Name" - self.Description = "" - - self:SetSize( ScrW() / 3, 250 ) - self:Center() - - self.DescWindow = vgui.Create( "DLabel", self ) - self.DescWindow:SetPos( 5, 100 ) - self.DescWindow:SetSize( self:GetWide() - 10, self:GetTall() - 140 ) - self.DescWindow:SetFont( "GMSUnlockDescription" ) - self.DescWindow:SetWrap( true ) - self.DescWindow:SetText( "" ) - - self.Okay = vgui.Create( "DButton", self ) - self.Okay:SetSize( self:GetWide() - 10, 30 ) - self.Okay:SetPos( 5, self:GetTall() - 35 ) - self.Okay:SetText( "Okay" ) - self.Okay.DoClick = function() self:Close() end -end - -function PANEL:PaintOver( w, h ) - draw.SimpleTextOutlined( self.Name, "ScoreboardHead", self:GetWide() / 2, 60, Color( 10, 200, 10 ), 1, 1, 0.5, Color( 100, 100, 100, 160 ) ) - //draw.SimpleText( self.Description, "GMSUnlockDescription", self:GetWide() / 2, 140, Color( 200, 200, 200 ), 1, 1 ) -end - -function PANEL:SetUnlock( text ) - local unlock = GMS.FeatureUnlocks[ text ] - if ( !unlock ) then return end - - self.Name = unlock.Name - self.Description = unlock.Description - self.DescWindow:SetText( unlock.Description ) -end - -vgui.Register( "GMS_UnlockWindow", PANEL, "DFrame" ) - -/*--------------------------------------------------------- - Tribe Menu ----------------------------------------------------------*/ - -local PANEL = {} - -function PANEL:Init() - self:SetTitle( "Create-A-Tribe" ) - self:SetSize( 275, 305 ) - self:MakePopup() - self:Center() - - local tnamelabel = vgui.Create( "DLabel", self ) - tnamelabel:SetPos( 5, 21 ) - tnamelabel:SetText( "Tribe name" ) - - local tname = vgui.Create( "DTextEntry", self ) - tname:SetSize( self:GetWide() - 10, 20 ) - tname:SetPos( 5, 40 ) - - local tpwlabel = vgui.Create( "DLabel", self ) - tpwlabel:SetPos( 5, 65 ) - tpwlabel:SetText( "Tribe password ( Optional )" ) - tpwlabel:SizeToContents() - - local tpw = vgui.Create( "DTextEntry", self ) - tpw:SetSize( self:GetWide() - 10, 20 ) - tpw:SetPos( 5, 80 ) - - local tcollabel = vgui.Create( "DLabel", self ) - tcollabel:SetPos( 5, 105 ) - tcollabel:SetText( "Tribe color" ) - - local tcolor = vgui.Create( "DColorMixer", self ) - tcolor:SetSize( self:GetWide() - 15, 150 ) - tcolor:SetPos( 5, 125 ) - - local button = vgui.Create( "DButton", self ) - button:SetSize( self:GetWide() - 10, 20 ) - button:SetPos( 5, 280 ) - button:SetText( "Create Tribe!" ) - button.DoClick = function() - RunConsoleCommand( "gms_createtribe", tname:GetValue(), tcolor:GetColor().r, tcolor:GetColor().g, tcolor:GetColor().b, tpw:GetValue() ) - self:SetVisible( false ) - end -end -vgui.Register( "GMS_TribeMenu", PANEL, "DFrame" ) - -/*--------------------------------------------------------- - Tribes List ----------------------------------------------------------*/ - -local PANEL = {} - -function PANEL:Init() - self:SetTitle( "Join-A-Tribe" ) - self:MakePopup() - - local width = ScrW() / 4 - - for id, tabl in pairs( Tribes ) do - surface.SetFont( "DefaultBold" ) - local w = surface.GetTextSize( tabl.name ) - width = math.max( width, w + 16 + 10 + 20 ) - end - - for id, tabl in pairs( Tribes ) do - - local button = vgui.Create( "GMS_TribeButton", self ) - button:SetSize( width - 16, 16 ) - button:SetPos( 8, 10 + id * 21 ) - button:SetInfo( tabl ) - - end - - self:SetSize( width, #Tribes * 21 + 35 ) - self:Center() -end - -vgui.Register( "GMS_TribesList", PANEL, "DFrame" ) - ----------------------------------------------------------------------------------------------------- - -local PANEL = {} - -function PANEL:Init() - self:SetText( "" ) - self.Tribe = {} -end - -function PANEL:Paint() - - surface.SetDrawColor( self.Tribe.color ) - surface.DrawRect( 0, 0, self:GetTall(), self:GetTall() ) - - surface.SetDrawColor( 0, 0, 0, 200 ) - if ( self.Hovered ) then surface.SetDrawColor( 255, 255, 255, 64 ) end - surface.DrawRect( self:GetTall(), 0, self:GetWide() - self:GetTall(), self:GetTall() ) - - surface.SetFont( "DefaultBold" ) - local w = surface.GetTextSize( self.Tribe.name ) - draw.SimpleText( self.Tribe.name, "DefaultBold", ( self:GetWide() - 16 ) / 2 + 16, 0, color_white , 1 ) - -end - -function PANEL:DoClick() - if ( self.Tribe.pass ) then - local name = self.Tribe.name - Derma_StringRequest( "Please enter password", "Please enter password for the tribe.", "", function( text ) RunConsoleCommand( "gms_join", name, text ) end ) - else - RunConsoleCommand( "gms_join", self.Tribe.name ) - end - self:GetParent():Close() -end - -function PANEL:SetInfo( tbl ) - self.Tribe = tbl -end - -vgui.Register( "GMS_TribeButton", PANEL, "DButton" ) - -/*--------------------------------------------------------- - Skills panel ----------------------------------------------------------*/ - -local PANEL = {} - -function PANEL:Init() - self:SetPos( 1, 0 ) - self:SetSize( ScrW() / 6, 34 ) - - self:SetVisible( true ) - - self.Extended = false - self.SkillLabels = {} - - self:RefreshSkills() -end - -function PANEL:Paint() - - surface.SetDrawColor( StrandedBackgroundColor ) - surface.DrawRect( 0, 0, self:GetWide(), self:GetTall() ) - - surface.SetDrawColor( StrandedBorderColor ) - surface.DrawLine( self:GetWide() - 1, 0, self:GetWide() - 1, self:GetTall() ) -- Nice line instead of messy outlined rect - surface.DrawLine( 0, self:GetTall() - 1, self:GetWide(), self:GetTall() - 1 ) - surface.DrawLine( 0, 0, 0, self:GetTall() ) - if ( self.Extended ) then - surface.DrawLine( 0, 33, self:GetWide(), 33 ) - end - - draw.SimpleText( "Skills ( F1 )", "ScoreboardSub", self:GetWide() / 2, 17, Color( 255, 255, 255, 255 ), 1, 1 ) - return true - -end - -function PANEL:RefreshSkills() - for k, v in pairs( self.SkillLabels ) do v:Remove() end - - self.SkillLabels = {} - self.Line = 39 - - for k, v in SortedPairs( Skills ) do - local lbl = vgui.Create( "gms_SkillPanel", self ) - lbl:SetPos( 0, self.Line ) - lbl:SetSize( self:GetWide(), 16 ) - local val = string.gsub( k, "_", " " ) - lbl:SetSkill( val ) - - self.Line = self.Line + lbl:GetTall() + 5 - table.insert( self.SkillLabels, lbl ) - if ( !self.Extended ) then lbl:SetVisible( false ) end - end - - if ( self.Extended ) then - self:SetSize( ScrW() / 6, 40 + ( table.Count( self.SkillLabels ) * 21 ) ) - end -end - -function PANEL:ToggleExtend() - if ( !self.Extended ) then - self:SetSize( ScrW() / 6, 40 + ( table.Count( self.SkillLabels ) * 21 ) ) - self.Extended = true - - for k, v in pairs( self.SkillLabels ) do v:SetVisible( true ) end - else - self:SetSize( ScrW() / 6, 34 ) - self.Extended = false - - for k, v in pairs( self.SkillLabels ) do v:SetVisible( false ) end - end -end - -function PANEL:OnMousePressed( mc ) - if ( mc == 107 ) then - self:ToggleExtend() - end -end - -vgui.Register( "gms_SkillsHud", PANEL, "Panel" ) - -/*--------------------------------------------------------- - Skill Sub-Panel ----------------------------------------------------------*/ - -local PANEL = {} - -function PANEL:Init() -end - -function PANEL:Paint() - surface.SetDrawColor( 0, 0, 0, 178 ) -- XP bar background - surface.DrawRect( 5, 0, self:GetWide() - 10, self:GetTall() ) - - local XP = math.floor( Experience[ self.Skill ] / 100 * ( self:GetWide() - 10 ) ) - surface.SetDrawColor( 0, 128, 0, 220 ) -- XP bar - if ( self.TxtSkill == "Survival" ) then - surface.SetDrawColor( 0, 128, 176, 220 ) -- XP bar - end - surface.DrawRect( 5, 0, XP, self:GetTall() ) - - draw.SimpleText( self.TxtSkill .. ": " .. Skills[ self.Skill ] .. " ( " .. Experience[ self.Skill ] .. " / 100 )", "DefaultBold", self:GetWide() / 2, self:GetTall() / 2 - 1, Color( 255, 255, 255, 255 ), 1, 1 ) - return true -end - -function PANEL:SetSkill( str ) - self.TxtSkill = str - self.Skill = string.gsub( str, " ", "_" ) -end - -vgui.Register( "gms_SkillPanel", PANEL, "Panel" ) - -/*--------------------------------------------------------- - Resource panel ----------------------------------------------------------*/ - -local PANEL = {} - -function PANEL:Init() - - self:SetPos( ScrW() / 6 + 2, 0 ) - self:SetSize( ScrW() / 6, 34 ) - self:SetVisible( true ) - self.Extended = false - self.ResourceLabels = {} - - self:RefreshResources() - -end - -function PANEL:Paint() - - surface.SetDrawColor( StrandedBackgroundColor ) - surface.DrawRect( 0, 0, self:GetWide(), self:GetTall() ) - - surface.SetDrawColor( StrandedBorderColor ) - surface.DrawLine( 0, 0, 0, self:GetTall() ) - surface.DrawLine( self:GetWide() - 1, 0, self:GetWide() - 1, self:GetTall() ) - surface.DrawLine( 0, self:GetTall() - 1, self:GetWide(), self:GetTall() - 1 ) - if ( self.Extended ) then - surface.DrawLine( 0, 33, self:GetWide(), 33 ) - end - - draw.SimpleText( "Resources ( F2 )", "ScoreboardSub", self:GetWide() / 2, 17, StrandedTextColor, 1, 1 ) - return true - -end - -function PANEL:RefreshResources() - if ( IsValid( GAMEMODE.ResourcePackFrame ) ) then GAMEMODE.ResourcePackFrame:Update() end - for k, v in pairs( self.ResourceLabels ) do v:Remove() end - - self.ResourceLabels = {} - self.Line = 39 - self.Resourcez = 0 - - for k, v in SortedPairs( Resources ) do - if ( v > 0 ) then - local lbl = vgui.Create( "gms_ResourcePanel", self ) - lbl:SetPos( 0, self.Line ) - lbl:SetSize( self:GetWide(), 16 ) - lbl:SetResource( k ) - self.Resourcez = self.Resourcez + v - - self.Line = self.Line + lbl:GetTall() + 5 - table.insert( self.ResourceLabels, lbl ) - if ( !self.Extended ) then lbl:SetVisible( false ) end - end - end - - self.Line = self.Line + 21 - - local lblT = vgui.Create( "gms_ResourcePanelTotal", self ) - lblT:SetPos( 0, self.Line ) - lblT:SetSize( self:GetWide(), 16 ) - lblT:SetResources( self.Resourcez ) - - table.insert( self.ResourceLabels, lblT ) - if ( !self.Extended ) then lblT:SetVisible( false ) end - - if ( self.Extended ) then - self:SetSize( ScrW() / 6, 40 + ( ( table.Count( self.ResourceLabels ) + 1 ) * 21 ) ) - end - - if ( GAMEMODE.CommandsHud ) then GAMEMODE.CommandsHud:SetPos( ScrW() / 6 + 2, self:GetTall() ) end -end - -function PANEL:ToggleExtend() - self:SetExtended( !self.Extended ) -end - -function PANEL:SetExtended( bool ) - if ( bool ) then - self:SetSize( ScrW() / 6, 40 + ( ( table.Count( self.ResourceLabels ) + 1 ) * 21 ) ) - self.Extended = true - for k,v in pairs( self.ResourceLabels ) do - v:SetVisible( true ) - end - else - self:SetSize( ScrW() / 6, 34 ) - self.Extended = false - for k, v in pairs( self.ResourceLabels ) do - v:SetVisible( false ) - end - end - if ( GAMEMODE.CommandsHud ) then GAMEMODE.CommandsHud:SetPos( ScrW() / 6 + 2, self:GetTall() ) end -end - -function PANEL:OnMousePressed( mc ) - if ( mc == 107 ) then self:ToggleExtend() end -end -vgui.Register( "gms_ResourcesHud", PANEL, "Panel" ) - -/*--------------------------------------------------------- - Resource Sub-Panel ----------------------------------------------------------*/ - -local PANEL = {} - -PANEL.GroundActions = {} -PANEL.GroundActions[ "Sprouts" ] = { cmd = "gms_planttree", name = "Plant" } -PANEL.GroundActions[ "Banana_Seeds" ] = { cmd = "gms_plantbanana", name = "Plant" } -PANEL.GroundActions[ "Orange_Seeds" ] = { cmd = "gms_plantorange", name = "Plant" } -PANEL.GroundActions[ "Grain_Seeds" ] = { cmd = "gms_plantgrain", name = "Plant" } -PANEL.GroundActions[ "Melon_Seeds" ] = { cmd = "gms_plantmelon", name = "Plant" } -PANEL.GroundActions[ "Berries" ] = { cmd = "gms_plantbush", name = "Plant" } - -PANEL.NormalActions = {} -PANEL.NormalActions[ "Berries" ] = { cmd = "gms_EatBerry", name = "Eat" } -PANEL.NormalActions[ "Medicine" ] = { cmd = "gms_TakeMedicine", name = "Take" } -PANEL.NormalActions[ "Water_Bottles" ] = { cmd = "gms_DrinkBottle", name = "Drink" } - -function PANEL:Init() - self:SetText( "" ) -end - -function PANEL:Paint() - surface.SetDrawColor( 0, 0, 0, 178 ) -- Resource bar background - surface.DrawRect( 5, 0, self:GetWide() - 10, self:GetTall() ) - - local XP = math.floor( Resources[ self.Resource ] / MaxResources * ( self:GetWide() - 10 ) ) - surface.SetDrawColor( 0, 128, 0, 200 ) -- Resource bar - surface.DrawRect( 5, 0, XP, self:GetTall() ) - - if ( self.Hovered ) then - surface.SetDrawColor( 255, 255, 255, 64 ) -- Resource bar background - surface.DrawRect( 5, 0, self:GetWide() - 10, self:GetTall() ) - end - - draw.SimpleText( self.TxtResource .. ": " .. Resources[ self.Resource ], "DefaultBold", self:GetWide() / 2, self:GetTall() / 2 - 1, Color( 255, 255, 255, 255 ), 1, 1 ) - return true -end - -function PANEL:DoRightClick() - local menu = DermaMenu() - - if ( self.GroundActions[ self.Resource ] ) then - menu:AddOption( self.GroundActions[ self.Resource ].name, function() - if ( self.GroundActions ) then - RunConsoleCommand( self.GroundActions[ self.Resource ].cmd ) - end - end ) - end - - if ( self.NormalActions[ self.Resource ] ) then - menu:AddOption( self.NormalActions[ self.Resource ].name, function() - if ( self.NormalActions ) then - RunConsoleCommand( self.NormalActions[ self.Resource ].cmd ) - end - end ) - end - - menu:AddSpacer() - - menu:AddOption( "Drop x1", function() RunConsoleCommand( "gms_DropResources", self.Resource, " 1" ) end ) - menu:AddOption( "Drop x10", function() RunConsoleCommand( "gms_DropResources", self.Resource, " 10" ) end ) - menu:AddOption( "Drop All", function() RunConsoleCommand( "gms_DropResources", self.Resource ) end ) - menu:AddOption( "Cancel", function() end ) - menu:Open() -end - -function PANEL:DoClick() - local tr = util.TraceLine( { - start = LocalPlayer():GetShootPos(), - endpos = LocalPlayer():GetShootPos() + LocalPlayer():GetAimVector() * 150, - filter = LocalPlayer() - } ) - - if ( self.GroundActions && self.GroundActions[ self.Resource ] && tr.HitWorld ) then - RunConsoleCommand( self.GroundActions[ self.Resource ].cmd ) - elseif ( self.NormalActions && self.NormalActions[ self.Resource ] ) then - RunConsoleCommand( self.NormalActions[ self.Resource ].cmd ) - end -end - -function PANEL:SetResource( str ) - self.TxtResource = string.gsub( str, "_", " " ) - self.Resource = str -end - -vgui.Register( "gms_ResourcePanel", PANEL, "DButton" ) - -/*--------------------------------------------------------- - Resource Total Sub-Panel ----------------------------------------------------------*/ -local PANEL = {} - -function PANEL:Init() - self.Res = 0 -end - -function PANEL:Paint() - surface.SetDrawColor( 0, 0, 0, 178 ) -- Resource bar background - surface.DrawRect( 5, 0, self:GetWide() - 10, self:GetTall() ) - - local XP = math.floor( self.Res / MaxResources * ( self:GetWide() - 10 ) ) - surface.SetDrawColor( 0, 128, 176, 220 ) -- Resource bar - surface.DrawRect( 5, 0, XP, self:GetTall() ) - - draw.SimpleText( "Total: " .. self.Res .. " / " .. MaxResources, "DefaultBold", self:GetWide() / 2, self:GetTall() / 2 - 1, Color( 255, 255, 255, 255 ), 1, 1 ) - return true -end - -function PANEL:SetResources( num ) - self.Res = num -end - -vgui.Register( "gms_ResourcePanelTotal", PANEL, "Panel" ) - -/*--------------------------------------------------------- - Command panel ----------------------------------------------------------*/ - -local PANEL = {} - -function PANEL:Init() - - self:SetPos( ScrW() / 6 + 2, 33 ) - self:SetSize( ScrW() / 6, 34 ) - self:SetVisible( false ) - self.Extended = true - self.CommandLabels = {} - - self:RefreshCommands() - -end - -function PANEL:Paint() - - surface.SetDrawColor( StrandedBackgroundColor ) - surface.DrawRect( 0, 0, self:GetWide(), self:GetTall() ) - - surface.SetDrawColor( StrandedBorderColor ) - - surface.DrawLine( self:GetWide() - 1, 0, self:GetWide() - 1, self:GetTall() ) - surface.DrawLine( 0, 0, 0, self:GetTall() ) - surface.DrawLine( 0, self:GetTall() - 1, self:GetWide(), self:GetTall() - 1 ) - if ( self.Extended ) then surface.DrawLine( 0, 33, self:GetWide(), 33 ) end - - draw.SimpleText( "Commands", "ScoreboardSub", self:GetWide() / 2, 17, Color( 255, 255, 255, 255 ), 1, 1 ) - return true - -end - -function PANEL:CreateButton( x, y, w, h, cmd, txt, clr ) - local line = vgui.Create( "gms_CommandPanel", self ) - line:SetPos( x, y ) - line:SetSize( w, h ) - line:SetCommand( cmd, txt, clr ) - - if ( !self.Extended ) then line:SetVisible( false ) end - table.insert( self.CommandLabels, line ) - - return line -end - -function PANEL:RefreshCommands() - for k, v in pairs( self.CommandLabels ) do v:Remove() end - - self.CommandLabels = {} - self.Line = 39 - self.Lines = 7 - - local halfsize = self:GetWide() / 2 - local threesize = self:GetWide() / 4 - - local line1 = self:CreateButton( 0, self.Line, halfsize, 16, "gms_sleep", "Sleep", Color( 0, 128, 255, 176 ) ) - local line1b = self:CreateButton( halfsize, self.Line, halfsize, 16, "gms_wakeup", "Wake up", Color( 0, 128, 255, 176 ) ) - - self.Line = self.Line + line1:GetTall() + 5 - - local line2 = self:CreateButton( 0, self.Line, halfsize, 16, "gms_combinations", "Combinations", Color( 200, 200, 0, 176 ) ) - local line2b = self:CreateButton( halfsize, self.Line, halfsize, 16, "gms_structures", "Structures", Color( 200, 200, 0, 176 ) ) - - self.Line = self.Line + line2:GetTall() + 5 - - local line3 = self:CreateButton( 0, self.Line, halfsize, 16, "gms_dropweapon", "Drop: Weapon", Color( 255, 0, 0, 176 ) ) - local line3b = self:CreateButton( halfsize, self.Line, halfsize, 16, "gms_dropall", "All resources", Color( 255, 0, 0, 176 ) ) - - self.Line = self.Line + line3:GetTall() + 5 - - local line4 = self:CreateButton( 0, self.Line, halfsize, 16, "gms_salvage", "Prop: Salvage", Color( 200, 0, 0, 176 ) ) - local line4b = self:CreateButton( halfsize, self.Line, halfsize, 16, "gms_steal", "Steal", Color( 200, 0, 0, 176 ) ) - - self.Line = self.Line + line4:GetTall() + 5 - - local line5 = self:CreateButton( 0, self.Line, halfsize, 16, "gms_savecharacter", "Save", Color( 0, 200, 0, 176 ) ) - local line5b = self:CreateButton( halfsize, self.Line, halfsize, 16, "gms_afk", "Toggle AFK", Color( 0, 200, 0, 176 ) ) - - self.Line = self.Line + line5:GetTall() + 5 - - local line6 = self:CreateButton( 0, self.Line, halfsize, 16, "gms_makefire", "Make Campfire", Color( 255, 128, 0, 176 ) ) - local line6b = self:CreateButton( halfsize, self.Line, halfsize, 16, "gms_help", "Help", Color( 255, 128, 0, 176 ) ) - - self.Line = self.Line + line6:GetTall() + 5 - - local line7a = self:CreateButton( 0, self.Line, halfsize, 16, "gms_tribemenu", "Tribe: Create", Color( 200, 0, 200, 176 ) ) - local line7b = self:CreateButton( halfsize, self.Line, threesize, 16, "gms_tribes", "Join", Color( 200, 0, 200, 176 ) ) - local line7c = self:CreateButton( halfsize + threesize, self.Line, threesize, 16, "gms_leave", "Leave", Color( 200, 0, 200, 176 ) ) - - if ( self.Extended ) then - self:SetSize( ScrW() / 6, 40 + ( self.Lines * 21 ) ) - end -end - -function PANEL:ToggleExtend( b ) - //self:SetExtended( !self.Extended, b ) -end - -function PANEL:SetExtended( bool ,b ) - if ( bool ) then - self:SetSize( ScrW() / 6, 40 + ( self.Lines * 21 ) ) - self.Extended = true - self:SetVisible( true ) - for k,v in pairs( self.CommandLabels ) do v:SetVisible( true ) end - else - self:SetSize( ScrW() / 6, 34 ) - self.Extended = false - self:SetVisible( false ) - for k, v in pairs( self.CommandLabels ) do v:SetVisible( false ) end - end -end - -vgui.Register( "gms_CommandsHud", PANEL, "Panel" ) - -/*--------------------------------------------------------- - Command Sub-Panel ----------------------------------------------------------*/ - -local PANEL = {} - -function PANEL:Init() - self:SetText( "" ) - self.Cmd = "" - self.Text = "" - self.Clr = Color( 0, 128, 0, 178 ) -end - -function PANEL:Paint() - surface.SetDrawColor( self.Clr.r, self.Clr.g, self.Clr.b, self.Clr.a ) -- Resource bar background - surface.DrawRect( 5, 0, self:GetWide() - 10, self:GetTall() ) - - local colr = Color( 255, 255, 255, 255 ) - if ( self.Clr.r >= 200 and self.Clr.g >= 200 and self.Clr.b >= 200 ) then colr = Color( 0, 0, 0, 255 ) end - - draw.SimpleText( self.Text, "DefaultBold", self:GetWide() / 2, self:GetTall() / 2 - 1, colr, 1, 1 ) - - if ( self.Hovered ) then - surface.SetDrawColor( 255, 255, 255, 64 ) - surface.DrawRect( 5, 0, self:GetWide() - 10, self:GetTall() ) - end - - return true -end - -function PANEL:DoClick() - RunConsoleCommand( self.Cmd ) -end - -function PANEL:SetCommand( str, text, clr ) - self.Cmd = str - self.Text = text - self.Clr = clr -end - -vgui.Register( "gms_CommandPanel", PANEL, "DButton" ) - -/*--------------------------------------------------------- - Loading bar ----------------------------------------------------------*/ - -local PANEL = {} - -function PANEL:Init() - self:SetSize( ScrW() / 2.7, ScrH() / 10 ) - self:SetPos( ScrW() / 2 - ( self:GetWide() / 2 ), ScrH() / 2 - ( self:GetTall() / 2 ) ) - - self.Dots = "." - self.Message = "" -end - -function PANEL:Paint() - draw.RoundedBox( 8, 0, 0, self:GetWide(), self:GetTall(), Color( 100, 100, 100, 150 ) ) //Background - - //Text - draw.SimpleText( "Loading" .. self.Dots, "ScoreboardHead", self:GetWide() / 2, self:GetTall() / 2, Color( 255, 255, 255, 255 ), 1, 1 ) - draw.SimpleText( self.Text, "ScoreboardText", self:GetWide() / 2, self:GetTall() / 1.2, Color( 255, 255, 255, 255 ), 1, 1 ) - return true -end - -function PANEL:Show( msg ) - self.IsStopped = false - - self.Text = msg - timer.Simple( 0.5, function() self:UpdateDots() end ) - self:SetVisible( true ) -end - -function PANEL:Hide() - self.IsStopped = true - self:SetVisible( false ) -end - -function PANEL:UpdateDots() - if ( self.IsStopped ) then return end - - if self.Dots == "...." then - self.Dots = "." - else - self.Dots = self.Dots .. "." - end - - timer.Simple( 0.5, function() self:UpdateDots() end ) -end - -vgui.Register( "gms_LoadingBar", PANEL, "Panel" ) - -/*--------------------------------------------------------- - Saving bar ----------------------------------------------------------*/ - -local PANEL = {} - -function PANEL:Init() - self:SetSize( ScrW() / 2.7, ScrH() / 10 ) - self:SetPos( ScrW() / 2 - ( self:GetWide() / 2 ), ScrH() / 2 - ( self:GetTall() / 2 ) ) - - self.Dots = "." - self.Message = "" -end - -function PANEL:Paint() - //Background - draw.RoundedBox( 8, 0, 0, self:GetWide(), self:GetTall(), Color( 100, 100, 100, 150 ) ) - - //Text - draw.SimpleText( "Saving" .. self.Dots, "ScoreboardHead", self:GetWide() / 2, self:GetTall() / 2, Color( 255, 255, 255, 255 ), 1, 1 ) - draw.SimpleText( self.Text, "ScoreboardText", self:GetWide() / 2, self:GetTall() / 1.2, Color( 255, 255, 255, 255 ), 1, 1 ) - return true -end - -function PANEL:Show( msg ) - self.IsStopped = false - - self.Text = msg - timer.Simple( 0.5, function() self:UpdateDots() end ) - self:SetVisible( true ) -end - -function PANEL:Hide() - self.IsStopped = true - self:SetVisible( false ) -end - -function PANEL:UpdateDots() - if ( self.IsStopped ) then return end - - if ( self.Dots == "...." ) then - self.Dots = "." - else - self.Dots = self.Dots .. "." - end - - timer.Simple( 0.5, function() self:UpdateDots() end ) -end - -vgui.Register( "gms_SavingBar", PANEL, "Panel" ) - -/*--------------------------------------------------------- - Command button ----------------------------------------------------------*/ -local PANEL = {} - -function PANEL:Init() -end - -function PANEL:DoClick() - LocalPlayer():ConCommand( self.Command .. "\n" ) - surface.PlaySound( Sound( "ui/buttonclickrelease.wav" ) ) -end - -function PANEL:SetConCommand( cmd ) - self.Command = cmd -end - -function PANEL:OnCursorEntered() - surface.PlaySound( Sound( "ui/buttonrollover.wav" ) ) -end - -vgui.Register( "gms_CommandButton", PANEL, "DButton" ) - -/*--------------------------------------------------------- - Combination Window ----------------------------------------------------------*/ - -local PANEL = {} - -function PANEL:Init() - self:SetSize( ScrW() / 1.3, ScrH() / 1.4 ) - self:SetDeleteOnClose( false ) - self:MakePopup() - self:Center() - - self.CombiList = vgui.Create( "DPanelList", self ) - self.CombiList:SetPos( 5, 25 ) - self.CombiList:SetSize( self:GetWide() - 10, self:GetTall() * 0.55 ) - self.CombiList:SetSpacing( 5 ) - self.CombiList:SetPadding( 5 ) - self.CombiList:EnableHorizontal( true ) - self.CombiList:EnableVerticalScrollbar( true ) - - self.Info = vgui.Create( "DPanel", self ) - self.Info:SetPos( 5, self.CombiList:GetTall() + 30 ) - self.Info:SetSize( self:GetWide() - 10, self:GetTall() - self.CombiList:GetTall() - 70 ) - - self.Info.NameLabel = vgui.Create( "DLabel", self.Info ) - self.Info.NameLabel:SetPos( 5, 5 ) - self.Info.NameLabel:SetSize( self.Info:GetWide(), 20 ) - self.Info.NameLabel:SetFont( "ScoreboardSub" ) - self.Info.NameLabel:SetDark( true ) - self.Info.NameLabel:SetText( "Select a recipe" ) - - self.Info.DescLabel = vgui.Create( "DLabel", self.Info ) - self.Info.DescLabel:SetPos( 5, 25 ) - self.Info.DescLabel:SetSize( self.Info:GetWide(), self.Info:GetTall() - 30 ) - self.Info.DescLabel:SetDark( true ) - self.Info.DescLabel:SetText( "" ) - - self.button = vgui.Create( "gms_CommandButton", self ) - self.button:SetPos( 5, self:GetTall() - 35 ) - self.button:SetSize( self:GetWide() - 10, 30 ) - self.button:SetText( "Make" ) - self.button:SetDisabled( true ) - function self.button:DoClick() - local p = self:GetParent() - local combi = p.CombiGroupName or "" - local active = p.ActiveCombi or "" - p:Close() - print("Doing") - print("gms_MakeCombination " .. combi .. " " .. active .. "\n") - LocalPlayer():ConCommand( "gms_MakeCombination " .. combi .. " " .. active .. "\n" ) - end - - self.IconSize = 86 - self.CombiPanels = {} -end - -function PANEL:SetTable( str ) - self:SetTitle( "#" .. str ) - self.CombiGroupName = str - self.CombiGroup = GMS.Combinations[ str ] - self:Clear() - for name, tbl in SortedPairs( self.CombiGroup or {} ) do - local icon = vgui.Create( "GMS_CombiIcon", self.CombiList ) - icon:SetSize( self.IconSize, self.IconSize ) - icon:SetInfo( name, tbl ) - self.CombiList:AddItem( icon ) - table.insert( self.CombiPanels, icon ) - end - self:ClearActive() -end - -function PANEL:SetActive( combi, tbl ) - self.ActiveCombi = combi - self.ActiveTable = tbl - self.Info.NameLabel:SetText( tbl.Name ) - - local desc = tbl.Description - - if ( tbl.Req or tbl.SkillReq ) then - desc = desc .. "\n\nYou need:" - end - - if ( tbl.Req and table.Count( tbl.Req ) > 0 ) then - for res, num in pairs( tbl.Req ) do - if ( tbl.AllSmelt ) then - desc = desc .. "\n" .. string.Replace( res, "_", " " ) .. " ( " .. tbl.Max .. " max )" - else - desc = desc .. "\n" .. string.Replace( res, "_", " " ) .. ": " .. num - end - end - end - - if ( tbl.SkillReq and table.Count( tbl.SkillReq ) > 0 ) then - for skill, num in pairs( tbl.SkillReq ) do - desc = desc .. "\n" .. string.Replace( skill, "_", " " ) .. " level " .. num - end - end - - if ( tbl.FoodValue ) then - desc = desc .. "\n\nFood initial quality: " .. math.floor( tbl.FoodValue / 10 ) .. "%" - end - - self.Info.DescLabel:SetText( desc ) -end - -function PANEL:ClearActive() - self.ActiveCombi = nil - self.ActiveTable = nil - self.Info.NameLabel:SetText( "Select a recipe" ) - self.Info.DescLabel:SetText( "" ) -end - -function PANEL:Clear() - for k, v in pairs( self.CombiPanels ) do - v:Remove() - end - self.CombiPanels = {} -end -vgui.Register( "GMS_CombinationWindow", PANEL, "DFrame" ) - -/*--------------------------------------------------------- - Combi Icon ----------------------------------------------------------*/ - -local PANEL = {} -PANEL.TexID = Material( "gms_icons/gms_none.png" ) -PANEL.BGTexID = Material( "gms_icons/gms_none_bg.png" ) - -function PANEL:Paint( w, h ) - - surface.SetDrawColor( 200, 200, 200, 255 ) - //surface.DrawRect( 0, 0, self:GetWide(), self:GetTall() )*/ - - surface.SetMaterial( self.BGTexID ) - surface.DrawTexturedRect( -( 128 - w ) / 2, -( 128 - h ) / 2, 128, 128 ) - - surface.SetDrawColor( StrandedBorderColor ) - surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() ) - - local hasskill = true - if ( self.CombiTable.SkillReq ) then - for k, v in pairs( self.CombiTable.SkillReq ) do - if ( GetSkill( k ) < v ) then hasskill = false end - end - end - - local hasres = true - if ( self.CombiTable.Req ) then - for k, v in pairs( self.CombiTable.Req ) do - if ( GetResource( k ) < v ) then hasres = false end - end - end - - if ( !hasskill ) then - surface.SetDrawColor( 200, 200, 0, 150 ) - surface.DrawRect( 0, 0, self:GetWide(), self:GetTall() ) - elseif ( !hasres ) then - surface.SetDrawColor( 200, 0, 0, 100 ) - surface.DrawRect( 0, 0, self:GetWide(), self:GetTall() ) - end - - surface.SetDrawColor( 255, 255, 255, 255 ) - - surface.SetMaterial( self.TexID ) - surface.DrawTexturedRect( -( 128 - w ) / 2, -( 128 - h ) / 2, 128, 128 ) - - local y = self:GetTall() / 2 + self:GetTall() / 4 - draw.SimpleTextOutlined( self.CombiTable.Name, "DefaultSmall", self:GetWide() / 2, y, Color( 255, 255, 255, 255 ), 1, 1, 0.5, Color( 100, 100, 100, 140 ) ) - return true - -end - -function PANEL:SetInfo( name, tbl ) - if ( tbl.Texture && Material( tbl.Texture ) ) then self.TexID = Material( tbl.Texture ) end - self.Combi = name - self.CombiTable = tbl -end - -function PANEL:OnMousePressed( mc ) - if ( mc != 107 ) then return end - surface.PlaySound( Sound( "ui/buttonclickrelease.wav" ) ) - self:GetParent():GetParent():GetParent():SetActive( self.Combi, self.CombiTable ) - self:GetParent():GetParent():GetParent().button:SetDisabled( false ) -end - -function PANEL:OnCursorEntered() - surface.PlaySound( Sound( "ui/buttonrollover.wav" ) ) -end - -vgui.Register( "GMS_CombiIcon", PANEL, "DPanel" ) - -/* Resource Pack GUI */ - -local PANEL = {} - -function PANEL:Init() - self.Text = "" - self.Num = 0 - - self.TakeX = vgui.Create( "gms_takeButton", self ) - self.TakeAll = vgui.Create( "gms_takeButton", self ) -end - -function PANEL:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 176, 176, 176, 255 ) ) - draw.SimpleText( self.Text .. ": " .. self.Num, "DefaultBold", 5, self:GetTall() / 2 - 1, Color( 255, 255, 255, 255 ), 0, 1 ) -end - -function PANEL:SetRes( str, num, isResPack ) - self.Text = str - self.Num = num - - if ( isResPack ) then - self.TakeX:SetRes( str, nil, false ) - self.TakeAll:SetRes( str, num, true, false ) - else - self.TakeX:Remove() - self.TakeX = nil - self.TakeAll:SetRes( str, 1, true, true ) - end -end - -function PANEL:PerformLayout() - self.TakeAll:SetSize( 64, self:GetTall() - 4 ) - self.TakeAll:SetPos( self:GetWide() - 66, 2 ) - - if ( self.TakeX and self.TakeX != NULL ) then - self.TakeX:SetSize( 64, self:GetTall() - 4 ) - self.TakeX:SetPos( self:GetWide() - 132, 2 ) - end -end - -vgui.Register( "gms_resourceLine", PANEL, "Panel" ) - -// Take button -local PANEL = {} - -function PANEL:Init() - self.Text = "" - self.Num = 0 - self.IsAll = false - self.IsFridge = false - self:SetText( "" ) -end - -function PANEL:Paint() - if ( self:GetDisabled() ) then - draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 50, 50, 50, 255 ) ) - elseif ( self.Depressed /*|| self:GetSelected()*/ ) then - draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 50, 50, 176, 255 ) ) - elseif ( self.Hovered ) then - draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 100, 100, 255, 255 ) ) - else - draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 100, 100, 100, 255 ) ) - end - - if ( self.IsFridge ) then - draw.SimpleText( "Take", "DefaultBold", self:GetWide() / 2, self:GetTall() / 2 - 1, Color( 255, 255, 255, 255 ), 1, 1 ) - elseif ( self.IsAll ) then - draw.SimpleText( "Take All", "DefaultBold", self:GetWide() / 2, self:GetTall() / 2 - 1, Color( 255, 255, 255, 255 ), 1, 1 ) - else - draw.SimpleText( "Take X", "DefaultBold", self:GetWide() / 2, self:GetTall() / 2 - 1, Color( 255, 255, 255, 255 ), 1, 1 ) - end -end - -function PANEL:DoClick() - if ( self.IsAll ) then - RunConsoleCommand( "gms_TakeResources", string.gsub( self.Text, " ", "_" ), self.Num ) - if ( self.IsFridge ) then self:GetParent():GetParent():GetParent():GetParent():Close() return end - else - local res = self.Text - Derma_StringRequest( "Please enter amount", "Please enter amount of " .. res .. " to take.", "", function( text ) - RunConsoleCommand( "gms_TakeResources", string.gsub( res, " ", "_" ), text ) - end ) - end -end - -function PANEL:SetRes( str, num, isAll, isFridge ) - self.Text = str - self.Num = num - self.IsAll = isAll - self.IsFridge = isFridge -end - -vgui.Register( "gms_takeButton", PANEL, "DButton" ) - -// Store Line -local PANEL = {} - -function PANEL:Init() - self.Text = "" - self.Num = 0 - - self.StoreX = vgui.Create( "gms_StoreButton", self ) - self.StoreAll = vgui.Create( "gms_StoreButton", self ) -end - -function PANEL:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 176, 176, 176, 255 ) ) - draw.SimpleText( string.Replace( self.Text, "_", " " ) .. ": " .. self.Num, "DefaultBold", 5, self:GetTall() / 2 - 1, Color( 255, 255, 255, 255 ), 0, 1 ) -end - -function PANEL:SetRes( str, num ) - self.Text = str - self.Num = num - - self.StoreX:SetRes( str, nil ) - self.StoreAll:SetRes( str, num, true ) -end - -function PANEL:PerformLayout() - self.StoreAll:SetSize( 64, self:GetTall() - 4 ) - self.StoreAll:SetPos( self:GetWide() - 66, 2 ) - - self.StoreX:SetSize( 64, self:GetTall() - 4 ) - self.StoreX:SetPos( self:GetWide() - 132, 2 ) -end - -vgui.Register( "gms_resourceLineStore", PANEL, "Panel" ) - -// Store button -local PANEL = {} - -function PANEL:Init() - self.Text = "" - self.Num = 0 - self.IsAll = false - self:SetText( "" ) -end - -function PANEL:Paint() - if ( self:GetDisabled() ) then - draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 50, 50, 50, 255 ) ) - elseif ( self.Depressed /*|| self:GetSelected()*/ ) then - draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 50, 50, 176, 255 ) ) - elseif ( self.Hovered ) then - draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 100, 100, 255, 255 ) ) - else - draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 100, 100, 100, 255 ) ) - end - - if ( self.IsAll ) then - draw.SimpleText( "Store All", "DefaultBold", self:GetWide() / 2, self:GetTall() / 2 - 1, Color( 255, 255, 255, 255 ), 1, 1 ) - else - draw.SimpleText( "Store X", "DefaultBold", self:GetWide() / 2, self:GetTall() / 2 - 1, Color( 255, 255, 255, 255 ), 1, 1 ) - end -end - -function PANEL:DoClick() - if ( self.IsAll ) then - RunConsoleCommand( "gms_DropResources", string.gsub( self.Text, " ", "_" ), self.Num ) - else - local res = self.Text - Derma_StringRequest( "Please enter amount", "Please enter amount of " .. res .. " to store.", "", function( text ) - RunConsoleCommand( "gms_DropResources", string.gsub( res, " ", "_" ), text ) - end ) - end -end -function PANEL:SetRes( str, num, isAll ) - self.Text = str - self.Num = num - self.IsAll = isAll -end - -vgui.Register( "gms_StoreButton", PANEL, "DButton" ) diff --git a/ftp_gmstranded/gamemode/cl_qmenu.lua b/ftp_gmstranded/gamemode/cl_qmenu.lua deleted file mode 100644 index 2a6d248..0000000 --- a/ftp_gmstranded/gamemode/cl_qmenu.lua +++ /dev/null @@ -1,989 +0,0 @@ - -/* ToolMenuButton */ -local PANEL = {} - -AccessorFunc( PANEL, "m_bAlt", "Alt" ) -AccessorFunc( PANEL, "m_bSelected", "Selected" ) - -function PANEL:Init() - self:SetContentAlignment( 4 ) - self:SetTextInset( 5, 0 ) - self:SetTall( 15 ) -end - -function PANEL:Paint() - if ( !self.m_bSelected ) then - if ( !self.m_bAlt ) then - surface.SetDrawColor( Color( 255, 255, 255, 200 ) ) - else - surface.SetDrawColor( Color( 255, 255, 255, 150 ) ) - end - else - surface.SetDrawColor( Color( 50, 150, 255, 250 ) ) - end - - self:DrawFilledRect() -end - -function PANEL:OnMousePressed( mcode ) - if ( mcode == MOUSE_LEFT ) then - self:OnSelect() - end -end - -function PANEL:OnCursorMoved( x, y ) - if ( input.IsMouseDown( MOUSE_LEFT ) ) then - self:OnSelect() - end -end - -function PANEL:OnSelect() -end - -function PANEL:PerformLayout() - if ( self.Checkbox ) then - self.Checkbox:AlignRight( 4 ) - self.Checkbox:CenterVertical() - end -end - -function PANEL:AddCheckBox( strConVar ) - if ( !self.Checkbox ) then - self.Checkbox = vgui.Create( "DCheckBox", self ) - end - - self.Checkbox:SetConVar( strConVar ) - self:InvalidateLayout() -end - -vgui.Register( "ToolMenuButton", PANEL, "DButton" ) - -/* DPropSpawnMenu */ -local PANEL = {} - -function PANEL:Init() - self:SetSpacing( 5 ) - self:SetPadding( 5 ) - self:EnableHorizontal( false ) - self:EnableVerticalScrollbar( true ) - function self:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) ) - end - - for k, v in SortedPairs( GMS_SpawnLists ) do - local cat = vgui.Create( "DCollapsibleCategory", self ) - cat:SetExpanded( 0 ) - cat:SetLabel( k ) - - local IconList = vgui.Create( "DPanelList", cat ) - IconList:EnableVerticalScrollbar( true ) - IconList:EnableHorizontal( true ) - IconList:SetAutoSize( true ) - IconList:SetSpacing( 5 ) - IconList:SetPadding( 5 ) - - cat:SetContents( IconList ) - self:AddItem( cat ) - - for key, value in pairs( v ) do - local Icon = vgui.Create( "SpawnIcon", IconList ) - Icon:SetModel( value ) - Icon.DoClick = function( Icon ) RunConsoleCommand( "gm_spawn", value, 0 ) end - --Icon:SetIconSize( 64 ) - Icon:InvalidateLayout( true ) - Icon:SetToolTip( Format( "%s", value ) ) - IconList:AddItem( Icon ) - end - end -end - -vgui.Register( "stranded_propspawn", PANEL, "DPanelList" ) - -/* DToolMenu */ -local PANEL = {} - -function PANEL:Init() - self.Tools = vgui.Create( "DPanelList", self ) - self.Tools:EnableVerticalScrollbar( true ) - self.Tools:SetAutoSize( false ) - self.Tools:SetSpacing( 5 ) - self.Tools:SetPadding( 5 ) - function self.Tools:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) ) - end - - self.ContextPanel = vgui.Create( "DPanelList", self ) - self.ContextPanel:EnableVerticalScrollbar( false ) - self.ContextPanel:SetSpacing( 0 ) - self.ContextPanel:SetPadding( 5 ) - function self.ContextPanel:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 255, 255, 255, 150 ) ) - end - - if ( ToolsLoad == false || ToolsLoad == nil || ToolsLoad == NULL || ToolsLoad == "" ) then - AllTools = spawnmenu.GetTools() - local ToolsLoad = true - end - - local ToolTables = AllTools - - if ( !ToolTables ) then LocalPlayer():ChatPrint( "ERROR: Tools List could not be loaded." ) return end - - for k, v in pairs( ToolTables[1].Items ) do - if ( type( v ) == "table" ) then - local Name = v.ItemName - local Label = v.Text - v.ItemName = nil - v.Text = nil - self:AddCategory( Name, Label, v ) - end - end -end - -function PANEL:AddCategory( Name, Label, ToolItems ) - self.Category = vgui.Create( "DCollapsibleCategory" ) - self.Tools:AddItem( self.Category ) - self.Category:SetLabel( Label ) - self.Category:SetCookieName( "ToolMenu." .. tostring( Name ) ) - - self.CategoryContent = vgui.Create( "DPanelList" ) - self.CategoryContent:SetAutoSize( true ) - self.CategoryContent:SetDrawBackground( false ) - self.CategoryContent:SetSpacing( 0 ) - self.CategoryContent:SetPadding( 0 ) - self.Category:SetContents( self.CategoryContent ) - - local bAlt = true - local NumTools = 0 - - for k, v in pairs( ToolItems ) do - if ( table.HasValue( GMS.ProhibitedStools, v.ItemName ) && !LocalPlayer():IsAdmin() ) then continue end - NumTools = NumTools + 1 - - local Item = vgui.Create( "ToolMenuButton", self ) - Item:SetText( v.Text ) - Item.OnSelect = function( button ) self:EnableControlPanel( button ) end - concommand.Add( Format( "tool_%s", v.ItemName ), function() Item:OnSelect() end ) - - if ( v.SwitchConVar ) then - Item:AddCheckBox( v.SwitchConVar ) - end - - Item.ControlPanelBuildFunction = v.CPanelFunction - Item.Command = v.Command - Item.Name = v.ItemName - Item.Controls = v.Controls - Item.Text = v.Text - - Item:SetAlt( bAlt ) - bAlt = !bAlt - - self.CategoryContent:AddItem( Item ) - end - - if ( NumTools <= 0 ) then - self.Category:Remove() - self.CategoryContent:Remove() - end -end - -function PANEL:EnableControlPanel( button ) - if ( self.LastSelected ) then - self.LastSelected:SetSelected( false ) - end - - button:SetSelected( true ) - self.LastSelected = button - - local cp = controlpanel.Get( button.Name ) - if ( !cp:GetInitialized() ) then - cp:FillViaTable( button ) - end - - self.ContextPanel:Clear() - self.ContextPanel:AddItem( cp ) - self.ContextPanel:Rebuild() - - g_ActiveControlPanel = cp - - if ( button.Command ) then - LocalPlayer():ConCommand( button.Command ) - end -end - -function PANEL:Paint() -end - -function PANEL:PerformLayout() - self:StretchToParent( 0, 21, 0, 5 ) - self.Tools:SetPos( 5, 5 ) - self.Tools:SetSize( self:GetWide() * 0.35, self:GetTall() - 5 ) - self.ContextPanel:SetPos( self:GetWide() * 0.35 + 10, 5 ) - self.ContextPanel:SetSize( self:GetWide() - ( self:GetWide() * 0.35 ) - 14, self:GetTall() - 5 ) -end - -vgui.Register( "stranded_toolmenu", PANEL, "DPanel" ) - -/* DCommandsMenu */ -local PANEL = {} - -PANEL.SmallButs = {} -PANEL.SmallButs["Sleep"] = "gms_sleep" -PANEL.SmallButs["Wake up"] = "gms_wakeup" -PANEL.SmallButs["Drop weapon"] = "gms_dropweapon" -PANEL.SmallButs["Steal"] = "gms_steal" -PANEL.SmallButs["Make campfire"] = "gms_makefire" -PANEL.SmallButs["Drink bottle of water"] = "gms_drinkbottle" -PANEL.SmallButs["Take medicine"] = "gms_takemedicine" -PANEL.SmallButs["Combinations"] = "gms_combinations" -PANEL.SmallButs["Structures"] = "gms_structures" -PANEL.SmallButs["Help"] = "gms_help" -PANEL.SmallButs["Drop all resources"] = "gms_dropall" -PANEL.SmallButs["Salvage prop"] = "gms_salvage" -PANEL.SmallButs["Eat some berries"] = "gms_eatberry" -PANEL.SmallButs["RESET CHARACTER"] = "gms_resetcharacter" - -PANEL.BigButs = {} -PANEL.BigButs["Tribe: Create"] = "gms_tribemenu" -PANEL.BigButs["Tribe: Join"] = "gms_tribes" -PANEL.BigButs["Tribe: Leave"] = "gms_leave" -PANEL.BigButs["Save character"] = "gms_savecharacter" - -PANEL.Plantables = {} -PANEL.Plantables["Plant Melon"] = "gms_plantmelon" -PANEL.Plantables["Plant Banana"] = "gms_plantbanana" -PANEL.Plantables["Plant Orange"] = "gms_plantorange" -PANEL.Plantables["Plant Tree"] = "gms_planttree" -PANEL.Plantables["Plant Grain"] = "gms_plantgrain" -PANEL.Plantables["Plant BerryBush"] = "gms_plantbush" - -function PANEL:Init() - - self.SmallButtons = vgui.Create( "DPanelList", self ) - self.SmallButtons:EnableVerticalScrollbar( true ) - self.SmallButtons:SetSpacing( 5 ) - self.SmallButtons:SetPadding( 5 ) - function self.SmallButtons:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) ) - end - - for txt, cmd in SortedPairs( self.SmallButs ) do - local button = vgui.Create( "gms_CommandButton" ) - button:SetConCommand( cmd ) - button:SetText( txt ) - button:SetTall( 26 ) - self.SmallButtons:AddItem( button ) - end - - self.BigButtons = vgui.Create( "DPanelList", self ) - self.BigButtons:EnableVerticalScrollbar( false ) - self.BigButtons:SetAutoSize( false ) - self.BigButtons:SetSpacing( 5 ) - self.BigButtons:SetPadding( 5 ) - function self.BigButtons:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) ) - end - - for txt, cmd in SortedPairs( self.BigButs ) do - local button = vgui.Create( "gms_CommandButton" ) - button:SetConCommand( cmd ) - button:SetText( txt ) - button:SetTall( 64 ) - self.BigButtons:AddItem( button ) - end - - self.Planting = vgui.Create( "DPanelList", self ) - self.Planting:EnableVerticalScrollbar( false ) - self.Planting:SetSpacing( 5 ) - self.Planting:SetPadding( 5 ) - function self.Planting:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) ) - end - - for txt, cmd in SortedPairs( self.Plantables ) do - local button = vgui.Create( "gms_CommandButton" ) - button:SetConCommand( cmd ) - button:SetText( txt ) - button:SetTall( 26 ) - self.Planting:AddItem( button ) - end -end - -function PANEL:Paint() -end - -function PANEL:PerformLayout() - self:StretchToParent( 0, 21, 0, 5 ) - self.SmallButtons:SetPos( 5, 5 ) - self.SmallButtons:SetSize( self:GetWide() * 0.45, self:GetTall() - 5 ) - - self.BigButtons:SetPos( self:GetWide() * 0.45 + 10, 5 ) - self.BigButtons:SetSize( self:GetWide() - ( self:GetWide() * 0.45 ) - 14, self:GetTall() / 2 - 5 ) - - self.Planting:SetPos( self:GetWide() * 0.45 + 10, self:GetTall() / 2 + 5 ) - self.Planting:SetSize( self:GetWide() - ( self:GetWide() * 0.45 ) - 14, self:GetTall() / 2 - 5 ) -end - -vgui.Register( "stranded_commands", PANEL, "DPanel" ) - -/* DSPP Menu */ -local PANEL = {} - -PANEL.LastThink = CurTime() -PANEL.Settings = { - { text = "Enable Prop Protection", elem = "DCheckBoxLabel", cmd = "spp_enabled" }, - { text = "Enable use key protection", elem = "DCheckBoxLabel", cmd = "spp_use" }, - { text = "Enable entity damage protection", elem = "DCheckBoxLabel", cmd = "spp_entdmg" }, - { text = "", elem = "DLabel" }, - { text = "Admins can touch other player props", elem = "DCheckBoxLabel", cmd = "spp_admin" }, - { text = "Admins can touch world props", elem = "DCheckBoxLabel", cmd = "spp_admin_wp" }, - { text = "", elem = "DLabel" }, - { text = "Delete disconnected admins entities", elem = "DCheckBoxLabel", cmd = "spp_del_adminprops" }, - { text = "Delete disconnected players entities", elem = "DCheckBoxLabel", cmd = "spp_del_disconnected" }, - { text = "Deletion delay in seconds", elem = "DNumSlider", cmd = "spp_del_delay", min = 10, max = 600 }, -} - -function PANEL:Init() - if ( !LocalPlayer():IsAdmin() ) then - self.Settings = { - { text = "You are not an admin.", elem = "DLabel" } - } - end - - self.Buddies = vgui.Create( "DPanelList", self ) - self.Buddies:EnableVerticalScrollbar( true ) - self.Buddies:SetSpacing( 5 ) - self.Buddies:SetPadding( 5 ) - function self.Buddies:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) ) - end - - self.AdminSettings = vgui.Create( "DPanelList", self ) - self.AdminSettings:EnableVerticalScrollbar( true ) - self.AdminSettings:SetSpacing( 5 ) - self.AdminSettings:SetPadding( 5 ) - function self.AdminSettings:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) ) - end - - self.AdminCleanUp = vgui.Create( "DPanelList", self ) - self.AdminCleanUp:EnableVerticalScrollbar( true ) - self.AdminCleanUp:SetSpacing( 5 ) - self.AdminCleanUp:SetPadding( 5 ) - function self.AdminCleanUp:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) ) - end - - /* Admin settings */ - for txt, t in pairs( self.Settings ) do - local item = vgui.Create( t.elem ) - item:SetText( t.text ) - - if ( t.elem != "DLabel" ) then - item:SetConVar( t.cmd ) - end - - if ( t.elem == "DNumSlider" ) then - item:SetMin( t.min ) - item:SetMax( t.max ) - item:SetDecimals( 0 ) - item.TextArea:SetTextColor( Color( 200, 200, 200 ) ) - end - - self.AdminSettings:AddItem( item ) - end - - /* Admin cleanup */ - for i, p in pairs( player.GetAll() ) do - local item = vgui.Create( "DButton" ) - item:SetConsoleCommand( "spp_cleanup_props", p:GetNWString( "SPPSteamID" ) ) - item:SetText( p:Name() ) - item:SetTall( 26 ) - self.AdminCleanUp:AddItem( item ) - end - - local item = vgui.Create( "DButton" ) - item:SetConsoleCommand( "spp_cleanup_props_left" ) - item:SetText( "Cleanup disconnected players props" ) - item:SetTall( 26 ) - self.AdminCleanUp:AddItem( item ) - - /* Client */ - for i, p in pairs( player.GetAll() ) do - if ( p != LocalPlayer() ) then - local item = vgui.Create( "DCheckBoxLabel" ) - - local BCommand = "spp_buddy_" .. p:GetNWString( "SPPSteamID" ) - if ( !LocalPlayer():GetInfo( BCommand ) ) then CreateClientConVar( BCommand, 0, false, true ) end - item:SetConVar( BCommand ) - item:SetText( p:Name() ) - item:SetTextColor( Color( 255, 255, 255, 255 ) ) - self.Buddies:AddItem( item ) - end - end - - local item = vgui.Create( "DButton" ) - item:SetConsoleCommand( "spp_apply_buddies" ) - item:SetText( "Apply settings" ) - item:SetTall( 26 ) - self.Buddies:AddItem( item ) - - local item = vgui.Create( "DButton" ) - item:SetConsoleCommand( "spp_clear_buddies" ) - item:SetText( "Clear all buddies" ) - item:SetTall( 26 ) - self.Buddies:AddItem( item ) -end - -function PANEL:Paint() -end - -function PANEL:Think() - if ( CurTime() >= self.LastThink + 3 )then - self.LastThink = CurTime() - self.AdminCleanUp:Clear( true ) - self.Buddies:Clear( true ) - - /* Admin cleanup */ - if ( LocalPlayer():IsAdmin() ) then - for i, p in pairs( player.GetAll() ) do - local item = vgui.Create( "DButton" ) - item:SetConsoleCommand( "spp_cleanup_props", p:GetNWString( "SPPSteamID" ) ) - item:SetTall( 26 ) - item:SetText( p:Name() ) - self.AdminCleanUp:AddItem( item ) - end - - local item = vgui.Create( "DButton" ) - item:SetConsoleCommand( "spp_cleanup_props_left" ) - item:SetTall( 26 ) - item:SetText( "Cleanup disconnected players props" ) - self.AdminCleanUp:AddItem( item ) - - self.AdminSettings:SetVisible( true ) - self.AdminCleanUp:SetVisible( true ) - else - local item = vgui.Create( "DLabel" ) - item:SetText( "You are not an admin." ) - self.AdminCleanUp:AddItem( item ) - - self.AdminSettings:SetVisible( false ) - self.AdminCleanUp:SetVisible( false ) - end - - /* Client */ - for i, p in pairs( player.GetAll() ) do - if ( p != LocalPlayer() ) then - local item = vgui.Create( "DCheckBoxLabel" ) - - local BCommand = "spp_buddy_" .. p:GetNWString( "SPPSteamID" ) - if ( !LocalPlayer():GetInfo( BCommand ) ) then CreateClientConVar( BCommand, 0, false, true ) end - item:SetConVar( BCommand ) - item:SetText( p:Name() ) - self.Buddies:AddItem( item ) - end - end - - local item = vgui.Create( "DButton" ) - item:SetConsoleCommand( "spp_apply_buddies" ) - item:SetText( "Apply settings" ) - item:SetTall( 26 ) - self.Buddies:AddItem( item ) - - local item = vgui.Create( "DButton" ) - item:SetConsoleCommand( "spp_clear_buddies" ) - item:SetText( "Clear all buddies" ) - item:SetTall( 26 ) - self.Buddies:AddItem( item ) - end -end - -function PANEL:PerformLayout() - self:StretchToParent( 0, 21, 0, 5 ) - - self.Buddies:SetPos( 5, 5 ) - self.Buddies:SetSize( self:GetWide() * 0.45, self:GetTall() - 5 ) - - self.AdminSettings:SetPos( self:GetWide() * 0.45 + 10, 5 ) - self.AdminSettings:SetSize( self:GetWide() - ( self:GetWide() * 0.45 ) - 14, self:GetTall() / 2 - 5 ) - - self.AdminCleanUp:SetPos( self:GetWide() * 0.45 + 10, self:GetTall() / 2 + 5 ) - self.AdminCleanUp:SetSize( self:GetWide() - ( self:GetWide() * 0.45 ) - 14, self:GetTall() / 2 - 5 ) -end - -vgui.Register( "stranded_sppmenu", PANEL, "DPanel" ) - -/* Admin Menu */ -local PANEL = {} - -PANEL.SpawningCmds = { - { text = "Spawn tree", cmd = "gms_admin_maketree" }, - { text = "Spawn rock", cmd = "gms_admin_makerock" }, - { text = "Spawn food", cmd = "gms_admin_makefood" }, - { text = "Save all characters", cmd = "gms_admin_saveallcharacters" }, - { text = "Plant random plant", cmd = "gms_admin_makeplant" }, - { text = "Plant melons", cmd = "gms_admin_makeplant 1" }, - { text = "Plant banana tree", cmd = "gms_admin_makeplant 2" }, - { text = "Plant oranges", cmd = "gms_admin_makeplant 3" }, - { text = "Plant berry bush", cmd = "gms_admin_makeplant 4" }, - { text = "Plant grain", cmd = "gms_admin_makeplant 5" } -} - -PANEL.Settings = { - { text = "Force players to use Tribe color", elem = "DCheckBoxLabel", cmd = "gms_TeamColors" }, - { text = "Allow players to damage each other with tools", elem = "DCheckBoxLabel", cmd = "gms_PVPDamage" }, - { text = "Enable free build for everyone", elem = "DCheckBoxLabel", cmd = "gms_FreeBuild" }, - { text = "Enable free build for super admins", elem = "DCheckBoxLabel", cmd = "gms_FreeBuildSa" }, - { text = "Give all players all tools", elem = "DCheckBoxLabel", cmd = "gms_AllTools" }, - //{ text = "Enable low needs alerts ( coughing, etc )", elem = "DCheckBoxLabel", cmd = "gms_alerts" }, - { text = "Spread fire", elem = "DCheckBoxLabel", cmd = "gms_SpreadFire" }, - { text = "Fadeout rocks, just like trees", elem = "DCheckBoxLabel", cmd = "gms_FadeRocks" }, - { text = "Enable campfires", elem = "DCheckBoxLabel", cmd = "gms_campfire" }, - { text = "Spawn zombies at night", elem = "DCheckBoxLabel", cmd = "gms_zombies" }, - { text = "Enable day/night cycle", elem = "DCheckBoxLabel", cmd = "gms_daynight" }, - //{ text = "Costs scale", elem = "DNumSlider", decimals = 1, cmd = "gms_CostsScale", min = 1, max = 4 }, - { text = "Plant limit per player", elem = "DNumSlider", cmd = "gms_PlantLimit", min = 10, max = 35 }, - { text = "", elem = "DLabel" }, - { text = "Reproduce trees", elem = "DCheckBoxLabel", cmd = "gms_ReproduceTrees" }, - { text = "Max reproduced trees", elem = "DNumSlider", cmd = "gms_MaxReproducedTrees", min = 1, max = 60 }, - { text = "", elem = "DLabel" }, - { text = "Autosave user profiles", elem = "DCheckBoxLabel", cmd = "gms_AutoSave" }, - { text = "Autosave delay ( minutes )", elem = "DNumSlider", cmd = "gms_AutoSaveTime", min = 1, max = 30 }, -} - -function PANEL:Init() - - self.MapSaving = vgui.Create( "DPanelList", self ) - self.MapSaving:EnableVerticalScrollbar( true ) - self.MapSaving:SetSpacing( 5 ) - self.MapSaving:SetPadding( 5 ) - function self.MapSaving:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) ) - end - - self.Populating = vgui.Create( "DPanelList", self ) - self.Populating:EnableVerticalScrollbar( true ) - self.Populating:SetSpacing( 5 ) - self.Populating:SetPadding( 5 ) - function self.Populating:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) ) - end - - self.AdminSettings = vgui.Create( "DPanelList", self ) - self.AdminSettings:EnableVerticalScrollbar( true ) - self.AdminSettings:SetSpacing( 5 ) - self.AdminSettings:SetPadding( 5 ) - function self.AdminSettings:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) ) - end - - self.Spawning = vgui.Create( "DPanelList", self ) - self.Spawning:EnableVerticalScrollbar( true ) - self.Spawning:SetSpacing( 5 ) - self.Spawning:SetPadding( 5 ) - function self.Spawning:Paint() - draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) ) - end - - for txt, t in pairs( self.Settings ) do - local item = vgui.Create( t.elem ) - item:SetText( t.text ) - - if ( t.elem == "DNumSlider" ) then - item:SetMin( t.min ) - item:SetMax( t.max ) - item:SetDecimals( t.decimals or 0 ) - item.TextArea:SetTextColor( Color( 200, 200, 200 ) ) - end - - if ( t.elem != "DLabel" ) then item:SetConVar( t.cmd ) end - - self.AdminSettings:AddItem( item ) - end - - for txt, t in pairs( self.SpawningCmds ) do - local item = vgui.Create( "DButton" ) - item:SetText( t.text ) - item:SetTall( 26 ) - item:SetConsoleCommand( t.cmd ) - self.Spawning:AddItem( item ) - end - - // POPULATE AREA - local populatearea = vgui.Create( "DPanel", self ) - populatearea:SetTall( 100 ) - - local label = vgui.Create( "DLabel", populatearea ) - label:SetPos( 10, 5 ) - label:SetDark( true ) - label:SetText( "Amount" ) - label:SizeToContents() - - self.PopulateAmount = vgui.Create( "DTextEntry", populatearea ) - self.PopulateAmount:SetPos( 10, 20 ) - self.PopulateAmount:SetTall( 24 ) - self.PopulateAmount:SetValue( "10" ) - populatearea.PopulateAmount = self.PopulateAmount - - local label = vgui.Create( "DLabel", populatearea ) - label:SetDark( true ) - label:SetText( "Max radius" ) - label:SizeToContents() - - self.PopulateRadius = vgui.Create( "DTextEntry", populatearea ) - self.PopulateRadius:SetValue( "1000" ) - self.PopulateRadius:SetTall( 24 ) - self.PopulateRadius.Label = label - populatearea.PopulateRadius = self.PopulateRadius - - local label = vgui.Create( "DLabel", populatearea ) - label:SetPos( 10, 49 ) - label:SetDark( true ) - label:SetText( "Type" ) - label:SizeToContents() - - local typ = "Trees" - self.PopulateType = vgui.Create( "DComboBox", populatearea ) - self.PopulateType:SetTall( 24 ) - self.PopulateType:SetPos( 10, 64 ) - self.PopulateType:AddChoice( "Trees", "Trees" ) - self.PopulateType:AddChoice( "Rocks", "Rocks" ) - self.PopulateType:AddChoice( "Random plants", "Random_Plant" ) - self.PopulateType:ChooseOptionID( 1 ) - function self.PopulateType:OnSelect( index, value, data ) typ = data end - - self.PopulateArea = vgui.Create( "gms_CommandButton", populatearea ) - self.PopulateArea:SetTall( 24 ) - self.PopulateArea:SetText( "Populate Area" ) - function self.PopulateArea:DoClick() - local p = self:GetParent() - RunConsoleCommand( "gms_admin_PopulateArea", typ, string.Trim( p.PopulateAmount:GetValue() ), string.Trim( p.PopulateRadius:GetValue() ) ) - end - - self.Populating:AddItem( populatearea ) - - // POPULATE AREA: Antlions - local populatearea = vgui.Create( "DPanel", self ) - populatearea:SetTall( 54 ) - - local label = vgui.Create( "DLabel", populatearea ) - label:SetPos( 10, 5 ) - label:SetDark( true ) - label:SetText( "Amount" ) - label:SizeToContents() - - self.PopulateAmountAnt = vgui.Create( "DTextEntry", populatearea ) - self.PopulateAmountAnt:SetPos( 10, 20 ) - self.PopulateAmountAnt:SetTall( 24 ) - self.PopulateAmountAnt:SetValue( "5" ) - populatearea.PopulateAmountAnt = self.PopulateAmountAnt - - self.PopulateAreaAnt = vgui.Create( "gms_CommandButton", populatearea ) - self.PopulateAreaAnt:SetTall( 24 ) - self.PopulateAreaAnt:SetText( "Make Antlion Barrow" ) - function self.PopulateAreaAnt:DoClick() - RunConsoleCommand( "gms_admin_MakeAntlionBarrow", string.Trim( self:GetParent().PopulateAmountAnt:GetValue() ) ) - end - - self.Populating:AddItem( populatearea ) - - // Save map - local populatearea = vgui.Create( "DPanel", self ) - populatearea:SetTall( 64 ) - - self.MapName = vgui.Create( "DTextEntry", populatearea ) - self.MapName:SetPos( 5, 5 ) - self.MapName:SetTall( 24 ) - self.MapName:SetValue( "savename" ) - populatearea.MapName = self.MapName - - self.SaveMap = vgui.Create( "gms_CommandButton", populatearea ) - self.SaveMap:SetPos( 5, 34 ) - self.SaveMap:SetTall( 24 ) - self.SaveMap:SetText( "Save" ) - function self.SaveMap:DoClick() - RunConsoleCommand( "gms_admin_savemap", string.Trim( self:GetParent().MapName:GetValue() ) ) - end - - self.MapSaving:AddItem( populatearea ) - - // Load/delete map - local populatearea = vgui.Create( "DPanel", self ) - populatearea:SetTall( 64 ) - - local map = "" - self.MapNameL = vgui.Create( "DComboBox", populatearea ) - self.MapNameL:SetTall( 24 ) - self.MapNameL:SetPos( 5, 5 ) - function self.MapNameL:OnSelect( index, value, data ) map = data end - populatearea.MapNameL = self.MapNameL - - self.LoadMap = vgui.Create( "gms_CommandButton", populatearea ) - self.LoadMap:SetPos( 5, 34 ) - self.LoadMap:SetTall( 24 ) - self.LoadMap:SetText( "Load" ) - function self.LoadMap:DoClick() - RunConsoleCommand( "gms_admin_loadmap", string.Trim( map ) ) - end - - self.DeleteMap = vgui.Create( "gms_CommandButton", populatearea ) - self.DeleteMap:SetTall( 24 ) - self.DeleteMap:SetText( "Delete" ) - function self.DeleteMap:DoClick() - RunConsoleCommand( "gms_admin_deletemap", map ) - end - - self.MapSaving:AddItem( populatearea ) - -end - -function PANEL:Paint() -end - -function PANEL:PerformLayout() - self:StretchToParent( 0, 21, 0, 5 ) - - self.MapSaving:SetPos( 5, 5 ) - self.MapSaving:SetSize( self:GetWide() * 0.45, self:GetTall() / 2 - 5 ) - - self.Populating:SetPos( 5, self:GetTall() / 2 + 5 ) - self.Populating:SetSize( self:GetWide() - ( self:GetWide() * 0.45 ) - 14, self:GetTall() / 2 - 5 ) - - self.AdminSettings:SetPos( self:GetWide() * 0.45 + 10, 5 ) - self.AdminSettings:SetSize( self:GetWide() - ( self:GetWide() * 0.45 ) - 14, self:GetTall() / 2 - 5 ) - - self.Spawning:SetPos( self:GetWide() - ( self:GetWide() * 0.45 ) - 4, self:GetTall() / 2 + 5 ) - self.Spawning:SetSize( self:GetWide() * 0.45, self:GetTall() / 2 - 5 ) - - /* POPULATION */ - self.PopulateAmount:SetWide( self.Populating:GetWide() / 2 - 20 ) - self.PopulateRadius:SetWide( self.Populating:GetWide() / 2 - 20 ) - self.PopulateRadius.Label:SetPos( self.Populating:GetWide() / 2, 5 ) - self.PopulateRadius:SetPos( self.Populating:GetWide() / 2, 20 ) - - self.PopulateType:SetWide( self.Populating:GetWide() / 2 - 20 ) - self.PopulateArea:SetWide( self.Populating:GetWide() / 2 - 20 ) - self.PopulateArea:SetPos( self.Populating:GetWide() / 2, 64 ) - - /* ANTLIONS */ - self.PopulateAmountAnt:SetWide( self.Populating:GetWide() / 2 - 20 ) - self.PopulateAreaAnt:SetWide( self.Populating:GetWide() / 2 - 20 ) - self.PopulateAreaAnt:SetPos( self.Populating:GetWide() / 2, 20 ) - - // Save map - self.MapName:SetWide( self.MapSaving:GetWide() - 20 ) - self.SaveMap:SetWide( self.MapSaving:GetWide() - 20 ) - - // Load/delete map - self.MapNameL:SetSize( self.MapSaving:GetWide() - 20, 24 ) - self.LoadMap:SetWide( self.MapSaving:GetWide() / 2 - 20 ) - self.DeleteMap:SetWide( self.MapSaving:GetWide() / 2 - 20 ) - self.DeleteMap:SetPos( self.MapSaving:GetWide() / 2 + 5, 34 ) -end - -vgui.Register( "stranded_adminmenu", PANEL, "DPanel" ) - -/* Spawnpanel */ -local PANEL = {} - -function PANEL:Init() - self:SetTitle( "" ) - self:ShowCloseButton( false ) - - self.m_bHangOpen = false - - self.ContentPanel = vgui.Create( "DPropertySheet", self ) - self.ContentPanel:AddSheet( "Props", vgui.Create( "stranded_propspawn", self.ContentPanel ), "icon16/brick.png", false, false ) - self.ContentPanel:AddSheet( "Tools", vgui.Create( "stranded_toolmenu", self.ContentPanel ), "icon16/wrench.png", true, true ) - self.ContentPanel:AddSheet( "Commands", vgui.Create( "stranded_commands", self.ContentPanel ), "icon16/application.png", true, true ) - self.ContentPanel:AddSheet( "Prop Protection", vgui.Create( "stranded_sppmenu", self.ContentPanel ), "icon16/shield.png", true, true ) - - self.AdminMenu = vgui.Create( "stranded_adminmenu", self.ContentPanel ) - local tab = self.ContentPanel:AddSheet( "Admin menu", self.AdminMenu, "icon16/shield_add.png", true, true ) - self.AdminTab = tab.Tab -end - -function PANEL:Paint() -end - -function PANEL:Think() - if ( !LocalPlayer():IsAdmin() ) then - /*self.AdminMenu.MapSaving:SetVisible( false ) - self.AdminMenu.Populating:SetVisible( false ) - self.AdminMenu.AdminSettings:SetVisible( false ) - self.AdminMenu.Spawning:SetVisible( false )*/ - self.AdminTab:SetVisible( false ) - else - /*self.AdminMenu.MapSaving:SetVisible( true ) - self.AdminMenu.Populating:SetVisible( true ) - self.AdminMenu.AdminSettings:SetVisible( true ) - self.AdminMenu.Spawning:SetVisible( true )*/ - self.AdminTab:SetVisible( true ) - end -end - -function PANEL:StartKeyFocus( pPanel ) - - self.m_pKeyFocus = pPanel - self:SetKeyboardInputEnabled( true ) - self.m_bHangOpen = true - - g_ContextMenu:StartKeyFocus( pPanel ) - -end - -function PANEL:EndKeyFocus( pPanel ) - - if ( self.m_pKeyFocus != pPanel ) then return end - self:SetKeyboardInputEnabled( false ) - - g_ContextMenu:EndKeyFocus( pPanel ) - -end - -function PANEL:PerformLayout() - self:SetSize( ScrW() / 2.2 - 10, ScrH() - 10 ) - self:SetPos( ScrW() - ( ScrW() / 2.2 + 5 ), 5 ) - self.ContentPanel:StretchToParent( 0, 0, 0, 0 ) - - DFrame.PerformLayout( self ) -end - -vgui.Register( "gms_menu", PANEL, "DFrame" ) - -/* Spawn menu override */ - -local ToAdd = {} -local function UpdateSavegames() - gSpawnMenu.AdminMenu.MapNameL:Clear() - for id, st in pairs( ToAdd ) do - gSpawnMenu.AdminMenu.MapNameL:AddChoice( st, st, true ) - end -end - -usermessage.Hook( "gms_AddLoadGameToList", function( um ) - local str = um:ReadString() - if ( table.HasValue( ToAdd, str ) ) then return end - table.insert( ToAdd, str ) - - if ( !IsValid( gSpawnMenu ) ) then return end - UpdateSavegames() -end ) - -usermessage.Hook( "gms_RemoveLoadGameFromList", function( um ) - local str = um:ReadString() - for id, st in pairs( ToAdd ) do if ( st == str ) then table.remove( ToAdd, id ) break end end - - if ( !IsValid( gSpawnMenu ) ) then return end - UpdateSavegames() -end ) - -function GM:OnSpawnMenuOpen() - if ( LocalPlayer():GetNWBool( "AFK" ) ) then return end - - if ( !IsValid( gSpawnMenu ) ) then - gSpawnMenu = vgui.Create( "gms_menu" ) - gSpawnMenu:SetVisible( false ) - - UpdateSavegames() - end - - gSpawnMenu.m_bHangOpen = false - - gSpawnMenu:MakePopup() - gSpawnMenu:SetVisible( true ) - gSpawnMenu:SetKeyboardInputEnabled( false ) - gSpawnMenu:SetMouseInputEnabled( true ) - gSpawnMenu:SetAlpha( 255 ) - - GAMEMODE.SkillsHud:MakePopup() - GAMEMODE.ResourcesHud:MakePopup() - GAMEMODE.CommandsHud:MakePopup() - - GAMEMODE.SkillsHud:SetKeyboardInputEnabled( false ) - GAMEMODE.ResourcesHud:SetKeyboardInputEnabled( false ) - GAMEMODE.CommandsHud:SetKeyboardInputEnabled( false ) - - GAMEMODE.CommandsHud:SetVisible( true ) - - gui.EnableScreenClicker( true ) - RestoreCursorPosition() -end - -function GM:OnSpawnMenuClose() - if ( gSpawnMenu.m_bHangOpen ) then - gSpawnMenu.m_bHangOpen = false - return - end - - if ( IsValid( gSpawnMenu ) and gSpawnMenu:IsVisible() ) then - gSpawnMenu:SetVisible( false ) - end - - GAMEMODE.SkillsHud:SetMouseInputEnabled( false ) - GAMEMODE.ResourcesHud:SetMouseInputEnabled( false ) - GAMEMODE.CommandsHud:SetMouseInputEnabled( false ) - - GAMEMODE.CommandsHud:SetVisible( false ) - - RememberCursorPosition() - gui.EnableScreenClicker( false ) -end - -hook.Add( "OnTextEntryGetFocus", "GMSSpawnMenuKeyboardFocusOn", function( pnl ) - - if ( !IsValid( gSpawnMenu ) || !IsValid( g_ContextMenu ) ) then return end - if ( IsValid( pnl ) && pnl.HasParent && !pnl:HasParent( gSpawnMenu ) && !pnl:HasParent( g_ContextMenu ) ) then return end - - gSpawnMenu:StartKeyFocus( pnl ) - -end ) - -hook.Add( "GUIMousePressed", "GMS_KindaFixWorldClicking", function() - GAMEMODE.SkillsHud:MakePopup() - GAMEMODE.ResourcesHud:MakePopup() - GAMEMODE.CommandsHud:MakePopup() - - GAMEMODE.SkillsHud:SetKeyboardInputEnabled( false ) - GAMEMODE.ResourcesHud:SetKeyboardInputEnabled( false ) - GAMEMODE.CommandsHud:SetKeyboardInputEnabled( false ) -end ) - -hook.Add( "OnTextEntryLoseFocus", "GMSSpawnMenuKeyboardFocusOff", function( pnl ) - - if ( !IsValid( gSpawnMenu ) || !IsValid( g_ContextMenu ) ) then return end - if ( IsValid( pnl ) && pnl.HasParent && !pnl:HasParent( gSpawnMenu ) && !pnl:HasParent( g_ContextMenu ) ) then return end - - gSpawnMenu:EndKeyFocus( pnl ) - -end ) - -function GM:SpawnMenuEnabled() - return false -end - -function GM:OnContextMenuOpen() - self.BaseClass.OnContextMenuOpen( self ) - menubar.Control:SetVisible( false ) - - GAMEMODE.SkillsHud:MakePopup() - GAMEMODE.ResourcesHud:MakePopup() - GAMEMODE.CommandsHud:MakePopup() - - GAMEMODE.SkillsHud:SetKeyboardInputEnabled( false ) - GAMEMODE.ResourcesHud:SetKeyboardInputEnabled( false ) - GAMEMODE.CommandsHud:SetKeyboardInputEnabled( false ) - - GAMEMODE.CommandsHud:SetVisible( true ) -end - -function GM:OnContextMenuClose() - self.BaseClass.OnContextMenuClose( self ) - menubar.Control:SetVisible( false ) - - GAMEMODE.SkillsHud:SetMouseInputEnabled( false ) - GAMEMODE.ResourcesHud:SetMouseInputEnabled( false ) - GAMEMODE.CommandsHud:SetMouseInputEnabled( false ) - - GAMEMODE.CommandsHud:SetVisible( false ) -end diff --git a/ftp_gmstranded/gamemode/cl_scoreboard.lua b/ftp_gmstranded/gamemode/cl_scoreboard.lua deleted file mode 100644 index e832a4a..0000000 --- a/ftp_gmstranded/gamemode/cl_scoreboard.lua +++ /dev/null @@ -1,231 +0,0 @@ - -surface.CreateFont( "ScoreboardText", { - font = "Tahoma", - size = 16, - weight = 1000, - antialias = true, - additive = false, -} ) - -surface.CreateFont( "ScoreboardSub", { - font = "coolvetica", - size = 24, - weight = 500, - antialias = true, - additive = false, -} ) - -surface.CreateFont( "ScoreboardHead", { - font = "coolvetica", - size = 48, - weight = 500, - antialias = true, - additive = false, -} ) - -function GM:ScoreboardShow() - GAMEMODE.ShowScoreboard = true -end - -function GM:ScoreboardHide() - GAMEMODE.ShowScoreboard = false -end - -function GM:GetTeamScoreInfo() - local TeamInfo = {} - - for id, pl in pairs(player.GetAll()) do - local _team = pl:Team() - local _frags = pl:Frags() - local _deaths = pl:Deaths() - local _ping = pl:Ping() - - if (!TeamInfo[_team]) then - TeamInfo[_team] = {} - TeamInfo[_team].TeamName = team.GetName(_team) - TeamInfo[_team].Color = team.GetColor(_team) - TeamInfo[_team].Players = {} - end - - local PlayerInfo = {} - PlayerInfo.Frags = _frags - PlayerInfo.Deaths = pl:GetNWInt("Survival") - PlayerInfo.Score = _frags - PlayerInfo.Ping = _ping - PlayerInfo.Name = pl:Nick() - PlayerInfo.PlayerObj = pl - - if ( pl:IsAdmin() ) then PlayerInfo.Name = "[ADMIN] " .. PlayerInfo.Name end - if ( pl:IsDeveloper() ) then PlayerInfo.Name = "[DEVELOPER] " .. pl:Nick() end - if ( pl:GetNWBool( "AFK" ) ) then PlayerInfo.Name = PlayerInfo.Name .. " [AFK]" end - - local insertPos = #TeamInfo[_team].Players + 1 - for idx, info in pairs(TeamInfo[_team].Players) do - if (PlayerInfo.Frags > info.Frags) then - insertPos = idx - break - elseif (PlayerInfo.Frags == info.Frags) then - if (PlayerInfo.Deaths < info.Deaths) then - insertPos = idx - break - elseif (PlayerInfo.Deaths == info.Deaths) then - if (PlayerInfo.Name < info.Name) then - insertPos = idx - break - end - end - end - end - - table.insert( TeamInfo[ _team ].Players, insertPos, PlayerInfo ) - end - - return TeamInfo -end - -function GM:HUDDrawScoreBoard() - if ( !GAMEMODE.ShowScoreboard ) then return end - - if ( !GAMEMODE.ScoreDesign ) then - GAMEMODE.ScoreDesign = {} - GAMEMODE.ScoreDesign.HeaderY = 0 - GAMEMODE.ScoreDesign.Height = ScrH() / 2 - end - - local alpha = 255 - local ScoreboardInfo = self:GetTeamScoreInfo() - local xOffset = ScrW() / 8 - local yOffset = 32 - local scrWidth = ScrW() - local scrHeight = ScrH() - 64 - local boardWidth = scrWidth - ( 2 * xOffset ) - local boardHeight = scrHeight - local colWidth = 75 - - boardWidth = math.Clamp( boardWidth, 400, 600 ) - boardHeight = GAMEMODE.ScoreDesign.Height - - xOffset = (ScrW() - boardWidth) / 2.0 - yOffset = (ScrH() - boardHeight) / 2.0 - yOffset = yOffset - ScrH() / 4.0 - yOffset = math.Clamp( yOffset, 32, ScrH() ) - - surface.SetDrawColor( 0, 0, 0, 200 ) - surface.DrawRect( xOffset, yOffset, boardWidth, boardHeight ) - - surface.SetDrawColor( 0, 0, 0, 150 ) - surface.DrawOutlinedRect( xOffset, yOffset, boardWidth, boardHeight ) - - surface.SetDrawColor( 0, 0, 0, 50 ) - //surface.DrawOutlinedRect( xOffset - 1, yOffset - 1, boardWidth + 2, boardHeight + 2 ) - - local hostname = GetGlobalString( "ServerName" ) - local gamemodeName = GAMEMODE.Name .. " - " .. GAMEMODE.Author - - if ( string.len( hostname ) > 32 ) then - surface.SetFont("ScoreboardSub") - else - surface.SetFont("ScoreboardHead") - end - - surface.SetTextColor(255, 255, 255, 255) - local txWidth, txHeight = surface.GetTextSize( hostname ) - local y = yOffset + 5 - surface.SetTextPos(xOffset + (boardWidth / 2) - (txWidth / 2), y) - surface.DrawText(hostname) - - /*y = y + txHeight + 2 - - surface.SetTextColor(255, 255, 255, 255) - surface.SetFont("ScoreboardSub") - local txWidth, txHeight = surface.GetTextSize(gamemodeName) - surface.SetTextPos(xOffset + (boardWidth / 2) - (txWidth / 2), y) - surface.DrawText(gamemodeName)*/ - - y = y + txHeight + 4 - GAMEMODE.ScoreDesign.HeaderY = y - yOffset - - surface.SetDrawColor(0, 0, 0, 100) - surface.DrawRect(xOffset, y - 1, boardWidth, 1) - - surface.SetDrawColor(255, 255, 255, 20) - surface.DrawRect(xOffset + boardWidth - (colWidth * 1), y, colWidth, boardHeight - y + yOffset) - - surface.SetDrawColor(255, 255, 255, 20) - surface.DrawRect(xOffset + boardWidth - (colWidth * 3), y, colWidth, boardHeight - y + yOffset) - - surface.SetFont("ScoreboardText") - local txWidth, txHeight = surface.GetTextSize("W") - - surface.SetDrawColor(0, 0, 0, 100) - surface.DrawRect(xOffset, y, boardWidth, txHeight + 6) - - y = y + 2 - - surface.SetTextPos(xOffset + 16, y) - surface.DrawText("#Name") - surface.SetTextPos(xOffset + boardWidth - (colWidth * 3) + 8, y) - surface.DrawText("#Score") - surface.SetTextPos(xOffset + boardWidth - (colWidth * 2) + 8, y) - surface.DrawText("Level") - surface.SetTextPos(xOffset + boardWidth - (colWidth * 1) + 8, y) - surface.DrawText("#Ping") - - y = y + txHeight + 4 - - local yPosition = y - for team, info in pairs(ScoreboardInfo) do - local teamText = info.TeamName .. " (" .. #info.Players .. " Players)" - - surface.SetFont("ScoreboardText") - if (info.Color.r < 50 and info.Color.g < 50 and info.Color.b < 50) then surface.SetTextColor(255, 255, 255, 255) else surface.SetTextColor(0, 0, 0, 255) end - - txWidth, txHeight = surface.GetTextSize(teamText) - surface.SetDrawColor(info.Color.r, info.Color.g, info.Color.b, 255) - surface.DrawRect(xOffset + 1, yPosition, boardWidth - 2, txHeight + 4) - yPosition = yPosition + 2 - surface.SetTextPos(xOffset + boardWidth / 2 - txWidth / 2, yPosition) - - surface.DrawText(teamText) - yPosition = yPosition + txHeight + 4 - - for index, plinfo in pairs(info.Players) do - surface.SetFont("ScoreboardText") - surface.SetTextColor(info.Color.r, info.Color.g, info.Color.b, 200) - surface.SetTextPos(xOffset + 16, yPosition) - txWidth, txHeight = surface.GetTextSize(plinfo.Name) - - if (plinfo.PlayerObj == LocalPlayer()) then - surface.SetDrawColor(info.Color.r, info.Color.g, info.Color.b, 64) - surface.DrawRect(xOffset + 1, yPosition, boardWidth - 2, txHeight + 2) - surface.SetTextColor(info.Color.r, info.Color.g, info.Color.b, 255) - end - - local px, py = xOffset + 16, yPosition - local textcolor = Color(info.Color.r, info.Color.g, info.Color.b, alpha) - local shadowcolor = Color(0, 0, 0, alpha * 0.8) - - draw.SimpleText(plinfo.Name, "ScoreboardText", px + 1, py + 1, shadowcolor) - draw.SimpleText(plinfo.Name, "ScoreboardText", px, py, textcolor) - - px = xOffset + boardWidth - (colWidth * 3) + 8 - draw.SimpleText(plinfo.Frags, "ScoreboardText", px + 1, py + 1, shadowcolor) - draw.SimpleText(plinfo.Frags, "ScoreboardText", px, py, textcolor) - - px = xOffset + boardWidth - (colWidth * 2) + 8 - draw.SimpleText(plinfo.Deaths, "ScoreboardText", px + 1, py + 1, shadowcolor) - draw.SimpleText(plinfo.Deaths, "ScoreboardText", px, py, textcolor) - - px = xOffset + boardWidth - (colWidth * 1) + 8 - draw.SimpleText(plinfo.Ping, "ScoreboardText", px + 1, py + 1, shadowcolor) - draw.SimpleText(plinfo.Ping, "ScoreboardText", px, py, textcolor) - - yPosition = yPosition + txHeight + 3 - end - end - - yPosition = yPosition + 1 - - GAMEMODE.ScoreDesign.Height = (GAMEMODE.ScoreDesign.Height * 2) + (yPosition - yOffset) - GAMEMODE.ScoreDesign.Height = GAMEMODE.ScoreDesign.Height / 3 -end diff --git a/ftp_gmstranded/gamemode/combinations.lua b/ftp_gmstranded/gamemode/combinations.lua deleted file mode 100644 index 9409f3c..0000000 --- a/ftp_gmstranded/gamemode/combinations.lua +++ /dev/null @@ -1,3358 +0,0 @@ - - - -GMS.Combinations = {} -function GMS.RegisterCombi( tbl, group ) - if ( !GMS.Combinations[ group ] ) then GMS.Combinations[ group ] = {} end - GMS.Combinations[ group ][ string.Replace( tbl.Name, " ", "_" ) ] = tbl -end - -/* ------------------------ Combinations ------------------------*/ - -/* Flour */ -local COMBI = {} - -COMBI.Name = "Flour" -COMBI.Description = "Flour can be used for making dough." - -COMBI.Req = {} -COMBI.Req["Stone"] = 1 -COMBI.Req["Grain_Seeds"] = 2 - -COMBI.Results = {} -COMBI.Results["Flour"] = 1 -COMBI.Results["Stone"] = 1 - -GMS.RegisterCombi( COMBI, "Combinations" ) - -/* Spice */ -local COMBI = {} - -COMBI.Name = "Spices" -COMBI.Description = "Spice can be used for various meals." - -COMBI.Req = {} -COMBI.Req["Stone"] = 1 -COMBI.Req["Herbs"] = 2 - -COMBI.Results = {} -COMBI.Results["Spices"] = 1 -COMBI.Results["Stone"] = 1 - -GMS.RegisterCombi( COMBI, "Combinations" ) - -/* Dough */ -local COMBI = {} - -COMBI.Name = "Dough" -COMBI.Description = "Dough is used for baking." - -COMBI.Req = {} -COMBI.Req["Water_Bottles"] = 1 -COMBI.Req["Flour"] = 2 - -COMBI.Results = {} -COMBI.Results["Dough"] = 1 - -GMS.RegisterCombi( COMBI, "Combinations" ) - -/* Dough x10 */ -local COMBI = {} - -COMBI.Name = "Dough 10x" -COMBI.Description = "Dough is used for baking." - -COMBI.Req = {} -COMBI.Req["Water_Bottles"] = 7 -COMBI.Req["Flour"] = 15 - -COMBI.Results = {} -COMBI.Results["Dough"] = 10 - -GMS.RegisterCombi( COMBI, "Combinations" ) - -/* Rope */ -local COMBI = {} - -COMBI.Name = "Rope" -COMBI.Description = "Allows you to use Rope tool ( Using Rope Tool will consume the Rope ) and used in fishing rod crafting." - -COMBI.Req = {} -COMBI.Req["Herbs"] = 5 -COMBI.Req["Wood"] = 2 -COMBI.Req["Water_Bottles"] = 1 - -COMBI.Results = {} -COMBI.Results["Rope"] = 1 - -GMS.RegisterCombi( COMBI, "Combinations" ) - -/* Welder */ -local COMBI = {} - -COMBI.Name = "Welder" -COMBI.Description = "Allows you to use Weld Tool. You still need the Tool Gun though." - -COMBI.Req = {} -COMBI.Req[ "Wood" ] = 10 -COMBI.Req[ "Stone" ] = 10 -COMBI.Req[ "Water_Bottles" ] = 1 - -COMBI.Results = {} -COMBI.Results[ "Welder" ] = 1 - -GMS.RegisterCombi( COMBI, "Combinations" ) - -/* Concrete */ -local COMBI = {} - -COMBI.Name = "Concrete" -COMBI.Description = "Concrete can be used for spawning concrete props." - -COMBI.Req = {} -COMBI.Req["Sand"] = 5 -COMBI.Req["Water_Bottles"] = 2 - -COMBI.Results = {} -COMBI.Results["Concrete"] = 1 - -GMS.RegisterCombi( COMBI, "Combinations" ) - -/* Urine */ -local COMBI = {} - -COMBI.Name = "Urine" -COMBI.Description = "Drink some water and wait, used in gunpowder production." - -COMBI.Req = {} -COMBI.Req["Water_Bottles"] = 2 - -COMBI.Results = {} -COMBI.Results["Urine_Bottles"] = 1 - -GMS.RegisterCombi( COMBI, "Combinations" ) - -/* Urine 10x */ -local COMBI = {} - -COMBI.Name = "Urine 10x" -COMBI.Description = "Drink loads of water and wait, messy, but used in gunpowder production." - -COMBI.Req = {} -COMBI.Req["Water_Bottles"] = 20 - -COMBI.Results = {} -COMBI.Results["Urine_Bottles"] = 10 - -GMS.RegisterCombi( COMBI, "Combinations" ) - -/* Medicine */ -local COMBI = {} - -COMBI.Name = "Medicine" -COMBI.Description = "To restore your health." - -COMBI.Req = {} -COMBI.Req["Herbs"] = 7 -COMBI.Req["Urine_Bottles"] = 2 - -COMBI.Results = {} -COMBI.Results["Medicine"] = 5 - -GMS.RegisterCombi( COMBI, "Combinations" ) - - -/* ------------------------ Structures ------------------------*/ - -/* Resource Pack */ -local COMBI = {} - -COMBI.Name = "Resource Pack" -COMBI.Description = "You can use the resource pack to store multiple resources in it. Highly recommended." - -COMBI.Req = {} -COMBI.Req["Wood"] = 20 -COMBI.Req["Stone"] = 10 - -COMBI.Results = "gms_resourcepack" -COMBI.Texture = "gms_icons/gms_resourcepack.png" -COMBI.BuildSiteModel = "models/items/item_item_crate.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "Clock" -COMBI.Description = "Shows you world time." - -COMBI.Req = {} -COMBI.Req["Iron"] = 10 -COMBI.Req["Glass"] = 10 - -COMBI.Results = "gms_clock_big" -COMBI.Texture = "gms_icons/gms_clock_big.png" -COMBI.BuildSiteModel = "models/props_trainstation/trainstation_clock001.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Fridge */ -local COMBI = {} - -COMBI.Name = "Fridge" -COMBI.Description = "You can use the fridge to store food in it. It will not spoil inside. Highly recommended." - -COMBI.Req = {} -COMBI.Req["Iron"] = 20 - -COMBI.Results = "gms_fridge" -COMBI.Texture = "gms_icons/gms_fridge.png" -COMBI.BuildSiteModel = "models/props_c17/FurnitureFridge001a.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Stone Workbench */ -local COMBI = {} - -COMBI.Name = "Stone Workbench" -COMBI.Description = "This stone table has various fine specialized equipment used in crafting basic items." - -COMBI.Req = {} -COMBI.Req["Wood"] = 15 -COMBI.Req["Stone"] = 25 - -COMBI.Results = "gms_stoneworkbench" -COMBI.Texture = "gms_icons/gms_stoneworkbench.png" -COMBI.BuildSiteModel = "models/props/de_piranesi/pi_merlon.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Copper Workbench */ -local COMBI = {} - -COMBI.Name = "Copper Workbench" -COMBI.Description = "This Copper table has various fine specialized equipment used in crafting quality items." - -COMBI.Req = {} -COMBI.Req["Copper"] = 30 -COMBI.Req["Stone"] = 10 -COMBI.Req["Wood"] = 20 - -COMBI.Results = "gms_copperworkbench" -COMBI.Texture = "gms_icons/gms_copperworkbench.png" -COMBI.BuildSiteModel = "models/props_combine/breendesk.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Iron Workbench */ -local COMBI = {} - -COMBI.Name = "Iron Workbench" -COMBI.Description = "This iron table has various fine specialized equipment used in crafting advanced items." - -COMBI.Req = {} -COMBI.Req["Iron"] = 30 -COMBI.Req["Stone"] = 20 -COMBI.Req["Wood"] = 10 - -COMBI.Results = "gms_ironworkbench" -COMBI.Texture = "gms_icons/gms_ironworkbench.png" -COMBI.BuildSiteModel = "models/props_wasteland/controlroom_desk001b.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Tech Workbench */ -local COMBI = {} - -COMBI.Name = "Tech Workbench" -COMBI.Description = "This tech workbench will help you with all your electronic needs." - -COMBI.Req = {} -COMBI.Req["Tech"] = 30 -COMBI.Req["Stone"] = 20 - -COMBI.Results = "gms_techworkbench" -COMBI.Texture = "gms_icons/gms_techworkbench.png" -COMBI.BuildSiteModel = "models/props_lab/reciever_cart.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Silver Workbench */ -local COMBI = {} - -COMBI.Name = "Silver Workbench" -COMBI.Description = "This iron table has various fine specialized equipment used in crafting advanced items." - -COMBI.Req = {} -COMBI.Req["Silver"] = 30 -COMBI.Req["Stone"] = 20 - -COMBI.Results = "gms_silverworkbench" -COMBI.Texture = "gms_icons/gms_none.png" -COMBI.BuildSiteModel = "models/props/de_inferno/bench_concrete.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Gold Workbench */ -local COMBI = {} - -COMBI.Name = "Gold Workbench" -COMBI.Description = "This iron table has various fine specialized equipment used in crafting advanced items." - -COMBI.Req = {} -COMBI.Req["Gold"] = 30 -COMBI.Req["Stone"] = 20 - -COMBI.Results = "gms_goldworkbench" -COMBI.Texture = "gms_icons/gms_none.png" -COMBI.BuildSiteModel = "models/props/cs_office/file_cabinet1.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Steel Workbench */ -local COMBI = {} - -COMBI.Name = "Steel Workbench" -COMBI.Description = "This iron table has various fine specialized equipment used in crafting advanced items." - -COMBI.Req = {} -COMBI.Req["Steel"] = 30 -COMBI.Req["Stone"] = 20 - -COMBI.Results = "gms_steelworkbench" -COMBI.Texture = "gms_icons/gms_none.png" -COMBI.BuildSiteModel = "models/props/de_nuke/equipment1.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Platinum Workbench */ -local COMBI = {} - -COMBI.Name = "Platinum Workbench" -COMBI.Description = "This iron table has various fine specialized equipment used in crafting advanced items." - -COMBI.Req = {} -COMBI.Req["Platinum"] = 30 -COMBI.Req["Stone"] = 20 - -COMBI.Results = "gms_platinumworkbench" -COMBI.Texture = "gms_icons/gms_none.png" -COMBI.BuildSiteModel = "models/xqm/boxfull.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Drinking Fountain */ -local COMBI = {} - -COMBI.Name = "Drinking Fountain" -COMBI.Description = "PORTABLE WATER?!" - -COMBI.Req = {} -COMBI.Req["Copper"] = 50 -COMBI.Req["Iron"] = 50 -COMBI.Req["Water_Bottles"] = 50 - -COMBI.Results = "gms_waterfountain" -COMBI.Texture = "gms_icons/gms_waterfountain.png" -COMBI.BuildSiteModel = "models/props/de_inferno/fountain.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Stove */ -local COMBI = {} - -COMBI.Name = "Stove" -COMBI.Description = "Using a stove, you can cook without having to light a fire." - -COMBI.Req = {} -COMBI.Req["Copper"] = 35 -COMBI.Req["Iron"] = 35 -COMBI.Req["Wood"] = 35 - -COMBI.Results = "gms_stove" -COMBI.Texture = "gms_icons/gms_stove.png" -COMBI.BuildSiteModel = "models/props_c17/furniturestove001a.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Stone Furnace */ -local COMBI = {} - -COMBI.Name = "Stone Furnace" -COMBI.Description = "You can use the furnace to smelt resources into another, such as Copper Ore into Copper." - -COMBI.Req = {} -COMBI.Req["Stone"] = 35 - -COMBI.Results = "gms_stonefurnace" -COMBI.Texture = "gms_icons/gms_stonefurnace.png" -COMBI.BuildSiteModel = "models/props/de_inferno/ClayOven.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Copper Furnace */ -local COMBI = {} - -COMBI.Name = "Copper Furnace" -COMBI.Description = "You can use the furnace to smelt resources into another, such as Iron Ore into Iron." - -COMBI.Req = {} -COMBI.Req["Copper"] = 35 - -COMBI.Results = "gms_copperfurnace" -COMBI.Texture = "gms_icons/gms_copperfurnace.png" -COMBI.BuildSiteModel = "models/props/cs_militia/furnace01.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Iron Furnace */ -local COMBI = {} - -COMBI.Name = "Iron Furnace" -COMBI.Description = "You can use the furnace to smelt resources into another, such as Sand into Glass." - -COMBI.Req = {} -COMBI.Req["Iron"] = 35 - -COMBI.Results = "gms_ironfurnace" -COMBI.Texture = "gms_icons/gms_ironfurnace.png" -COMBI.BuildSiteModel = "models/props_c17/furniturefireplace001a.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Tech Furnace */ -local COMBI = {} - -COMBI.Name = "Tech Furnace" -COMBI.Description = "You can use the furnace to smelt resources into another, such as Silver Ore into Silver." - -COMBI.Req = {} -COMBI.Req["Tech"] = 35 -COMBI.Req["Cedar"] = 35 - -COMBI.Results = "gms_techfurnace" -COMBI.Texture = "gms_icons/gms_none.png" -COMBI.BuildSiteModel = "models/props/cs_militia/dryer.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Silver Furnace */ -local COMBI = {} - -COMBI.Name = "Silver Furnace" -COMBI.Description = "You can use the furnace to smelt resources into another, such as Gold Ore into Gold." - -COMBI.Req = {} -COMBI.Req["Silver"] = 35 -COMBI.Req["Maple"] = 35 - -COMBI.Results = "gms_silverfurnace" -COMBI.Texture = "gms_icons/gms_none.png" -COMBI.BuildSiteModel = "models/props_wasteland/laundry_basket001.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Gold Furnace */ -local COMBI = {} - -COMBI.Name = "Gold Furnace" -COMBI.Description = "You can use the furnace to smelt resources into another, such as Steel Ore into Steel." - -COMBI.Req = {} -COMBI.Req["Gold"] = 35 -COMBI.Req["Teak"] = 35 - -COMBI.Results = "gms_goldfurnace" -COMBI.Texture = "gms_icons/gms_none.png" -COMBI.BuildSiteModel = "models/props_industrial/oil_storage.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Steel Furnace */ -local COMBI = {} - -COMBI.Name = "Steel Furnace" -COMBI.Description = "You can use the furnace to smelt resources into another, such as Platinum Ore into Platinum." - -COMBI.Req = {} -COMBI.Req["Steel"] = 35 -COMBI.Req["Mahogany"] = 35 - -COMBI.Results = "gms_steelfurnace" -COMBI.Texture = "gms_icons/gms_none.png" -COMBI.BuildSiteModel = "models/props_industrial/winch_deck.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Platinum Furnace */ -local COMBI = {} - -COMBI.Name = "Platinum Furnace" -COMBI.Description = "You can use the furnace to smelt resources into another." - -COMBI.Req = {} -COMBI.Req["Platinum"] = 35 -COMBI.Req["Elm"] = 35 - -COMBI.Results = "gms_platinumfurnace" -COMBI.Texture = "gms_icons/gms_none.png" -COMBI.BuildSiteModel = "models/xeon133/slider/slider_stand_12x12x24.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Grinding Stone */ -local COMBI = {} - -COMBI.Name = "Grinding Stone" -COMBI.Description = "You can use the grinding stone to smash resources into smaller things, such as stone into sand." - -COMBI.Req = {} -COMBI.Req["Stone"] = 40 - -COMBI.Results = "gms_grindingstone" -COMBI.Texture = "gms_icons/gms_grindingstone.png" -COMBI.BuildSiteModel = "models/props_combine/combine_mine01.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Factory */ -local COMBI = {} - -COMBI.Name = "Factory" -COMBI.Description = "You can use the factory to smelt resources into another and extract resources out of other resources." - -COMBI.Req = {} -COMBI.Req["Iron"] = 200 -COMBI.Req["Copper"] = 100 -COMBI.Req["Stone"] = 50 - -COMBI.Results = "gms_factory" -COMBI.Texture = "gms_icons/gms_factory.png" -COMBI.BuildSiteModel = "models/props_c17/factorymachine01.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Pistol Gunlab */ -local COMBI = {} - -COMBI.Name = "Pistol Gun Lab" -COMBI.Description = "For making pistols." - -COMBI.Req = {} -COMBI.Req["Tech"] = 150 -COMBI.Req["Cedar"] = 150 - -COMBI.Results = "gms_pistolgunlab" -COMBI.Texture = "gms_icons/gms_gunlab.png" -COMBI.BuildSiteModel = "models/props/cs_militia/gun_cabinet.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* SMG Gun Lab */ -local COMBI = {} - -COMBI.Name = "SMG Gun Lab" -COMBI.Description = "For making Assault weapons." - -COMBI.Req = {} -COMBI.Req["Silver"] = 200 -COMBI.Req["Maple"] = 200 - -COMBI.Results = "gms_smggunlab" -COMBI.Texture = "gms_icons/gms_none.png" -COMBI.BuildSiteModel = "models/props_wasteland/controlroom_storagecloset001a.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* High-Tech Lab */ -local COMBI = {} - -COMBI.Name = "High Tech Gun Lab" -COMBI.Description = "For making snipers and misc. weapons." - -COMBI.Req = {} -COMBI.Req["Gold"] = 250 -COMBI.Req["Teak"] = 250 -COMBI.Req["Steel"] = 150 - -COMBI.Results = "gms_hightechgunlab" -COMBI.Texture = "gms_icons/gms_none.png" -COMBI.BuildSiteModel = "models/props_wasteland/laundry_washer003.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Transmutator */ -local COMBI = {} - -COMBI.Name = "Transmutator" -COMBI.Description = "For transmutating wood." - -COMBI.Req = {} -COMBI.Req["Tech"] = 35 -COMBI.Req["Wood"] = 30 -COMBI.Req["Iron"] = 10 - -COMBI.Results = "gms_transmutator" -COMBI.Texture = "gms_icons/gms_none.png" -COMBI.BuildSiteModel = "models/props_wasteland/kitchen_stove002a.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Advanced Transmutator */ -local COMBI = {} - -COMBI.Name = "Advanced Transmutator" -COMBI.Description = "For transmutating wood." - -COMBI.Req = {} -COMBI.Req["Gold"] = 35 -COMBI.Req["Maple"] = 30 - -COMBI.Results = "gms_advancedtransmutator" -COMBI.Texture = "gms_icons/gms_none.png" -COMBI.BuildSiteModel = "models/props_wasteland/kitchen_fridge001a.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* GunChunks */ -local COMBI = {} - -COMBI.Name = "Gun Chunks" -COMBI.Description = "For making the components of guns with relative ease." - -COMBI.Req = {} -COMBI.Req["Iron"] = 50 -COMBI.Req["Copper"] = 25 -COMBI.Req["Wood"] = 25 - -COMBI.Results = "gms_gunchunks" -COMBI.Texture = "gms_icons/gms_gunchunks.png" -COMBI.BuildSiteModel = "models/Gibs/airboat_broken_engine.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* ------------------------ Stone Furnace ------------------------*/ - -/* Copper Ore to Copper*/ -local COMBI = {} - -COMBI.Name = "Copper" -COMBI.Description = "Copper can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_stonefurnace" - -COMBI.Req = {} -COMBI.Req["Copper_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Copper"] = 1 - -GMS.RegisterCombi( COMBI, "gms_stonefurnace" ) - -/* Copper Ore to Copper x5 */ -local COMBI = {} - -COMBI.Name = "Copper 5x" -COMBI.Description = "Copper can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_stonefurnace" - -COMBI.Req = {} -COMBI.Req["Copper_Ore"] = 5 - -COMBI.Results = {} -COMBI.Results["Copper"] = 5 - -GMS.RegisterCombi( COMBI, "gms_stonefurnace" ) - -/* Copper Ore to Copper x10 */ -local COMBI = {} - -COMBI.Name = "Copper 10x" -COMBI.Description = "Copper can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_stonefurnace" - -COMBI.Req = {} -COMBI.Req["Copper_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Copper"] = 10 - -GMS.RegisterCombi( COMBI, "gms_stonefurnace" ) - -/* Copper Ore to Copper x25 */ -local COMBI = {} - -COMBI.Name = "Copper 25x" -COMBI.Description = "Copper can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_stonefurnace" - -COMBI.Req = {} -COMBI.Req["Copper_Ore"] = 25 - -COMBI.Results = {} -COMBI.Results["Copper"] = 25 - -GMS.RegisterCombi( COMBI, "gms_stonefurnace" ) - -/* Allsmelt Copper */ -local COMBI = {} - -COMBI.Name = "All Copper" -COMBI.Description = "Copper can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_stonefurnace" - -COMBI.Req = {} -COMBI.Req["Copper_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Copper"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 35 - -GMS.RegisterCombi( COMBI, "gms_stonefurnace" ) - -/* ------------------------ Copper Furnace ------------------------*/ - -/* Iron Ore to Iron */ -local COMBI = {} - -COMBI.Name = "Iron" -COMBI.Description = "Iron can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_copperfurnace" - -COMBI.Req = {} -COMBI.Req["Iron_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Iron"] = 1 - -GMS.RegisterCombi( COMBI, "gms_copperfurnace" ) - -/* Iron Ore to Iron x5 */ -local COMBI = {} - -COMBI.Name = "Iron 5x" -COMBI.Description = "Iron can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_copperfurnace" - -COMBI.Req = {} -COMBI.Req["Iron_Ore"] = 5 - -COMBI.Results = {} -COMBI.Results["Iron"] = 5 - -GMS.RegisterCombi( COMBI, "gms_copperfurnace" ) - -/* Iron Ore to Iron x10 */ -local COMBI = {} - -COMBI.Name = "Iron 10x" -COMBI.Description = "Iron can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_copperfurnace" - -COMBI.Req = {} -COMBI.Req["Iron_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Iron"] = 10 - -GMS.RegisterCombi( COMBI, "gms_copperfurnace" ) - -/* Iron Ore to Iron x25 */ -local COMBI = {} - -COMBI.Name = "Iron 25x" -COMBI.Description = "Iron can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_copperfurnace" - -COMBI.Req = {} -COMBI.Req["Iron_Ore"] = 25 - -COMBI.Results = {} -COMBI.Results["Iron"] = 25 - -GMS.RegisterCombi( COMBI, "gms_copperfurnace" ) - -/* Allsmelt Iron */ -local COMBI = {} - -COMBI.Name = "All Iron" -COMBI.Description = "Iron can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_copperfurnace" - -COMBI.Req = {} -COMBI.Req["Iron_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Iron"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_copperfurnace" ) - -/* Sulphur */ -local COMBI = {} - -COMBI.Name = "Sulphur 5x" -COMBI.Description = "Used in the production of gunpowder, refine from rocks." -COMBI.Entity = "gms_copperfurnace" - -COMBI.Req = {} -COMBI.Req["Stone"] = 10 - -COMBI.Results = {} -COMBI.Results["Sulphur"] = 5 - -GMS.RegisterCombi( COMBI, "gms_copperfurnace" ) - -/* Sulphur 10 */ -local COMBI = {} - -COMBI.Name = "Sulphur 10x" -COMBI.Description = "Used in the production of gunpowder, refine from rocks." -COMBI.Entity = "gms_copperfurnace" - -COMBI.Req = {} -COMBI.Req["Stone"] = 20 - -COMBI.Results = {} -COMBI.Results["Sulphur"] = 10 - -GMS.RegisterCombi( COMBI, "gms_copperfurnace" ) - -/* ------------------------ Iron Furnace ------------------------*/ - -/* All Tech */ -local COMBI = {} - -COMBI.Name = "All Tech" -COMBI.Description = "Tech can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_ironfurnace" - -COMBI.Req = {} -COMBI.Req["Tech_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Tech"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_ironfurnace" ) - -/* 1 Tech */ -local COMBI = {} - -COMBI.Name = "Tech" -COMBI.Description = "Tech can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_ironfurnace" - -COMBI.Req = {} -COMBI.Req["Tech_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Tech"] = 1 - -GMS.RegisterCombi( COMBI, "gms_ironfurnace" ) - -/* 5 Tech */ -local COMBI = {} - -COMBI.Name = "Tech 5x" -COMBI.Description = "Tech can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_ironfurnace" - -COMBI.Req = {} -COMBI.Req["Tech_Ore"] = 5 - -COMBI.Results = {} -COMBI.Results["Tech"] = 5 - -GMS.RegisterCombi( COMBI, "gms_ironfurnace" ) - -/* 10 Tech */ -local COMBI = {} - -COMBI.Name = "Tech 10x" -COMBI.Description = "Tech can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_ironfurnace" - -COMBI.Req = {} -COMBI.Req["Tech_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Tech"] = 10 - -GMS.RegisterCombi( COMBI, "gms_ironfurnace" ) - -/* 25 Tech */ -local COMBI = {} - -COMBI.Name = "Tech 25x" -COMBI.Description = "Tech can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_ironfurnace" - -COMBI.Req = {} -COMBI.Req["Tech_Ore"] = 25 - -COMBI.Results = {} -COMBI.Results["Tech"] = 25 - -GMS.RegisterCombi( COMBI, "gms_ironfurnace" ) - - -/* Glass */ -local COMBI = {} - -COMBI.Name = "Glass" -COMBI.Description = "Glass can be used for making bottles and lighting." -COMBI.Entity = "gms_ironfurnace" - -COMBI.Req = {} -COMBI.Req["Sand"] = 2 - -COMBI.Results = {} -COMBI.Results["Glass"] = 1 - -GMS.RegisterCombi( COMBI, "gms_ironfurnace" ) - -/* Charcoal */ -local COMBI = {} - -COMBI.Name = "Charcoal" -COMBI.Description = "Used in the production of gunpowder." -COMBI.Entity = "gms_ironfurnace" - -COMBI.Req = {} -COMBI.Req["Wood"] = 5 - -COMBI.Results = {} -COMBI.Results["Charcoal"] = 1 - -GMS.RegisterCombi( COMBI, "gms_ironfurnace" ) - -/* Charcoal 10x */ -local COMBI = {} - -COMBI.Name = "Charcoal 10x" -COMBI.Description = "Used in the production of gunpowder." -COMBI.Entity = "gms_ironfurnace" - -COMBI.Req = {} -COMBI.Req["Wood"] = 50 - -COMBI.Results = {} -COMBI.Results["Charcoal"] = 10 - -GMS.RegisterCombi( COMBI, "gms_ironfurnace" ) - -/* ------------------------ Tech Furnace ------------------------*/ - -/* All Silver */ -local COMBI = {} - -COMBI.Name = "All Silver" -COMBI.Description = "Silver can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_techfurnace" - -COMBI.Req = {} -COMBI.Req["Silver_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Silver"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_techfurnace" ) - -/* 1 Silver */ -local COMBI = {} - -COMBI.Name = "Silver" -COMBI.Description = "Silver can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_techfurnace" - -COMBI.Req = {} -COMBI.Req["Silver_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Silver"] = 1 - -GMS.RegisterCombi( COMBI, "gms_techfurnace" ) - -/* 5 Silver */ -local COMBI = {} - -COMBI.Name = "Silver 5x" -COMBI.Description = "Silver can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_techfurnace" - -COMBI.Req = {} -COMBI.Req["Silver_Ore"] = 5 - -COMBI.Results = {} -COMBI.Results["Silver"] = 5 - -GMS.RegisterCombi( COMBI, "gms_techfurnace" ) - -/* 10 Silver */ -local COMBI = {} - -COMBI.Name = "Silver 10x" -COMBI.Description = "Silver can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_techfurnace" - -COMBI.Req = {} -COMBI.Req["Silver_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Silver"] = 10 - -GMS.RegisterCombi( COMBI, "gms_techfurnace" ) - -/* 25 Silver */ -local COMBI = {} - -COMBI.Name = "Silver 25x" -COMBI.Description = "Silver can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_techfurnace" - -COMBI.Req = {} -COMBI.Req["Silver_Ore"] = 25 - -COMBI.Results = {} -COMBI.Results["Silver"] = 25 - -GMS.RegisterCombi( COMBI, "gms_techfurnace" ) - -/* ------------------------ Silver Furnace ------------------------*/ - -/* 1 Gold */ -local COMBI = {} - -COMBI.Name = "Gold" -COMBI.Description = "Gold can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_silverfurnace" - -COMBI.Req = {} -COMBI.Req["Gold_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Gold"] = 1 - -GMS.RegisterCombi( COMBI, "gms_silverfurnace" ) - -/* 5 Gold */ -local COMBI = {} - -COMBI.Name = "Gold 5x" -COMBI.Description = "Gold can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_silverfurnace" - -COMBI.Req = {} -COMBI.Req["Gold_Ore"] = 5 - -COMBI.Results = {} -COMBI.Results["Gold"] = 5 - -GMS.RegisterCombi( COMBI, "gms_silverfurnace" ) - -/* 10 Gold */ -local COMBI = {} - -COMBI.Name = "Gold 10x" -COMBI.Description = "Gold can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_silverfurnace" - -COMBI.Req = {} -COMBI.Req["Gold_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Gold"] = 10 - -GMS.RegisterCombi( COMBI, "gms_silverfurnace" ) - -/* 25 Gold */ -local COMBI = {} - -COMBI.Name = "Gold 25x" -COMBI.Description = "Gold can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_silverfurnace" - -COMBI.Req = {} -COMBI.Req["Gold_Ore"] = 25 - -COMBI.Results = {} -COMBI.Results["Gold"] = 25 - -GMS.RegisterCombi( COMBI, "gms_silverfurnace" ) - -/* All Gold */ -local COMBI = {} - -COMBI.Name = "Gold" -COMBI.Description = "Gold can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_silverfurnace" - -COMBI.Req = {} -COMBI.Req["Gold_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Gold"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_silverfurnace" ) - -/* ------------------------ Gold Furnace ------------------------*/ - -/* 1 Steel */ -local COMBI = {} - -COMBI.Name = "Steel" -COMBI.Description = "Steel can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_goldfurnace" - -COMBI.Req = {} -COMBI.Req["Steel_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Steel"] = 1 - -GMS.RegisterCombi( COMBI, "gms_goldfurnace" ) - -/* 5 Steel */ -local COMBI = {} - -COMBI.Name = "Steel 5x" -COMBI.Description = "Steel can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_goldfurnace" - -COMBI.Req = {} -COMBI.Req["Steel_Ore"] = 5 - -COMBI.Results = {} -COMBI.Results["Steel"] = 5 - -GMS.RegisterCombi( COMBI, "gms_goldfurnace" ) - -/* 10 Steel */ -local COMBI = {} - -COMBI.Name = "Steel 10x" -COMBI.Description = "Steel can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_goldfurnace" - -COMBI.Req = {} -COMBI.Req["Steel_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Steel"] = 10 - -GMS.RegisterCombi( COMBI, "gms_goldfurnace" ) - -/* 25 Steel */ -local COMBI = {} - -COMBI.Name = "Steel 25x" -COMBI.Description = "Steel can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_goldfurnace" - -COMBI.Req = {} -COMBI.Req["Steel_Ore"] = 25 - -COMBI.Results = {} -COMBI.Results["Steel"] = 25 - -GMS.RegisterCombi( COMBI, "gms_goldfurnace" ) - -/* All Steel */ -local COMBI = {} - -COMBI.Name = "Steel" -COMBI.Description = "Steel can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_goldfurnace" - -COMBI.Req = {} -COMBI.Req["Steel_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Steel"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_goldfurnace" ) - -/* ------------------------ Steel Furnace ------------------------*/ - -/* 1 Platinum */ -local COMBI = {} - -COMBI.Name = "Platinum" -COMBI.Description = "Platinum can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_steelfurnace" - -COMBI.Req = {} -COMBI.Req["Platinum_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Platinum"] = 1 - -GMS.RegisterCombi( COMBI, "gms_steelfurnace" ) - -/* 5 Platinum */ -local COMBI = {} - -COMBI.Name = "Platinum 5x" -COMBI.Description = "Platinum can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_steelfurnace" - -COMBI.Req = {} -COMBI.Req["Platinum_Ore"] = 5 - -COMBI.Results = {} -COMBI.Results["Platinum"] = 5 - -GMS.RegisterCombi( COMBI, "gms_steelfurnace" ) - -/* 10 Platinum */ -local COMBI = {} - -COMBI.Name = "Platinum 10x" -COMBI.Description = "Platinum can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_steelfurnace" - -COMBI.Req = {} -COMBI.Req["Platinum_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Platinum"] = 10 - -GMS.RegisterCombi( COMBI, "gms_steelfurnace" ) - -/* 25 Platinum */ -local COMBI = {} - -COMBI.Name = "Platinum 25x" -COMBI.Description = "Platinum can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_steelfurnace" - -COMBI.Req = {} -COMBI.Req["Platinum_Ore"] = 25 - -COMBI.Results = {} -COMBI.Results["Platinum"] = 25 - -GMS.RegisterCombi( COMBI, "gms_steelfurnace" ) - -/* All Platinum */ -local COMBI = {} - -COMBI.Name = "Platinum" -COMBI.Description = "Platinum can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_steelfurnace" - -COMBI.Req = {} -COMBI.Req["Platinum_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Platinum"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_steelfurnace" ) - -/*------------------------ Factory ------------------------*/ - -/* Glass ( 10 ) */ -local COMBI = {} - -COMBI.Name = "Glass 10x" -COMBI.Description = "Heats 25 sand together to form 10 glass." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Sand"] = 25 - -COMBI.Results = {} -COMBI.Results["Glass"] = 10 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Glass ( 25 ) */ -local COMBI = {} - -COMBI.Name = "Glass 25x" -COMBI.Description = "Heats 50 sand together to form 25 glass." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Sand"] = 50 - -COMBI.Results = {} -COMBI.Results["Glass"] = 25 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Glass ( 50 ) */ -local COMBI = {} - -COMBI.Name = "Glass 50x" -COMBI.Description = "Heats 75 sand together to form 50 glass." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Sand"] = 75 - -COMBI.Results = {} -COMBI.Results["Glass"] = 50 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Iron from Stone ( 10 ) */ -local COMBI = {} - -COMBI.Name = "Iron 10x" -COMBI.Description = "Smelting together 25 stone forms 10 iron." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Stone"] = 25 - -COMBI.Results = {} -COMBI.Results["Iron"] = 10 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Iron from Stone ( 25 ) */ -local COMBI = {} - -COMBI.Name = "Iron 25x" -COMBI.Description = "Smelting together 50 stone forms 25 iron." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Stone"] = 50 - -COMBI.Results = {} -COMBI.Results["Iron"] = 25 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Iron from Stone ( 50 ) */ -local COMBI = {} - -COMBI.Name = "Iron 50x" -COMBI.Description = "Smelting together 75 stone forms 50 iron." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Stone"] = 75 - -COMBI.Results = {} -COMBI.Results["Iron"] = 50 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Allsmelt Iron */ -local COMBI = {} - -COMBI.Name = "All Iron" -COMBI.Description = "Iron can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Iron_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Iron"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 200 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Allsmelt Copper */ -local COMBI = {} - -COMBI.Name = "All Copper" -COMBI.Description = "Copper can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Copper_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Copper"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 200 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Stone to Sand ( 10 ) */ -local COMBI = {} - -COMBI.Name = "Sand 10x" -COMBI.Description = "Crushes 10 stone to 10 sand." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Stone"] = 10 - -COMBI.Results = {} -COMBI.Results["Sand"] = 10 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Stone to Sand ( 25 ) */ -local COMBI = {} - -COMBI.Name = "Sand 25x" -COMBI.Description = "Crushes 20 stone to 25 sand." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Stone"] = 20 - -COMBI.Results = {} -COMBI.Results["Sand"] = 25 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Stone to Sand ( 50 ) */ -local COMBI = {} - -COMBI.Name = "Sand 50x" -COMBI.Description = "Crushes 30 stone to 50 sand." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Stone"] = 30 - -COMBI.Results = {} -COMBI.Results["Sand"] = 50 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Resin ( 5 ) */ -local COMBI = {} - -COMBI.Name = "Resin 5x" -COMBI.Description = "Extracts the resin from the wood." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Wood"] = 15 -COMBI.Req["Water_Bottles"] = 1 - -COMBI.Results = {} -COMBI.Results["Resin"] = 5 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Resin ( 10 ) */ -local COMBI = {} - -COMBI.Name = "Resin 10x" -COMBI.Description = "Extracts the resin from the wood." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Wood"] = 25 -COMBI.Req["Water_Bottles"] = 2 - -COMBI.Results = {} -COMBI.Results["Resin"] = 10 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Resin ( 25 ) */ -local COMBI = {} - -COMBI.Name = "Resin 25x" -COMBI.Description = "Extracts the resin from the wood." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Wood"] = 50 -COMBI.Req["Water_Bottles"] = 4 - -COMBI.Results = {} -COMBI.Results["Resin"] = 25 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Plastic ( 10 ) */ -local COMBI = {} - -COMBI.Name = "Plastic 10x" -COMBI.Description = "Solidifies the Resin, creating a natural plastic." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Resin"] = 10 - -COMBI.Results = {} -COMBI.Results["Plastic"] = 10 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* Plastic ( 25 ) */ -local COMBI = {} - -COMBI.Name = "Plastic 25x" -COMBI.Description = "Solidifies the Resin, creating a natural plastic." -COMBI.Entity = "gms_factory" - -COMBI.Req = {} -COMBI.Req["Resin"] = 20 - -COMBI.Results = {} -COMBI.Results["Plastic"] = 25 - -GMS.RegisterCombi( COMBI, "gms_factory" ) - -/* ------------------------ Grinding Stone ------------------------*/ - -/* Stone to Sand x1 */ -local COMBI = {} - -COMBI.Name = "Sand" -COMBI.Description = "Converts 1 stone to 1 sand." -COMBI.Entity = "gms_grindingstone" - -COMBI.Req = {} -COMBI.Req["Stone"] = 1 - -COMBI.Results = {} -COMBI.Results["Sand"] = 1 - -GMS.RegisterCombi( COMBI, "gms_grindingstone" ) - -/* Stone to Sand x5 */ -local COMBI = {} - -COMBI.Name = "Sand 5x" -COMBI.Description = "Converts 5 stone to 5 sand." -COMBI.Entity = "gms_grindingstone" - -COMBI.Req = {} -COMBI.Req["Stone"] = 5 - -COMBI.Results = {} -COMBI.Results["Sand"] = 5 - -GMS.RegisterCombi( COMBI, "gms_grindingstone" ) - -/* Stone to Sand x10 */ -local COMBI = {} - -COMBI.Name = "Sand10" -COMBI.Description = "Converts 10 stone to 10 sand." -COMBI.Entity = "gms_grindingstone" - -COMBI.Req = {} -COMBI.Req["Stone"] = 10 - -COMBI.Results = {} -COMBI.Results["Sand"] = 10 - -GMS.RegisterCombi( COMBI, "gms_grindingstone" ) - -/* Grain to Flour x1 */ -local COMBI = {} - -COMBI.Name = "Flour" -COMBI.Description = "Converts 2 Grain Seeds to 1 Flour." -COMBI.Entity = "gms_grindingstone" - -COMBI.Req = {} -COMBI.Req["Grain_Seeds"] = 2 - -COMBI.Results = {} -COMBI.Results["Flour"] = 1 - -GMS.RegisterCombi( COMBI, "gms_grindingstone" ) - -/* Grain to Flour x5 */ -local COMBI = {} - -COMBI.Name = "Flour 5x" -COMBI.Description = "Converts 5 Grain Seeds to 3 Flour." -COMBI.Entity = "gms_grindingstone" - -COMBI.Req = {} -COMBI.Req["Grain_Seeds"] = 5 - -COMBI.Results = {} -COMBI.Results["Flour"] = 3 - -GMS.RegisterCombi( COMBI, "gms_grindingstone" ) - -/* Grain to Flour x10 */ -local COMBI = {} - -COMBI.Name = "Flour 10x" -COMBI.Description = "Converts 10 Grain Seeds to 7 Flour." -COMBI.Entity = "gms_grindingstone" - -COMBI.Req = {} -COMBI.Req["Grain_Seeds"] = 10 - -COMBI.Results = {} -COMBI.Results["Flour"] = 7 - -GMS.RegisterCombi( COMBI, "gms_grindingstone" ) - -/* All Grain to Flour*/ -local COMBI = {} - -COMBI.Name = "All Flour" -COMBI.Description = "Converts Grain Seeds to Flour ( 10:6 )." -COMBI.Entity = "gms_grindingstone" - -COMBI.Req = {} -COMBI.Req["Grain_Seeds"] = 1 - -COMBI.Results = {} -COMBI.Results["Flour"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 25 - -GMS.RegisterCombi( COMBI, "gms_grindingstone" ) - -/*------------------------ Cooking ------------------------*/ - -/* Casserole */ -local COMBI = {} - -COMBI.Name = "Casserole" -COMBI.Description = "Put a little spiced trout over the fire to make this delicious casserole." -COMBI.Entity = "gms_stove" - -COMBI.Req = {} -COMBI.Req["Trout"] = 1 -COMBI.Req["Herbs"] = 3 -COMBI.FoodValue = 400 - -GMS.RegisterCombi( COMBI, "Cooking" ) - -/* Fried meat */ -local COMBI = {} - -COMBI.Name = "Fried Meat" -COMBI.Description = "Simple fried meat." -COMBI.Entity = "gms_stove" - -COMBI.Req = {} -COMBI.Req["Meat"] = 1 - -COMBI.FoodValue = 250 - -GMS.RegisterCombi( COMBI, "Cooking" ) - -/* Sushi */ -local COMBI = {} - -COMBI.Name = "Sushi" -COMBI.Description = "For when you like your fish raw." -COMBI.Entity = "gms_stove" - -COMBI.Req = {} -COMBI.Req["Bass"] = 2 - -COMBI.FoodValue = 300 - -GMS.RegisterCombi( COMBI, "Cooking" ) - -/* Fish soup */ -local COMBI = {} - -COMBI.Name = "Fish Soup" -COMBI.Description = "Fish soup, pretty good!" -COMBI.Entity = "gms_stove" - -COMBI.Req = {} -COMBI.Req["Bass"] = 1 -COMBI.Req["Trout"] = 1 -COMBI.Req["Spices"] = 2 -COMBI.Req["Water_Bottles"] = 2 - -COMBI.SkillReq = {} -COMBI.SkillReq["Cooking"] = 2 - -COMBI.FoodValue = 400 - -GMS.RegisterCombi( COMBI, "Cooking" ) - -/* Meatballs */ -local COMBI = {} - -COMBI.Name = "Meatballs" -COMBI.Description = "Processed meat." -COMBI.Entity = "gms_stove" - -COMBI.Req = {} -COMBI.Req["Meat"] = 1 -COMBI.Req["Spices"] = 1 -COMBI.Req["Water_Bottles"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Cooking"] = 2 - -COMBI.FoodValue = 400 - -GMS.RegisterCombi( COMBI, "Cooking" ) - -/* Fried fish */ -local COMBI = {} - -COMBI.Name = "Fried Fish" -COMBI.Description = "Simple fried fish." -COMBI.Entity = "gms_stove" - -COMBI.Req = {} -COMBI.Req["Bass"] = 1 -COMBI.FoodValue = 200 - -GMS.RegisterCombi( COMBI, "Cooking" ) - -/* Berry Pie */ -local COMBI = {} - -COMBI.Name = "Berry Pie" -COMBI.Description = "Yummy, berry pie reminds me of home!" -COMBI.Entity = "gms_stove" - -COMBI.Req = {} -COMBI.Req["Dough"] = 2 -COMBI.Req["Water_Bottles"] = 2 -COMBI.Req["Berries"] = 5 - -COMBI.SkillReq = {} -COMBI.SkillReq["Cooking"] = 5 - -COMBI.FoodValue = 700 - -GMS.RegisterCombi( COMBI, "Cooking" ) - -/* Rock cake */ -local COMBI = {} - -COMBI.Name = "Rock Cake" -COMBI.Description = "Crunchy!" -COMBI.Entity = "gms_stove" - -COMBI.Req = {} -COMBI.Req["Iron"] = 2 -COMBI.Req["Herbs"] = 1 -COMBI.FoodValue = 50 - -GMS.RegisterCombi( COMBI, "Cooking" ) - -/* Salad */ -local COMBI = {} - -COMBI.Name = "Salad" -COMBI.Description = "Everything for survival, I guess." -COMBI.Entity = "gms_stove" - -COMBI.Req = {} -COMBI.Req["Herbs"] = 2 -COMBI.FoodValue = 100 - -GMS.RegisterCombi( COMBI, "Cooking" ) - -/* Meal */ -local COMBI = {} - -COMBI.Name = "Meal" -COMBI.Description = "The ultimate meal. Delicious!" -COMBI.Entity = "gms_stove" - -COMBI.Req = {} -COMBI.Req["Herbs"] = 5 -COMBI.Req["Salmon"] = 1 -COMBI.Req["Meat"] = 2 -COMBI.Req["Spices"] = 3 - -COMBI.SkillReq = {} -COMBI.SkillReq["Cooking"] = 20 - -COMBI.FoodValue = 1000 - -GMS.RegisterCombi( COMBI, "Cooking" ) - -/* Shark soup */ -local COMBI = {} - -COMBI.Name = "Shark Soup" -COMBI.Description = "Man this is good." -COMBI.Entity = "gms_stove" - -COMBI.Req = {} -COMBI.Req["Shark"] = 2 -COMBI.Req["Herbs"] = 3 -COMBI.Req["Spices"] = 2 - -COMBI.SkillReq = {} -COMBI.SkillReq["Cooking"] = 15 - -COMBI.FoodValue = 850 - -GMS.RegisterCombi( COMBI, "Cooking" ) - -/* Bread */ -local COMBI = {} - -COMBI.Name = "Bread" -COMBI.Description = "Good old bread." -COMBI.Entity = "gms_stove" - -COMBI.Req = {} -COMBI.Req["Dough"] = 2 -COMBI.Req["Water_Bottles"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Cooking"] = 5 - -COMBI.FoodValue = 800 - -GMS.RegisterCombi( COMBI, "Cooking" ) - -/* Hamburger */ -local COMBI = {} - -COMBI.Name = "Hamburger" -COMBI.Description = "A hamburger! Yummy!" -COMBI.Entity = "gms_stove" - -COMBI.Req = {} -COMBI.Req["Dough"] = 2 -COMBI.Req["Water_Bottles"] = 1 -COMBI.Req["Meat"] = 2 - -COMBI.SkillReq = {} -COMBI.SkillReq["Cooking"] = 3 - -COMBI.FoodValue = 850 - -GMS.RegisterCombi( COMBI, "Cooking" ) - -/* ------------------------ Stone Workbench ------------------------*/ - -/* Stone Hatchet */ -local COMBI = {} - -COMBI.Name = "Stone Hatchet" -COMBI.Description = "This small stone axe is ideal for chopping down trees." -COMBI.Entity = "gms_stoneworkbench" - -COMBI.Req = {} -COMBI.Req["Stone"] = 10 -COMBI.Req["Wood"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_stonehatchet" - -GMS.RegisterCombi( COMBI, "gms_stoneworkbench" ) - -/* Wooden Spoon */ -local COMBI = {} - -COMBI.Name = "Wooden Spoon" -COMBI.Description = "Allows you to salvage more seeds from consumed fruit." -COMBI.Entity = "gms_stoneworkbench" - -COMBI.Req = {} -COMBI.Req["Wood"] = 12 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 3 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_woodenspoon" - -GMS.RegisterCombi( COMBI, "gms_stoneworkbench" ) - -/* Stone Pickaxe */ -local COMBI = {} - -COMBI.Name = "Stone Pickaxe" -COMBI.Description = "This stone pickaxe is used for effectively mining stone and copper ore." -COMBI.Entity = "gms_stoneworkbench" - -COMBI.Req = {} -COMBI.Req["Stone"] = 10 -COMBI.Req["Wood"] = 10 -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_stonepickaxe" - -GMS.RegisterCombi( COMBI, "gms_stoneworkbench" ) - -/* Fishing rod */ -local COMBI = {} - -COMBI.Name = "Wooden Fishing Rod" -COMBI.Description = "This rod of wood can be used to fish from a lake." -COMBI.Entity = "gms_stoneworkbench" - -COMBI.Req = {} -COMBI.Req["Rope"] = 1 -COMBI.Req["Wood"] = 20 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 4 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_woodenfishingrod" - -GMS.RegisterCombi( COMBI, "gms_stoneworkbench" ) - -/* ------------------------ Copper Workbench ------------------------*/ - -/* Copper Hatchet */ -local COMBI = {} - -COMBI.Name = "Copper Hatchet" -COMBI.Description = "This copper axe is ideal for chopping down trees." -COMBI.Entity = "gms_copperworkbench" - -COMBI.Req = {} -COMBI.Req["Copper"] = 15 -COMBI.Req["Wood"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_copperhatchet" - -GMS.RegisterCombi( COMBI, "gms_copperworkbench" ) - -/* Copper Hammer */ -local COMBI = {} - -COMBI.Name = "Wrench" -COMBI.Description = "This wrench is ideal for crafting weapons." -COMBI.Entity = "gms_copperworkbench" - -COMBI.Req = {} -COMBI.Req["Copper"] = 10 -COMBI.Req["Wood"] = 10 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 5 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_wrench" - -GMS.RegisterCombi( COMBI, "gms_copperworkbench" ) - -/* Copper Pickaxe */ -local COMBI = {} - -COMBI.Name = "Copper Pickaxe" -COMBI.Description = "This copper pickaxe is used for effectively mining stone, copper ore and iron ore." -COMBI.Entity = "gms_copperworkbench" - -COMBI.Req = {} -COMBI.Req["Copper"] = 15 -COMBI.Req["Wood"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_copperpickaxe" - -GMS.RegisterCombi( COMBI, "gms_copperworkbench" ) - -/* Frying pan */ -local COMBI = {} - -COMBI.Name = "Frying Pan" -COMBI.Description = "This kitchen tool is used for more effective cooking." -COMBI.Entity = "gms_copperworkbench" - -COMBI.Req = {} -COMBI.Req["Copper"] = 20 -COMBI.Req["Wood"] = 5 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 5 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_fryingpan" - -GMS.RegisterCombi( COMBI, "gms_copperworkbench" ) - -/* Shovel */ -local COMBI = {} - -COMBI.Name = "Shovel" -COMBI.Description = "This tool can dig up rocks, and decreases forage times." -COMBI.Entity = "gms_copperworkbench" - -COMBI.Req = {} -COMBI.Req["Copper"] = 15 -COMBI.Req["Wood"] = 15 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 8 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_shovel" - -GMS.RegisterCombi( COMBI, "gms_copperworkbench" ) - -/* Crowbar */ -local COMBI = {} - -COMBI.Name = "Crowbar" -COMBI.Description = "This weapon is initially a tool, but pretty useless for it's original purpose on a stranded Island." -COMBI.Entity = "gms_copperworkbench" - -COMBI.Req = {} -COMBI.Req["Copper"] = 20 -COMBI.Req["Iron"] = 20 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 6 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "weapon_crowbar" - -GMS.RegisterCombi( COMBI, "gms_copperworkbench" ) - -/* ------------------------ Iron Workbench ------------------------*/ - -/* Sickle */ -local COMBI = {} - -COMBI.Name = "Sickle" -COMBI.Description = "This tool effectivizes harvesting." -COMBI.Entity = "gms_ironworkbench" - -COMBI.Req = {} -COMBI.Req["Iron"] = 5 -COMBI.Req["Wood"] = 15 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 7 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_sickle" - -GMS.RegisterCombi( COMBI, "gms_ironworkbench" ) - -/* Strainer */ -local COMBI = {} - -COMBI.Name = "Strainer" -COMBI.Description = "This tool can filter the earth for resources." -COMBI.Entity = "gms_ironworkbench" - -COMBI.Req = {} -COMBI.Req["Iron"] = 5 -COMBI.Req["Wood"] = 5 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_strainer" - -GMS.RegisterCombi( COMBI, "gms_ironworkbench" ) - -/* Advanced Fishing rod */ -local COMBI = {} - -COMBI.Name = "Advanced Fishing rod" -COMBI.Description = "With this Fishing rod you can catch rare fish even faster. You might even catch something big." -COMBI.Entity = "gms_ironworkbench" - -COMBI.Req = {} -COMBI.Req["Iron"] = 25 -COMBI.Req["Wood"] = 30 -COMBI.Req["Rope"] = 2 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 15 -COMBI.SkillReq["Fishing"] = 5 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_advancedfishingrod" - -GMS.RegisterCombi( COMBI, "gms_ironworkbench" ) - -/* Iron Pickaxe */ -local COMBI = {} - -COMBI.Name = "Iron Pickaxe" -COMBI.Description = "This iron pickaxe is used for effectively mining stone, copper ore, iron ore, and tech ore." -COMBI.Entity = "gms_ironworkbench" - -COMBI.Req = {} -COMBI.Req["Iron"] = 20 -COMBI.Req["Wood"] = 10 -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_ironpickaxe" - -GMS.RegisterCombi( COMBI, "gms_ironworkbench" ) - -/* Iron Hatchet */ -local COMBI = {} - -COMBI.Name = "Iron Hatchet" -COMBI.Description = "This iron axe is ideal for chopping down trees." -COMBI.Entity = "gms_ironworkbench" - -COMBI.Req = {} -COMBI.Req["Iron"] = 20 -COMBI.Req["Wood"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_ironhatchet" - -GMS.RegisterCombi( COMBI, "gms_ironworkbench" ) - - -/*------------------------ Gun Lab ------------------------*/ - -/*HL2 Smg */ -local COMBI = {} - -COMBI.Name = "HL2 Machine Gun" -COMBI.Description = "Just a simple Machine Gun." -COMBI.Entity = "gms_smggunlab" - -COMBI.Req = {} -COMBI.Req["Copper Gunslide"] = 1 -COMBI.Req["Copper Gungrip"] = 1 -COMBI.Req["Copper Gunbarrel"] = 1 -COMBI.Req["Copper Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 15 -COMBI.SkillReq["Hunting"] = 15 - -COMBI.Texture = "gms_icons/weapon_smg1.png" -COMBI.SwepClass = "weapon_smg1" - -GMS.RegisterCombi( COMBI, "gms_smggunlab" ) - -/* HL2 Pistol */ -local COMBI = {} - -COMBI.Name = "Pistol" -COMBI.Description = "It's not great, but it does the job. Your first ordinary Pistol." -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Copper Gunslide"] = 1 -COMBI.Req["Copper Gungrip"] = 1 -COMBI.Req["Copper Gunbarrel"] = 1 -COMBI.Req["Copper Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 10 -COMBI.SkillReq["Hunting"] = 8 - -COMBI.Texture = "gms_icons/weapon_pistol.png" -COMBI.SwepClass = "weapon_pistol" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - -local COMBI = {} - -COMBI.Name = "HL2 Shotgun" -COMBI.Description = "Just a simple Shotgun. Left click for single shot, right click for double shots" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Iron Gunslide"] = 1 -COMBI.Req["Iron Gungrip"] = 1 -COMBI.Req["Iron Gunbarrel"] = 1 -COMBI.Req["Iron Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 25 -COMBI.SkillReq["Hunting"] = 20 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "weapon_shotgun" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - -local COMBI = {} - -COMBI.Name = "HL2 Crossbow" -COMBI.Description = "A very Medieval weapon, shoots bolts with left click and zooms in with right click" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Tech Gunslide"] = 1 -COMBI.Req["Tech Gungrip"] = 1 -COMBI.Req["Tech Gunbarrel"] = 1 -COMBI.Req["Tech Gunmagazine"] = 1 -COMBI.Req["Tech WeaponScope"] = 1 -COMBI.Req["Rope"] = 2 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 75 -COMBI.SkillReq["Hunting"] = 70 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "weapon_crossbow" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - -/*------------------------ Gun Chunks ------------------------*/ - -/* Copper Gunslide */ -local COMBI = {} - -COMBI.Name = "Copper Gunslide" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Copper"] = 15 -COMBI.Req["Wood"] = 20 - -COMBI.Results = {} -COMBI.Results["Copper Gunslide"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Copper Gunbarrel */ -local COMBI = {} - -COMBI.Name = "Copper Gunbarrel" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Copper"] = 15 -COMBI.Req["Wood"] = 20 - -COMBI.Results = {} -COMBI.Results["Copper Gunbarrel"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Copper Gungrip */ -local COMBI = {} - -COMBI.Name = "Copper Gungrip" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Copper"] = 15 -COMBI.Req["Wood"] = 20 - -COMBI.Results = {} -COMBI.Results["Copper Gungrip"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Copper Gunmagazine */ -local COMBI = {} - -COMBI.Name = "Copper Gunmagazine" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Copper"] = 15 -COMBI.Req["Wood"] = 20 -COMBI.Req["Gunpowder"] = 10 - -COMBI.Results = {} -COMBI.Results["Copper Gunmagazine"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Copper Weapon Scope */ -local COMBI = {} - -COMBI.Name = "Copper Weapon Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Copper"] = 25 - -COMBI.Results = {} -COMBI.Results["Copper Weapon Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - - -/* Copper Reflex Scope */ -local COMBI = {} - -COMBI.Name = "Copper Reflex Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Copper"] = 25 - -COMBI.Results = {} -COMBI.Results["Copper Reflex Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Iron Gunslide */ -local COMBI = {} - -COMBI.Name = "Iron Gunslide" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Iron"] = 20 -COMBI.Req["Oak"] = 20 - -COMBI.Results = {} -COMBI.Results["Iron Gunslide"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Iron Gunbarrel */ -local COMBI = {} - -COMBI.Name = "Iron Gunbarrel" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Iron"] = 20 -COMBI.Req["Oak"] = 20 - -COMBI.Results = {} -COMBI.Results["Iron Gunbarrel"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Iron Gungrip */ -local COMBI = {} - -COMBI.Name = "Iron Gungrip" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Iron"] = 20 -COMBI.Req["Oak"] = 20 - -COMBI.Results = {} -COMBI.Results["Iron Gungrip"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Iron Gunmagazine */ -local COMBI = {} - -COMBI.Name = "Iron Gunmagazine" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Iron"] = 20 -COMBI.Req["Oak"] = 20 -COMBI.Req["Gunpowder"] = 15 - -COMBI.Results = {} -COMBI.Results["Iron Gunmagazine"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Iron Weapon Scope */ -local COMBI = {} - -COMBI.Name = "Iron Weapon Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Iron"] = 30 - -COMBI.Results = {} -COMBI.Results["Iron Weapon Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - - -/* Iron Reflex Scope */ -local COMBI = {} - -COMBI.Name = "Iron Reflex Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Iron"] = 30 - -COMBI.Results = {} -COMBI.Results["Iron Reflex Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Tech Gunslide */ -local COMBI = {} - -COMBI.Name = "Tech Gunslide" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Tech"] = 25 -COMBI.Req["Cedar"] = 25 - -COMBI.Results = {} -COMBI.Results["Tech Gunslide"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Tech Gunbarrel */ -local COMBI = {} - -COMBI.Name = "Tech Gunbarrel" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Tech"] = 25 -COMBI.Req["Cedar"] = 25 - -COMBI.Results = {} -COMBI.Results["Tech Gunbarrel"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Tech Gungrip */ -local COMBI = {} - -COMBI.Name = "Tech Gungrip" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Tech"] = 25 -COMBI.Req["Cedar"] = 25 - -COMBI.Results = {} -COMBI.Results["Tech Gungrip"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Tech Gunmagazine */ -local COMBI = {} - -COMBI.Name = "Tech Gunmagazine" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Tech"] = 25 -COMBI.Req["Cedar"] = 15 -COMBI.Req["Gunpowder"] = 15 - -COMBI.Results = {} -COMBI.Results["Tech Gunmagazine"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Tech Weapon Scope */ -local COMBI = {} - -COMBI.Name = "Tech Weapon Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Tech"] = 35 - -COMBI.Results = {} -COMBI.Results["Tech Weapon Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - - -/* Tech Reflex Scope */ -local COMBI = {} - -COMBI.Name = "Tech Reflex Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Tech"] = 35 - -COMBI.Results = {} -COMBI.Results["Tech Reflex Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Silver Gunslide */ -local COMBI = {} - -COMBI.Name = "Silver Gunslide" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Silver"] = 30 -COMBI.Req["Maple"] = 20 - -COMBI.Results = {} -COMBI.Results["Silver Gunslide"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Silver Gunbarrel */ -local COMBI = {} - -COMBI.Name = "Silver Gunbarrel" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Silver"] = 30 -COMBI.Req["Maple"] = 20 - -COMBI.Results = {} -COMBI.Results["Silver Gunbarrel"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Silver Gungrip */ -local COMBI = {} - -COMBI.Name = "Silver Gungrip" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Silver"] = 30 -COMBI.Req["Maple"] = 20 - -COMBI.Results = {} -COMBI.Results["Silver Gungrip"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Silver Gunmagazine */ -local COMBI = {} - -COMBI.Name = "Silver Gunmagazine" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Silver"] = 30 -COMBI.Req["Maple"] = 20 -COMBI.Req["Gunpowder"] = 20 - -COMBI.Results = {} -COMBI.Results["Silver Gunmagazine"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Silver Weapon Scope */ -local COMBI = {} - -COMBI.Name = "Silver Weapon Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Silver"] = 40 - -COMBI.Results = {} -COMBI.Results["Silver Weapon Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - - -/* Silver Reflex Scope */ -local COMBI = {} - -COMBI.Name = "Silver Reflex Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Silver"] = 40 - -COMBI.Results = {} -COMBI.Results["Silver Reflex Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Gold Gunslide */ -local COMBI = {} - -COMBI.Name = "Gold Gunslide" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Gold"] = 35 -COMBI.Req["Teak"] = 25 - -COMBI.Results = {} -COMBI.Results["Gold Gunslide"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Gold Gunbarrel */ -local COMBI = {} - -COMBI.Name = "Gold Gunbarrel" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Gold"] = 35 -COMBI.Req["Teak"] = 25 - -COMBI.Results = {} -COMBI.Results["Gold Gunbarrel"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Gold Gungrip */ -local COMBI = {} - -COMBI.Name = "Gold Gungrip" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Gold"] = 35 -COMBI.Req["Teak"] = 25 - -COMBI.Results = {} -COMBI.Results["Gold Gungrip"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Gold Gunmagazine */ -local COMBI = {} - -COMBI.Name = "Gold Gunmagazine" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Gold"] = 35 -COMBI.Req["Teak"] = 25 -COMBI.Req["Gunpowder"] = 25 - -COMBI.Results = {} -COMBI.Results["Gold Gunmagazine"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Gold Weapon Scope */ -local COMBI = {} - -COMBI.Name = "Gold Weapon Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Gold"] = 45 - -COMBI.Results = {} -COMBI.Results["Gold Weapon Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - - -/* Gold Reflex Scope */ -local COMBI = {} - -COMBI.Name = "Gold Reflex Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Gold"] = 45 - -COMBI.Results = {} -COMBI.Results["Gold Reflex Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Steel Gunslide */ -local COMBI = {} - -COMBI.Name = "Steel Gunslide" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Steel"] = 40 -COMBI.Req["Mahogany"] = 30 - -COMBI.Results = {} -COMBI.Results["Steel Gunslide"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Steel Gunbarrel */ -local COMBI = {} - -COMBI.Name = "Steel Gunbarrel" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Steel"] = 40 -COMBI.Req["Mahogany"] = 30 - -COMBI.Results = {} -COMBI.Results["Steel Gunbarrel"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Steel Gungrip */ -local COMBI = {} - -COMBI.Name = "Steel Gungrip" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Steel"] = 40 -COMBI.Req["Mahogany"] = 30 - -COMBI.Results = {} -COMBI.Results["Steel Gungrip"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Steel Gunmagazine */ -local COMBI = {} - -COMBI.Name = "Steel Gunmagazine" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Steel"] = 40 -COMBI.Req["Mahogany"] = 30 -COMBI.Req["Gunpowder"] = 30 - -COMBI.Results = {} -COMBI.Results["Steel Gunmagazine"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Steel Weapon Scope */ -local COMBI = {} - -COMBI.Name = "Steel Weapon Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Steel"] = 50 - -COMBI.Results = {} -COMBI.Results["Steel Weapon Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - - -/* Steel Reflex Scope */ -local COMBI = {} - -COMBI.Name = "Steel Reflex Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Steel"] = 50 - -COMBI.Results = {} -COMBI.Results["Steel Reflex Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Platinum Gunslide */ -local COMBI = {} - -COMBI.Name = "Platinum Gunslide" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Platinum"] = 45 -COMBI.Req["Elm"] = 35 - -COMBI.Results = {} -COMBI.Results["Platinum Gunslide"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Platinum Gunbarrel */ -local COMBI = {} - -COMBI.Name = "Platinum Gunbarrel" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Platinum"] = 45 -COMBI.Req["Elm"] = 35 - -COMBI.Results = {} -COMBI.Results["Platinum Gunbarrel"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Platinum Gungrip */ -local COMBI = {} - -COMBI.Name = "Platinum Gungrip" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Platinum"] = 45 -COMBI.Req["Elm"] = 35 - -COMBI.Results = {} -COMBI.Results["Platinum Gungrip"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Platinum Gunmagazine */ -local COMBI = {} - -COMBI.Name = "Platinum Gunmagazine" -COMBI.Description = "A piece of a gun" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Platinum"] = 45 -COMBI.Req["Elm"] = 35 -COMBI.Req["Gunpowder"] = 35 - -COMBI.Results = {} -COMBI.Results["Platinum Gunmagazine"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Platinum Weapon Scope */ -local COMBI = {} - -COMBI.Name = "Platinum Weapon Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Platinum"] = 55 - -COMBI.Results = {} -COMBI.Results["Platinum Weapon Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - - -/* Platinum Reflex Scope */ -local COMBI = {} - -COMBI.Name = "Platinum Reflex Scope" -COMBI.Description = "A weapon scope" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Glass"] = 20 -COMBI.Req["Platinum"] = 55 - -COMBI.Results = {} -COMBI.Results["Platinum Reflex Scope"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Saltpetre */ -local COMBI = {} - -COMBI.Name = "Saltpetre" -COMBI.Description = "Used in making gunpowder" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Urine_Bottles"] = 1 - -COMBI.Results = {} -COMBI.Results["Saltpetre"] = 1 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Saltpetre x10 */ -local COMBI = {} - -COMBI.Name = "Saltpetre 10x" -COMBI.Description = "Used in making gunpowder" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Urine_Bottles"] = 10 - -COMBI.Results = {} -COMBI.Results["Saltpetre"] = 10 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* Gunpowder */ -local COMBI = {} - -COMBI.Name = "Gunpowder" -COMBI.Description = "Explosive!" -COMBI.Entity = "gms_gunchunks" - -COMBI.Req = {} -COMBI.Req["Sulphur"] = 5 -COMBI.Req["Charcoal"] = 10 -COMBI.Req["Saltpetre"] = 10 - -COMBI.Results = {} -COMBI.Results["Gunpowder"] = 10 - -GMS.RegisterCombi( COMBI, "gms_gunchunks" ) - -/* ------------------------------------------------------------------------ - Tech workbench ------------------------------------------------------------------------- */ - -local COMBI = {} - -COMBI.Name = "Batteries" -COMBI.Description = "These self-rechargeable batteries are used to craft stunstick, toolgun and flashlight.\nAlso the more batteries you have, the longer you can use your flashlight." - -COMBI.Req = {} -COMBI.Req["Copper"] = 3 -COMBI.Req["Iron"] = 3 - -COMBI.Results = {} -COMBI.Results["Batteries"] = 1 - -GMS.RegisterCombi( COMBI, "gms_techworkbench" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "Toolgun" -COMBI.Description = "Vital to long term survival, it allows you to easily build complex structures." -COMBI.Entity = "gms_techworkbench" - -COMBI.Req = {} -COMBI.Req["Iron"] = 30 -COMBI.Req["Wood"] = 20 -COMBI.Req["Glass"] = 5 -COMBI.Req["Batteries"] = 2 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gmod_tool" - -GMS.RegisterCombi( COMBI, "gms_techworkbench" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "Flashlight" -COMBI.Description = "Grants ability to use flashlight." - -COMBI.Req = {} -COMBI.Req["Iron"] = 15 -COMBI.Req["Glass"] = 5 -COMBI.Req["Batteries"] = 3 - -COMBI.Results = {} -COMBI.Results["Flashlight"] = 1 - -GMS.RegisterCombi( COMBI, "gms_techworkbench" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "Stunstick" -COMBI.Description = "This highly advanced, effective melee weapon is useful for hunting down animals and fellow stranded alike." -COMBI.Entity = "gms_techworkbench" - -COMBI.Req = {} -COMBI.Req["Iron"] = 40 -COMBI.Req["Batteries"] = 4 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 11 -COMBI.SkillReq["Hunting"] = 5 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "weapon_stunstick" - -GMS.RegisterCombi( COMBI, "gms_techworkbench" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "Wrist Watch" -COMBI.Description = "See the time whereever you go." -COMBI.Entity = "gms_techworkbench" - -COMBI.Results = {} -COMBI.Results["Wrist_Watch"] = 1 - -COMBI.Req = {} -COMBI.Req["Iron"] = 5 -COMBI.Req["Glass"] = 5 -COMBI.Req["Batteries"] = 2 - -GMS.RegisterCombi( COMBI, "gms_techworkbench" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "Tech Pickaxe" -COMBI.Description = "This tech pickaxe is used for effectively mining stone, copper ore, iron ore, tech ore, and silver ore." -COMBI.Entity = "gms_techworkbench" - -COMBI.Req = {} -COMBI.Req["Tech"] = 25 -COMBI.Req["Cedar"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_techpickaxe" - -GMS.RegisterCombi( COMBI, "gms_techworkbench" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "Tech Hatchet" -COMBI.Description = "This tech axe is ideal for chopping down trees." -COMBI.Entity = "gms_techworkbench" - -COMBI.Req = {} -COMBI.Req["Tech"] = 25 -COMBI.Req["Cedar"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_techhatchet" - -GMS.RegisterCombi( COMBI, "gms_techworkbench" ) - ------------------------------------------------------------------------- - -/* ------------------------------------------------------------------------ - Silver workbench ------------------------------------------------------------------------- */ - -local COMBI = {} - -COMBI.Name = "Silver Pickaxe" -COMBI.Description = "This silver pickaxe is used for effectively mining stone, copper ore, iron ore, tech ore, silver ore, and gold ore." -COMBI.Entity = "gms_silverworkbench" - -COMBI.Req = {} -COMBI.Req["Silver"] = 30 -COMBI.Req["Maple"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_silverpickaxe" - -GMS.RegisterCombi( COMBI, "gms_silverworkbench" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "Silver Hatchet" -COMBI.Description = "This silver axe is ideal for chopping down trees." -COMBI.Entity = "gms_silverworkbench" - -COMBI.Req = {} -COMBI.Req["Silver"] = 30 -COMBI.Req["Maple"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_silverhatchet" - -GMS.RegisterCombi( COMBI, "gms_silverworkbench" ) - ------------------------------------------------------------------------- - -/* ------------------------------------------------------------------------ - Gold workbench ------------------------------------------------------------------------- */ - -local COMBI = {} - -COMBI.Name = "Gold Pickaxe" -COMBI.Description = "This gold pickaxe is used for effectively mining stone, copper ore, iron ore, tech ore, silver ore, gold ore, and steel ore." -COMBI.Entity = "gms_goldworkbench" - -COMBI.Req = {} -COMBI.Req["Gold"] = 35 -COMBI.Req["Teak"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_goldpickaxe" - -GMS.RegisterCombi( COMBI, "gms_goldworkbench" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "Gold Hatchet" -COMBI.Description = "This gold axe is ideal for chopping down trees." -COMBI.Entity = "gms_goldworkbench" - -COMBI.Req = {} -COMBI.Req["Gold"] = 35 -COMBI.Req["Teak"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_goldhatchet" - -GMS.RegisterCombi( COMBI, "gms_goldworkbench" ) - ------------------------------------------------------------------------- - -/* ------------------------------------------------------------------------ - Steel workbench ------------------------------------------------------------------------- */ - -local COMBI = {} - -COMBI.Name = "Steel Pickaxe" -COMBI.Description = "This steel pickaxe is used for effectively mining stone, copper ore, iron ore, tech ore, silver ore, gold ore, steel ore, and platinum ore." -COMBI.Entity = "gms_steelworkbench" - -COMBI.Req = {} -COMBI.Req["Steel"] = 40 -COMBI.Req["Mahogany"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_steelpickaxe" - -GMS.RegisterCombi( COMBI, "gms_steelworkbench" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "Steel Hatchet" -COMBI.Description = "This Steel axe is ideal for chopping down trees." -COMBI.Entity = "gms_steelworkbench" - -COMBI.Req = {} -COMBI.Req["Steel"] = 40 -COMBI.Req["Mahogany"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_steelhatchet" - -GMS.RegisterCombi( COMBI, "gms_steelworkbench" ) - ------------------------------------------------------------------------- - -/* ------------------------------------------------------------------------ - Platinum workbench ------------------------------------------------------------------------- */ - -local COMBI = {} - -COMBI.Name = "Platinum Pickaxe" -COMBI.Description = "This platinum pickaxe is used for effectively mining stone, copper ore, iron ore, tech ore, silver ore, gold ore, steel ore, and platinum ore." -COMBI.Entity = "gms_platinumworkbench" - -COMBI.Req = {} -COMBI.Req["Platinum"] = 45 -COMBI.Req["Elm"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_platinumpickaxe" - -GMS.RegisterCombi( COMBI, "gms_platinumworkbench" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "Platinum Hatchet" -COMBI.Description = "This Platinum axe is ideal for chopping down trees." -COMBI.Entity = "gms_platinumworkbench" - -COMBI.Req = {} -COMBI.Req["Platinum"] = 45 -COMBI.Req["Elm"] = 10 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_platinumhatchet" - -GMS.RegisterCombi( COMBI, "gms_platinumworkbench" ) - ------------------------------------------------------------------------- - -/* ------------------------------------------------------------------------ - Basic Transmutator ------------------------------------------------------------------------- */ - -local COMBI = {} - -COMBI.Name = "All Oak" -COMBI.Description = "This type of wood can be used to make more advanced machinery." -COMBI.Entity = "gms_transmutator" - -COMBI.Req = {} -COMBI.Req["Wood"] = 1 -COMBI.Req["Iron"] = 1 - -COMBI.Results = {} -COMBI.Results["Oak"] = 2 - -COMBI.AllSmelt = true -COMBI.Max = 200 - -GMS.RegisterCombi( COMBI, "gms_transmutator" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "All Cedar" -COMBI.Description = "This type of wood can be used to make more advanced machinery." -COMBI.Entity = "gms_transmutator" - -COMBI.Req = {} -COMBI.Req["Oak"] = 1 -COMBI.Req["Tech"] = 1 - -COMBI.Results = {} -COMBI.Results["Cedar"] = 2 - -COMBI.AllSmelt = true -COMBI.Max = 200 - -GMS.RegisterCombi( COMBI, "gms_transmutator" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "All Maple" -COMBI.Description = "This type of wood can be used to make more advanced machinery." -COMBI.Entity = "gms_transmutator" - -COMBI.Req = {} -COMBI.Req["Cedar"] = 1 -COMBI.Req["Silver"] = 1 - -COMBI.Results = {} -COMBI.Results["Maple"] = 2 - -COMBI.AllSmelt = true -COMBI.Max = 200 - -GMS.RegisterCombi( COMBI, "gms_transmutator" ) - ------------------------------------------------------------------------- - -/* ------------------------------------------------------------------------ - Advanced Transmutator ------------------------------------------------------------------------- */ - -local COMBI = {} - -COMBI.Name = "All Teak" -COMBI.Description = "This type of wood can be used to make more advanced machinery." -COMBI.Entity = "gms_advancedtransmutator" - -COMBI.Req = {} -COMBI.Req["Maple"] = 1 -COMBI.Req["Gold"] = 1 - -COMBI.Results = {} -COMBI.Results["Teak"] = 2 - -COMBI.AllSmelt = true -COMBI.Max = 200 - -GMS.RegisterCombi( COMBI, "gms_advancedtransmutator" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "All Mahogany" -COMBI.Description = "This type of wood can be used to make more advanced machinery." -COMBI.Entity = "gms_advancedtransmutator" - -COMBI.Req = {} -COMBI.Req["Teak"] = 1 -COMBI.Req["Steel"] = 1 - -COMBI.Results = {} -COMBI.Results["Mahogany"] = 2 - -COMBI.AllSmelt = true -COMBI.Max = 200 - -GMS.RegisterCombi( COMBI, "gms_advancedtransmutator" ) - ------------------------------------------------------------------------- - -local COMBI = {} - -COMBI.Name = "All Elm" -COMBI.Description = "This type of wood can be used to make more advanced machinery." -COMBI.Entity = "gms_advancedtransmutator" - -COMBI.Req = {} -COMBI.Req["Mahogany"] = 1 -COMBI.Req["Platinum"] = 1 - -COMBI.Results = {} -COMBI.Results["Elm"] = 2 - -COMBI.AllSmelt = true -COMBI.Max = 200 - -GMS.RegisterCombi( COMBI, "gms_advancedtransmutator" ) - -------------------------------------------------------------------------
\ No newline at end of file diff --git a/ftp_gmstranded/gamemode/combinations2.lua b/ftp_gmstranded/gamemode/combinations2.lua deleted file mode 100644 index bf31327..0000000 --- a/ftp_gmstranded/gamemode/combinations2.lua +++ /dev/null @@ -1,1196 +0,0 @@ - -/* ------------------------ Pistol Gun Lab ------------------------*/ - -/* M9k USP */ -local COMBI = {} - -COMBI.Name = "USP Pistol" -COMBI.Description = "A refined version of a pistol" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Tech Gunslide"] = 1 -COMBI.Req["Tech Gungrip"] = 1 -COMBI.Req["Tech Gunbarrel"] = 1 -COMBI.Req["Tech Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 16 -COMBI.SkillReq["Hunting"] = 12 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_usp" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - -/* M9k Luger */ -local COMBI = {} - -COMBI.Name = "Luger" -COMBI.Description = "A refined version of a pistol, Also German made!" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Tech Gunslide"] = 1 -COMBI.Req["Tech Gungrip"] = 1 -COMBI.Req["Tech Gunbarrel"] = 1 -COMBI.Req["Tech Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 17 -COMBI.SkillReq["Hunting"] = 13 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_luger" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - -/* M9k Colt1911 */ -local COMBI = {} - -COMBI.Name = "Colt Pistol" -COMBI.Description = "A refined version of a pistol" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Tech Gunslide"] = 1 -COMBI.Req["Tech Gungrip"] = 1 -COMBI.Req["Tech Gunbarrel"] = 1 -COMBI.Req["Tech Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 16 -COMBI.SkillReq["Hunting"] = 12 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_colt1911" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - - -/* M9k Glock */ -local COMBI = {} - -COMBI.Name = "Glock Pistol" -COMBI.Description = "A refined version of a pistol" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Tech Gunslide"] = 1 -COMBI.Req["Tech Gungrip"] = 1 -COMBI.Req["Tech Gunbarrel"] = 1 -COMBI.Req["Tech Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 20 -COMBI.SkillReq["Hunting"] = 16 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_glock" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - - -/* M9k Remington 1858 */ -local COMBI = {} - -COMBI.Name = "Remington 1858" -COMBI.Description = "A refined version of a pistol" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Silver Gunslide"] = 1 -COMBI.Req["Silver Gungrip"] = 1 -COMBI.Req["Silver Gunbarrel"] = 1 -COMBI.Req["Silver Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 25 -COMBI.SkillReq["Hunting"] = 20 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_remington1858" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - -/* M9k S W Model 3 Russian */ -local COMBI = {} - -COMBI.Name = "S W Model 3 Russian" -COMBI.Description = "A refined version of a pistol" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Silver Gunslide"] = 1 -COMBI.Req["Silver Gungrip"] = 1 -COMBI.Req["Silver Gunbarrel"] = 1 -COMBI.Req["Silver Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 20 -COMBI.SkillReq["Hunting"] = 17 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_model3russian" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - - -/* M9k Satan */ -local COMBI = {} - -COMBI.Name = "Satan Revolver" -COMBI.Description = "A refined version of a pistol" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Silver Gunslide"] = 1 -COMBI.Req["Silver Gungrip"] = 1 -COMBI.Req["Silver Gunbarrel"] = 1 -COMBI.Req["Silver Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 30 -COMBI.SkillReq["Hunting"] = 25 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_m29satan" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - - -/* M9k Deagle */ -local COMBI = {} - -COMBI.Name = "Deagle" -COMBI.Description = "A refined version of a pistol" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Gold Gunslide"] = 1 -COMBI.Req["Gold Gungrip"] = 1 -COMBI.Req["Gold Gunbarrel"] = 1 -COMBI.Req["Gold Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 35 -COMBI.SkillReq["Hunting"] = 28 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_deagle" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - - -/* M9k Raging Bull */ -local COMBI = {} - -COMBI.Name = "Raging Bull" -COMBI.Description = "A refined version of a pistol" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Steel Gunslide"] = 1 -COMBI.Req["Steel Gungrip"] = 1 -COMBI.Req["Steel Gunbarrel"] = 1 -COMBI.Req["Steel Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 40 -COMBI.SkillReq["Hunting"] = 32 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_ragingbull" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - - -/* M9k Scoped Raging Bull */ -local COMBI = {} - -COMBI.Name = "Scoped Raging Bull" -COMBI.Description = "A refined version of a pistol" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Platinum Gunslide"] = 1 -COMBI.Req["Platinum Gungrip"] = 1 -COMBI.Req["PLatinum Gunbarrel"] = 1 -COMBI.Req["Platinum Gunmagazine"] = 1 -COMBI.Req["Platinum Weapon Scope"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 50 -COMBI.SkillReq["Hunting"] = 32 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_scoped_taurus" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - -/* ------------------------ SMG Gun Lab ------------------------*/ - -/* M9k P90 */ -local COMBI = {} - -COMBI.Name = "P90" -COMBI.Description = "A refined version of an SMG" -COMBI.Entity = "gms_smggunlab" - -COMBI.Req = {} -COMBI.Req["Tech Gunslide"] = 1 -COMBI.Req["Tech Gungrip"] = 1 -COMBI.Req["Tech Gunbarrel"] = 1 -COMBI.Req["Tech Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 25 -COMBI.SkillReq["Hunting"] = 20 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_smgp90" - -GMS.RegisterCombi( COMBI, "gms_smggunlab" ) - -/* M9k Magdul PDR */ -local COMBI = {} - -COMBI.Name = "Magdul PDR" -COMBI.Description = "A refined version of an SMG" -COMBI.Entity = "gms_smggunlab" - -COMBI.Req = {} -COMBI.Req["Silver Gunslide"] = 1 -COMBI.Req["Silver Gungrip"] = 1 -COMBI.Req["Silver Gunbarrel"] = 1 -COMBI.Req["Silver Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 35 -COMBI.SkillReq["Hunting"] = 30 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_magpulpdr" - -GMS.RegisterCombi( COMBI, "gms_smggunlab" ) - - - -/* M9k MP90 */ -local COMBI = {} - -COMBI.Name = "MP90" -COMBI.Description = "A refined version of an SMG" -COMBI.Entity = "gms_smggunlab" - -COMBI.Req = {} -COMBI.Req["Gold Gunslide"] = 1 -COMBI.Req["Gold Gungrip"] = 1 -COMBI.Req["Gold Gunbarrel"] = 1 -COMBI.Req["Gold Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 45 -COMBI.SkillReq["Hunting"] = 40 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_mp9" - -GMS.RegisterCombi( COMBI, "gms_smggunlab" ) - - /*FN FAL*/ -local COMBI = {} - -COMBI.Name = "FN FAL" -COMBI.Description = "Fairly advanced Assault rifle, Pressing E and R at the same time will turn the gun between Automatic and Single shot." -COMBI.Entity = "gms_smggunlab" - -COMBI.Req = {} -COMBI.Req["Steel Gunslide"] = 1 -COMBI.Req["Steel Gungrip"] = 1 -COMBI.Req["Steel Gunbarrel"] = 1 -COMBI.Req["Steel Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 60 -COMBI.SkillReq["Hunting"] = 50 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_fal" - -GMS.RegisterCombi( COMBI, "gms_smggunlab" ) - -/* M9k KRISS Vector */ -local COMBI = {} - -COMBI.Name = "KRISS Vector" -COMBI.Description = "A refined version of an SMG" -COMBI.Entity = "gms_smggunlab" - -COMBI.Req = {} -COMBI.Req["Steel Gunslide"] = 1 -COMBI.Req["Steel Gungrip"] = 1 -COMBI.Req["Steel Gunbarrel"] = 1 -COMBI.Req["Steel Gunmagazine"] = 1 -COMBI.Req["Steel Reflex Scope"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 50 -COMBI.SkillReq["Hunting"] = 45 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_vector" - -GMS.RegisterCombi( COMBI, "gms_smggunlab" ) - -/* M9k MP7 */ -local COMBI = {} - -COMBI.Name = "MP7" -COMBI.Description = "A refined version of an SMG" -COMBI.Entity = "gms_smggunlab" - -COMBI.Req = {} -COMBI.Req["Steel Gunslide"] = 1 -COMBI.Req["Steel Gungrip"] = 1 -COMBI.Req["Steel Gunbarrel"] = 1 -COMBI.Req["Steel Gunmagazine"] = 1 -COMBI.Req["Steel Weapon Scope"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 60 -COMBI.SkillReq["Hunting"] = 50 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_mp7" - -GMS.RegisterCombi( COMBI, "gms_smggunlab" ) - -/* M9k Honey Badger */ -local COMBI = {} - -COMBI.Name = "Honey Badger" -COMBI.Description = "A refined version of an SMG" -COMBI.Entity = "gms_smggunlab" - -COMBI.Req = {} -COMBI.Req["Platinum Gunslide"] = 1 -COMBI.Req["Platinum Gungrip"] = 1 -COMBI.Req["Platinum Gunbarrel"] = 1 -COMBI.Req["Platinum Gunmagazine"] = 1 -COMBI.Req["Platinum Weapon Scope"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 70 -COMBI.SkillReq["Hunting"] = 60 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_honeybadger" - -GMS.RegisterCombi( COMBI, "gms_smggunlab" ) - -/* ------------------------ High Tech Gun Lab ------------------------*/ - -/* M9k Winchester */ -local COMBI = {} - -COMBI.Name = "Winchester Rifle" -COMBI.Description = "A refined version of an Assault Rifle" -COMBI.Entity = "gms_hightechgunlab" - -COMBI.Req = {} -COMBI.Req["Platinum Gunslide"] = 1 -COMBI.Req["Platinum Gungrip"] = 1 -COMBI.Req["Platinum Gunbarrel"] = 1 -COMBI.Req["Platinum Gunmagazine"] = 1 -COMBI.Req["Platinum Weapon Scope"] = 1 -COMBI.Req["Steel"] = 100 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 90 -COMBI.SkillReq["Hunting"] = 70 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_winchester73" - -GMS.RegisterCombi( COMBI, "gms_hightechgunlab" ) - - -/* M9k Vikhr */ -local COMBI = {} - -COMBI.Name = "Vikhr Rifle" -COMBI.Description = "A refined version of an Assault Rifle" -COMBI.Entity = "gms_hightechgunlab" - -COMBI.Req = {} -COMBI.Req["Platinum Gunslide"] = 1 -COMBI.Req["Platinum Gungrip"] = 1 -COMBI.Req["Platinum Gunbarrel"] = 1 -COMBI.Req["Platinum Gunmagazine"] = 1 -COMBI.Req["Platinum Weapon Scope"] = 1 -COMBI.Req["Steel"] = 100 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 100 -COMBI.SkillReq["Hunting"] = 70 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_vikhr" - -GMS.RegisterCombi( COMBI, "gms_hightechgunlab" ) - - -/* M9k Remington Sniper */ -local COMBI = {} - -COMBI.Name = "Remington Sniper" -COMBI.Description = "A refined version of a Sniper Rifle" -COMBI.Entity = "gms_hightechgunlab" - -COMBI.Req = {} -COMBI.Req["Platinum Gunslide"] = 1 -COMBI.Req["Platinum Gungrip"] = 1 -COMBI.Req["Platinum Gunbarrel"] = 1 -COMBI.Req["Platinum Gunmagazine"] = 1 -COMBI.Req["Platinum Weapon Scope"] = 1 -COMBI.Req["Platinum"] = 150 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 150 -COMBI.SkillReq["Hunting"] = 70 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_remington7615p" - -GMS.RegisterCombi( COMBI, "gms_hightechgunlab" ) - - -/* M9k SVT Sniper */ -local COMBI = {} - -COMBI.Name = "SVT Sniper" -COMBI.Description = "A refined version of a Sniper Rifle" -COMBI.Entity = "gms_hightechgunlab" - -COMBI.Req = {} -COMBI.Req["Platinum Gunslide"] = 1 -COMBI.Req["Platinum Gungrip"] = 1 -COMBI.Req["Platinum Gunbarrel"] = 1 -COMBI.Req["Platinum Gunmagazine"] = 1 -COMBI.Req["Platinum Weapon Scope"] = 1 -COMBI.Req["Platinum"] = 200 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 180 -COMBI.SkillReq["Hunting"] = 100 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_svt40" - -GMS.RegisterCombi( COMBI, "gms_hightechgunlab" ) - -/* ------------------------ Ammo ------------------------*/ - -/* Pistol ammo */ -local COMBI = {} - -COMBI.Name = "Pistol ammo" -COMBI.Description = "If you wanna keep using the pistol, you'll need this" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Iron"] = 25 -COMBI.Req["Gunpowder"] = 15 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 10 - -COMBI.Texture = "gms_icons/item_ammo_pistol.png" -COMBI.SwepClass = "item_ammo_pistol_large" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - -/* Crossbow Bolts */ -local COMBI = {} - -COMBI.Name = "Crossbow Bolts" -COMBI.Description = "If you wanna keep using your Crossbow, you'll need this" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Iron"] = 50 -COMBI.Req["Stone"] = 25 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 50 - -COMBI.Texture = "gms_icons/item_ammo_pistol.png" -COMBI.SwepClass = "item_ammo_crossbow " - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - -/* Smg ammo */ -local COMBI = {} - -COMBI.Name = "SMG Ammo" -COMBI.Description = "If you wanna keep using the smg, you'll need this" -COMBI.Entity = "gms_smggunlab" - -COMBI.Req = {} -COMBI.Req["Iron"] = 50 -COMBI.Req["Gunpowder"] = 25 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 15 - -COMBI.Texture = "gms_icons/item_ammo_smg1.png" -COMBI.SwepClass = "item_ammo_smg1_large" - -GMS.RegisterCombi( COMBI, "gms_smggunlab" ) - -/* Revolver Ammo */ -local COMBI = {} - -COMBI.Name = "Revolver Ammo" -COMBI.Description = "If you wanna keep using the revolvers, you'll need this" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Iron"] = 50 -COMBI.Req["Gunpowder"] = 25 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 10 - -COMBI.Texture = "gms_icons/item_ammo_pistol.png" -COMBI.SwepClass = "item_ammo_357_large" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - -/* Assault Rifle Ammo */ -local COMBI = {} - -COMBI.Name = "Assault Rifle Ammo" -COMBI.Description = "If you wanna keep using your Assault Rifle weapons you'll need this" -COMBI.Entity = "gms_cedargunlab" - -COMBI.Req = {} -COMBI.Req["Iron"] = 10 -COMBI.Req["Gunpowder"] = 5 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 50 - -COMBI.Texture = "gms_icons/item_ammo_smg1.png" -COMBI.SwepClass = "item_ammo_ar2_large" - -GMS.RegisterCombi( COMBI, "gms_smggunlab" ) - -/* Winchester Ammo */ -local COMBI = {} - -COMBI.Name = "Winchester Ammo" -COMBI.Description = "If you wanna keep using your Winchester you'll need this" -COMBI.Entity = "gms_hightechgunlab" - -COMBI.Req = {} -COMBI.Req["Iron"] = 10 -COMBI.Req["Gunpowder"] = 5 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 50 - -COMBI.Texture = "gms_icons/item_ammo_smg1.png" -COMBI.SwepClass = "m9k_ammo_winchester" - -GMS.RegisterCombi( COMBI, "gms_hightechgunlab" ) - -/* Shotgun Ammo (HL2) */ -local COMBI = {} - -COMBI.Name = "Shotgun Ammo" -COMBI.Description = "If you want to keep using your Shotgun weapons you'll need this" -COMBI.Entity = "gms_pistolgunlab" - -COMBI.Req = {} -COMBI.Req["Iron"] = 5 -COMBI.Req["Gunpowder"] = 5 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 25 - -COMBI.Texture = "gms_icons/item_ammo_smg1.png" -COMBI.SwepClass = "item_box_buckshot" - -GMS.RegisterCombi( COMBI, "gms_pistolgunlab" ) - -/* ------------------------------------------------------------------------Platinum workbench------------------------------------------------------------------------ */ -local COMBI = {} - -COMBI.Name = "Pickaxe of Djarex" -COMBI.Description = "A strange pickaxe that has a tendency to only mine a weird type of stone" -COMBI.Entity = "gms_platinumworkbench" - -COMBI.Req = {} -COMBI.Req["Platinum"] = 25 -COMBI.Req ["Steel"] = 25 -COMBI.Req ["Gold"] = 25 -COMBI.Req["Elm"] = 50 -COMBI.Req["Mahogany"] = 50 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 50 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_pickaxeofdjarex" - -GMS.RegisterCombi( COMBI, "gms_platinumworkbench" ) --------------------------------------------------------------Platinum Furnace------------------------------------ -local COMBI = {} - -COMBI.Name = "Pure Mithril" -COMBI.Description = "The purest form of mithril able to be made" -COMBI.Entity = "gms_platinumfurnace" - -COMBI.Req = {} -COMBI.Req["Mithril_Ore"] = 2 - -COMBI.Results = {} -COMBI.Results["Pure_Mithril"] = 1 - -GMS.RegisterCombi ( COMBI, "gms_platinumfurnace" ) - -local COMBI = {} - -COMBI.Name = "Pure Mithril x5" -COMBI.Description = "The purest form of mithril able to be made" -COMBI.Entity = "gms_platinumfurnace" - -COMBI.Req = {} -COMBI.Req["Mithril_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Pure_Mithril"] = 5 - -GMS.RegisterCombi ( COMBI, "gms_platinumfurnace" ) - -local COMBI = {} - -COMBI.Name = "Pure Mithril x10" -COMBI.Description = "The purest form of mithril able to be made" -COMBI.Entity = "gms_platinumfurnace" - -COMBI.Req = {} -COMBI.Req["Mithril_Ore"] = 20 - -COMBI.Results = {} -COMBI.Results["Pure_Mithril"] = 10 - -GMS.RegisterCombi ( COMBI, "gms_platinumfurnace" ) - -local COMBI = {} - -COMBI.Name = "All Pure Mithril" -COMBI.Description = "Pure Mithril can be used to start of you industrial needs" -COMBI.Entity = "gms_platinumfurnace" - -COMBI.Req = {} -COMBI.Req["Mithril_Ore"] = 2 - -COMBI.Results = {} -COMBI.Results["Pure_Mithril"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_platinumfurnace" ) - - -----------------------------------------------------------------------Steel Workbench----------------------------------------------- -local COMBI = {} - -COMBI.Name = "Bucket" -COMBI.Description = "a simple bucket for simple needs" -COMBI.Entity = "gms_steelworkbench" - -COMBI.Req = {} -COMBI.Req["Steel"] = 30 -COMBI.Req["Wood"] = 5 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 30 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_bucket" - -GMS.RegisterCombi ( COMBI, "gms_steelworkbench") - - ----------------------------------------------------------------------------Obelisk---------------------------------- -/*Obelisk*/ -local COMBI = {} - -COMBI.Name = "Obelisk" -COMBI.Description = "A broken down obelisk used to make basic runes" - -COMBI.Req = {} -COMBI.Req["Strange_Stone"] = 50 - -COMBI.Results = "gms_obelisk" -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.BuildSiteModel = "models/props_c17/gravestone_cross001b.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - - -local COMBI = {} - -COMBI.Name = "Basic Rune" -COMBI.Description = "the most basic rune used for inscribing" -COMBI.Entity = "gms_obelisk" - -COMBI.Req = {} -COMBI.Req["Strange_Stone"] = 5 - -COMBI.Results = {} -COMBI.Results["Basic_Rune"] = 1 - -GMS.RegisterCombi ( COMBI, "gms_obelisk") - -local COMBI = {} - -COMBI.Name = "Chisel" -COMBI.Description = "Effective in cutting stone" -COMBI.Entity = "gms_obelisk" - -COMBI.Req = {} -COMBI.Req["Iron"] = 30 -COMBI.Req["Wood"] = 5 -COMBI.Req["Strange_Stone"] = 5 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 40 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_chisel" - -GMS.RegisterCombi ( COMBI, "gms_obelisk") - - - -----------------------------------------------------------Mithril Factory----------------------------------------------- -/*Mithril Factory*/ -local COMBI = {} - -COMBI.Name = "Mithril Factory" -COMBI.Description = "A advanced factor for faster smelting" - -COMBI.Req = {} -COMBI.Req["Pure_Mithril"] = 400 -COMBI.Req["Teak"] = 50 - -COMBI.Results = "gms_mithrilfactory" -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.BuildSiteModel = "models/props_wasteland/laundry_washer001a.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -/* Allsmelt Copper */ -local COMBI = {} - -COMBI.Name = "All Copper" -COMBI.Description = "Copper can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_mithrilfactory" - -COMBI.Req = {} -COMBI.Req["Copper_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Copper"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_mithrilfactory" ) - -/* Allsmelt Iron */ -local COMBI = {} - -COMBI.Name = "All Iron" -COMBI.Description = "Iron can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_mithrilfactory" - -COMBI.Req = {} -COMBI.Req["Iron_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Iron"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_mithrilfactory" ) - -/* Allsmelt Tech */ -local COMBI = {} - -COMBI.Name = " All Tech " -COMBI.Description = "Tech can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_mithrilfactory" - -COMBI.Req = {} -COMBI.Req["Tech_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Tech"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_mithrilfactory" ) - -/* All Silver */ -local COMBI = {} - -COMBI.Name = "All Silver" -COMBI.Description = "Silver can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_mithrilfactory" - -COMBI.Req = {} -COMBI.Req["Silver_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Silver"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi ( COMBI, "gms_mithrilfactory" ) - -/* All Gold */ -local COMBI = {} - -COMBI.Name = "All Gold" -COMBI.Description = "Gold can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_mithrilfactory" - -COMBI.Req = {} -COMBI.Req["Gold_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Gold"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_mithrilfactory" ) - -/* All Steel */ -local COMBI = {} - -COMBI.Name = "All Steel" -COMBI.Description = "Steel can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_mithrilfactory" - -COMBI.Req = {} -COMBI.Req["Steel_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Steel"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_mithrilfactory" ) - -/* All Platinum */ -local COMBI = {} - -COMBI.Name = "All Platinum" -COMBI.Description = "Platinum can be used to create more advanced buildings and tools." -COMBI.Entity = "gms_mithrilfactory" - -COMBI.Req = {} -COMBI.Req["Platinum_Ore"] = 1 - -COMBI.Results = {} -COMBI.Results["Platinum"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_mithrilfactory" ) - -/* All Pure Mithrill */ -local COMBI = {} - -COMBI.Name = "Pure_Mithril" -COMBI.Description = "Pure Mithril can be used to start of you industrial needs" -COMBI.Entity = "gms_mithrilfactory" - -COMBI.Req = {} -COMBI.Req["Mithril_Ore"] = 2 - -COMBI.Results = {} -COMBI.Results["Pure_Mithril"] = 1 - -COMBI.AllSmelt = true -COMBI.Max = 50 - -GMS.RegisterCombi( COMBI, "gms_mithrilfactory" ) - -------------------------------------------------------------Mythril Workbench----------------------------------------------- - -local COMBI = {} - -COMBI.Name = "Mithril WorkBench" -COMBI.Description = "A very basic industrial crafting station" - -COMBI.Req = {} -COMBI.Req["Pure_Mithril"] = 200 -COMBI.Req["Teak"] = 20 - -COMBI.Results = "gms_mithrilworkbench" -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.BuildSiteModel = "models/props_wasteland/kitchen_counter001c.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -local COMBI = {} - -COMBI.Name = "Mithril Pickaxe" -COMBI.Description = "A strange pickaxe that has a tendency to only mine a weird type of stone" -COMBI.Entity = "gms_mithrilworkbench" - -COMBI.Req = {} -COMBI.Req["Pure_Mithril"] = 50 -COMBI.Req["Teak"] = 25 - - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_mithrilpickaxe" - -GMS.RegisterCombi( COMBI, "gms_mithrilworkbench" ) - -------------------------------------------------Rune Altar-------------------------------------- -local COMBI = {} - -COMBI.Name = "Rune Altar" -COMBI.Description = "A basic Altar used for making runes" - -COMBI.Req = {} -COMBI.Req["Strange_Stone"] = 100 -COMBI.Req["Stone"] = 500 -COMBI.Req["Basic_Rune"] = 10 - -COMBI.Results = "gms_runealtar" -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.BuildSiteModel = "models/xqm/rails/cap.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - - local COMBI = {} - -COMBI.Name = "Fire Rune" -COMBI.Description = "A rune infused with the element of fire" -COMBI.Entity = "gms_runealtar" - -COMBI.Req = {} -COMBI.Req["Basic_Rune"] = 1 -COMBI.Req["Charcoal"] = 10 -COMBI.Req["Strange_Stone"] = 20 - -COMBI.Results = {} -COMBI.Results["Fire_Rune"] = 1 - - -GMS.RegisterCombi( COMBI, "gms_runealtar" ) - -local COMBI = {} - -COMBI.Name = "Water Rune" -COMBI.Description = "A rune infused with the element of water" -COMBI.Entity = "gms_runealtar" - -COMBI.Req = {} -COMBI.Req["Basic_Rune"] = 1 -COMBI.Req["Water_Bottles"] = 10 -COMBI.Req["Strange_Stone"] = 20 - -COMBI.Results = {} -COMBI.Results["Water_Rune"] = 1 - - -GMS.RegisterCombi( COMBI, "gms_runealtar" ) - -local COMBI = {} - -COMBI.Name = "Air Rune" -COMBI.Description = "A rune infused with the element of air" -COMBI.Entity = "gms_runealtar" - -COMBI.Req = {} -COMBI.Req["Basic_Rune"] = 1 -COMBI.Req["Dust"] = 10 -COMBI.Req["Strange_Stone"] = 20 - -COMBI.Results = {} -COMBI.Results["Air_Rune"] = 1 - - -GMS.RegisterCombi( COMBI, "gms_runealtar" ) - -local COMBI = {} - -COMBI.Name = "Earth Rune" -COMBI.Description = "A rune infused with the element of earth" -COMBI.Entity = "gms_runealtar" - -COMBI.Req = {} -COMBI.Req["Basic_Rune"] = 1 -COMBI.Req["Wood"] = 10 -COMBI.Req["Strange_Stone"] = 20 - -COMBI.Results = {} -COMBI.Results["Earth_Rune"] = 1 - -GMS.RegisterCombi( COMBI, "gms_runealtar" ) ----------------------------------------------------Runic Infuser----------------------------------- -local COMBI = {} - -COMBI.Name = "Runic Infuser" -COMBI.Description = "A basic place for infusing tools" - -COMBI.Req = {} -COMBI.Req["Strange_Stone"] = 200 -COMBI.Req["Stone"] = 200 -COMBI.Req["Basic_Rune"] = 20 - -COMBI.Results = "gms_runicinfuser" -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.BuildSiteModel = "models/maxofs2d/hover_rings.mdl" - -GMS.RegisterCombi( COMBI, "Structures" ) - -local COMBI = {} - -COMBI.Name = "Pickaxe Head" -COMBI.Description = "it might be dull but it gets the job done" -COMBI.Entity = "gms_runicinfuser" - -COMBI.Req = {} -COMBI.Req["Stone"] = 150 -COMBI.Req["Strange_Stone"] = 20 - -COMBI.Results = {} -COMBI.Results["Pickaxe_Head"] = 1 - -GMS.RegisterCombi( COMBI, "gms_runicinfuser" ) - -local COMBI = {} - -COMBI.Name = "Pickaxe Handle" -COMBI.Description = "a sturdy handle for a sturdy tool" -COMBI.Entity = "gms_runicinfuser" - -COMBI.Req = {} -COMBI.Req["Stone"] = 100 -COMBI.Req["Strange_Stone"] = 15 - -COMBI.Results = {} -COMBI.Results["Pickaxe_Handle"] = 1 - -GMS.RegisterCombi( COMBI, "gms_runicinfuser" ) - -local COMBI = {} - -COMBI.Name = "Air Rune Pickaxe" -COMBI.Description = "A strange pickaxe that has a tendency to only mine a weird type of stone" -COMBI.Entity = "gms_runicinfuser" - -COMBI.Req = {} -COMBI.Req["Pickaxe_Head"] = 1 -COMBI.Req["Pickaxe_Handle"] = 1 -COMBI.Req["Air_Rune"] = 3 -COMBI.Req["Strange_Stone"] = 15 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_runeapickaxe" - -GMS.RegisterCombi( COMBI, "gms_runicinfuser" ) - -local COMBI = {} - -COMBI.Name = "Earth Rune Pickaxe" -COMBI.Description = "A strange pickaxe that has a tendency to only mine a weird type of stone" -COMBI.Entity = "gms_runicinfuser" - -COMBI.Req = {} -COMBI.Req["Pickaxe_Head"] = 1 -COMBI.Req["Pickaxe_Handle"] = 1 -COMBI.Req["Earth_Rune"] = 3 -COMBI.Req["Strange_Stone"] = 15 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_runeepickaxe" - -GMS.RegisterCombi( COMBI, "gms_runicinfuser" ) - -local COMBI = {} - -COMBI.Name = "Fire Rune Pickaxe" -COMBI.Description = "A strange pickaxe that has a tendency to only mine a weird type of stone" -COMBI.Entity = "gms_runicinfuser" - -COMBI.Req = {} -COMBI.Req["Pickaxe_Head"] = 1 -COMBI.Req["Pickaxe_Handle"] = 1 -COMBI.Req["Fire_Rune"] = 3 -COMBI.Req["Strange_Stone"] = 15 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_runefpickaxe" - -GMS.RegisterCombi( COMBI, "gms_runicinfuser" ) - -local COMBI = {} - -COMBI.Name = "Water Rune Pickaxe" -COMBI.Description = "A strange pickaxe that has a tendency to only mine a weird type of stone" -COMBI.Entity = "gms_runicinfuser" - -COMBI.Req = {} -COMBI.Req["Pickaxe_Head"] = 1 -COMBI.Req["Pickaxe_Handle"] = 1 -COMBI.Req["Water_Rune"] = 3 -COMBI.Req["Strange_Stone"] = 15 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "gms_runewpickaxe" - -GMS.RegisterCombi( COMBI, "gms_runicinfuser" ) - ----------------------------------Grinding Stone-------------------- -local COMBI = {} - -COMBI.Name = "Dust x5" -COMBI.Description = "A fine powder that floats through the wind" -COMBI.Entity = "gms_grindingstone" - -COMBI.Req = {} -COMBI.Req["Sand"] = 1 - -COMBI.Results = {} -COMBI.Results["Dust"] = 5 - -GMS.RegisterCombi( COMBI, "gms_grindingstone" ) - - - - - - - - - diff --git a/ftp_gmstranded/gamemode/combirenbuy.lua b/ftp_gmstranded/gamemode/combirenbuy.lua deleted file mode 100644 index 35d914f..0000000 --- a/ftp_gmstranded/gamemode/combirenbuy.lua +++ /dev/null @@ -1,21 +0,0 @@ -/* M9k USP */ -local COMBI = {} - -COMBI.Name = "Test" -COMBI.Description = "A refined version of a pistol" -COMBI.Entity = "gms_renbuyshop" - -COMBI.Req = {} -COMBI.Req["Tech Gunslide"] = 1 -COMBI.Req["Tech Gungrip"] = 1 -COMBI.Req["Tech Gunbarrel"] = 1 -COMBI.Req["Tech Gunmagazine"] = 1 - -COMBI.SkillReq = {} -COMBI.SkillReq["Weapon_Crafting"] = 16 -COMBI.SkillReq["Hunting"] = 12 - -COMBI.Texture = "gms_icons/gms_weapon.png" -COMBI.SwepClass = "m9k_usp" - -GMS.RegisterCombi( COMBI, "gms_renbuyshop" )
\ No newline at end of file diff --git a/ftp_gmstranded/gamemode/combirensell.lua b/ftp_gmstranded/gamemode/combirensell.lua deleted file mode 100644 index ea012bb..0000000 --- a/ftp_gmstranded/gamemode/combirensell.lua +++ /dev/null @@ -1,1500 +0,0 @@ -/* HolyRen */ -local COMBI = {} - -COMBI.Name = "HolyRen" -COMBI.Description = "Converts Ren into HolyRen, an upgraded tier of Ren" -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Ren"] = 1000 - -COMBI.Results = {} -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* RILL Ren */ -local COMBI = {} - -COMBI.Name = "RILL Ren" -COMBI.Description = "Converts HolyRen into RILL Ren. RILL means Requiem Insignia Imprinted Ren" -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["HolyRen"] = 100 - -COMBI.Results = {} -COMBI.Results["RILLRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Stone */ -local COMBI = {} - -COMBI.Name = "Stone" -COMBI.Description = "Converts an item into Ren, this will also make 25 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Stone"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 25 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Stone x10 */ -local COMBI = {} - -COMBI.Name = "Stone x10" -COMBI.Description = "Converts an item into Ren, this will make 250 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Stone"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Copper Ore*/ -local COMBI = {} - -COMBI.Name = "Copper Ore" -COMBI.Description = "Converts an item into Ren, this will also make 25 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Copper_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 25 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Copper Ore x10 */ -local COMBI = {} - -COMBI.Name = "Copper Ore x10" -COMBI.Description = "Converts an item into Ren, this will also make 250 Ren" -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Copper_Ore"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Copper Smelted */ -local COMBI = {} - -COMBI.Name = "Copper" -COMBI.Description = "Converts an item into Ren, this will also make 50 Ren" -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Copper"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 50 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Copper Smelted x10*/ -local COMBI = {} - -COMBI.Name = "Copper x10" -COMBI.Description = "Converts an item into Ren, This will also make 500 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Copper"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 500 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Iron Smelted */ -local COMBI = {} - -COMBI.Name = "Iron" -COMBI.Description = "Converts an item into Ren, this will also make 75 Ren" -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Iron"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 75 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Iron Smelted x10 */ -local COMBI = {} - -COMBI.Name = "Iron x10" -COMBI.Description = "Converts an item into Ren, This will also make 750 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Iron"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 750 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Tech Smelted */ -local COMBI = {} - -COMBI.Name = "Tech" -COMBI.Description = "Converts an item into Ren, This will also make 100 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Tech"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 100 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Tech Smelted x10*/ -local COMBI = {} - -COMBI.Name = "Tech x10" -COMBI.Description = "Converts an item into Ren, This will also make 1 HolyRen." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Tech"] = 100 - -COMBI.Results = {} -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Tech Ore */ -local COMBI = {} - -COMBI.Name = "Tech Ore" -COMBI.Description = "Converts an item into Ren, This will also make 50 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Tech_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 50 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Tech Ore x10 */ -local COMBI = {} - -COMBI.Name = "Tech Ore x10" -COMBI.Description = "Converts an item into Ren, This will also make 500 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Tech_Ore"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 500 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Silver */ -local COMBI = {} - -COMBI.Name = "Silver" -COMBI.Description = "Converts an item into Ren, This will also make 125 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Silver"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 125 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Silver x10 */ -local COMBI = {} - -COMBI.Name = "Silver x10" -COMBI.Description = "Converts an item into Ren, This will also make 1250 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Silver"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Silver Ore */ -local COMBI = {} - -COMBI.Name = "Silver Ore" -COMBI.Description = "Converts an item into Ren, This will also make 62 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Silver_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 62 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Silver Ore x10 */ -local COMBI = {} - -COMBI.Name = "Silver Ore" -COMBI.Description = "Converts an item into Ren, This will also make 620 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Silver_Ore"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 620 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Gold */ -local COMBI = {} - -COMBI.Name = "Gold" -COMBI.Description = "Converts an item into Ren, This will also make 150 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Gold"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 150 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Gold x10*/ -local COMBI = {} - -COMBI.Name = "Gold x10" -COMBI.Description = "Converts an item into Ren, This will also make 1500 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Gold"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 500 -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Gold Ore */ -local COMBI = {} - -COMBI.Name = "Gold Ore" -COMBI.Description = "Converts an item into Ren, This will also make 175 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Gold_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 175 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Gold Ore x10*/ -local COMBI = {} - -COMBI.Name = "Gold Ore x10" -COMBI.Description = "Converts an item into Ren, This will also make 1750 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Gold_Ore"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 750 -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Steel */ -local COMBI = {} - -COMBI.Name = "Steel" -COMBI.Description = "Converts an item into Ren, This will also make 175 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Steel"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 175 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Steel x10 */ -local COMBI = {} - -COMBI.Name = "Steel x10" -COMBI.Description = "Converts an item into Ren, This will also make 1750 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Steel"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 750 -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Steel Ore */ -local COMBI = {} - -COMBI.Name = "Steel Ore" -COMBI.Description = "Converts an item into Ren, This will also make 87 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Steel_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 87 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Steel Ore x10*/ -local COMBI = {} - -COMBI.Name = "Steel Ore" -COMBI.Description = "Converts an item into Ren, This will also make 870 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Steel_Ore"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 870 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Platinum */ -local COMBI = {} - -COMBI.Name = "Platinum" -COMBI.Description = "Converts an item into Ren, This will also make 200 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Platinum"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 200 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Platinum x10*/ -local COMBI = {} - -COMBI.Name = "Platinum x10" -COMBI.Description = "Converts an item into Ren, This will also make 2 HolyRen." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Platinum"] = 100 - -COMBI.Results = {} -COMBI.Results["HolyRen"] = 2 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Platinum Ore*/ -local COMBI = {} - -COMBI.Name = "Platinum Ore" -COMBI.Description = "Converts an item into Ren, This will also make 100 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Platinum_Ore"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 100 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Platinum Ore x10*/ -local COMBI = {} - -COMBI.Name = "Platinum Ore x10" -COMBI.Description = "Converts an item into Ren, This will also make 1 HolyRen." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Platinum_Ore"] = 100 - -COMBI.Results = {} -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Wood */ -local COMBI = {} - -COMBI.Name = "Wood" -COMBI.Description = "Converts an item into Ren, This will also make 10 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Wood"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 10 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Wood x10*/ -local COMBI = {} - -COMBI.Name = "Wood x10" -COMBI.Description = "Converts an item into Ren, This will also make 10 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Wood"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 100 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Oak */ -local COMBI = {} - -COMBI.Name = "Oak" -COMBI.Description = "Converts an item into Ren, This will also make 50 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Oak"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 50 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Oak x10*/ -local COMBI = {} - -COMBI.Name = "Oak x10" -COMBI.Description = "Converts an item into Ren, This will also make 500 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Oak"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 500 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Cedar */ -local COMBI = {} - -COMBI.Name = "Cedar" -COMBI.Description = "Converts an item into Ren, This will also make 75 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Cedar"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 75 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Cedar x10*/ -local COMBI = {} - -COMBI.Name = "Cedar x10" -COMBI.Description = "Converts an item into Ren, This will also make 750 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Cedar"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 750 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Maple */ -local COMBI = {} - -COMBI.Name = "Maple" -COMBI.Description = "Converts an item into Ren, This will also make 100 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Maple"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 100 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Maple x10*/ -local COMBI = {} - -COMBI.Name = "Maple x10" -COMBI.Description = "Converts an item into Ren, This will also make 1 HolyRen." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Maple"] = 100 - -COMBI.Results = {} -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Teak */ -local COMBI = {} - -COMBI.Name = "Teak" -COMBI.Description = "Converts an item into Ren, This will also make 125 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Teak"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 125 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Teak x10*/ -local COMBI = {} - -COMBI.Name = "Teak x10" -COMBI.Description = "Converts an item into Ren, This will also make 1250 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Teak"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Mahogany */ -local COMBI = {} - -COMBI.Name = "Mahogany" -COMBI.Description = "Converts an item into Ren, This will also make 150 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Mahogany"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 150 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Mahogany x10*/ -local COMBI = {} - -COMBI.Name = "Mahogany x10" -COMBI.Description = "Converts an item into Ren, This will also make 1500 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Mahogany"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 500 -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Elm */ -local COMBI = {} - -COMBI.Name = "Elm" -COMBI.Description = "Converts an item into Ren, This will also make 175 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Elm"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 175 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Elm x10*/ -local COMBI = {} - -COMBI.Name = "Elm x10" -COMBI.Description = "Converts an item into Ren, This will also make 1750 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Elm"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 750 -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* WaterBottles */ -local COMBI = {} - -COMBI.Name = "Water Bottles" -COMBI.Description = "Converts an item into Ren, This will also make 125 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Water_Bottles"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 125 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* WaterBottles x10*/ -local COMBI = {} - -COMBI.Name = "Water Bottles x10" -COMBI.Description = "Converts an item into Ren, This will also make 1250 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Water_Bottles"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Urine Bottles */ -local COMBI = {} - -COMBI.Name = "Urine Bottles" -COMBI.Description = "Converts an item into Ren, This will also make 250 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Urine_Bottles"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Urine Bottles x10*/ -local COMBI = {} - -COMBI.Name = "Urine Bottles x10" -COMBI.Description = "Converts an item into Ren, This will also make 2500 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Urine_Bottles"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 500 -COMBI.Results["HolyRen"] = 2 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Saltpetre */ -local COMBI = {} - -COMBI.Name = "Saltpetre" -COMBI.Description = "Converts an item into Ren, This will also make 150 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Saltpetre"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 150 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Saltpetre x10*/ -local COMBI = {} - -COMBI.Name = "Saltpetre x10" -COMBI.Description = "Converts an item into Ren, This will also make 250 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Saltpetre"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 500 -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Charcoal */ -local COMBI = {} - -COMBI.Name = "Charcoal" -COMBI.Description = "Converts an item into Ren, This will also make 150 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Charcoal"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 150 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Charcoal x10*/ -local COMBI = {} - -COMBI.Name = "Charcoal x10" -COMBI.Description = "Converts an item into Ren, This will also make 1500 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Charcoal"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 1500 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Charcoal x10*/ -local COMBI = {} - -COMBI.Name = "Charcoal" -COMBI.Description = "Converts an item into Ren, This will also make 50 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Charcoal 10"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 500 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Sulphur */ -local COMBI = {} - -COMBI.Name = "Sulphur" -COMBI.Description = "Converts an item into Ren, This will also make 50 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Sulphur"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 50 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Sulphur x10*/ -local COMBI = {} - -COMBI.Name = "Sulphur x10" -COMBI.Description = "Converts an item into Ren, This will also make 500 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Sulphur"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 500 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Gunpowder */ -local COMBI = {} - -COMBI.Name = "Gunpowder" -COMBI.Description = "Converts an item into Ren, This will also make 325 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Gunpowder"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 325 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Gunpowder x10*/ -local COMBI = {} - -COMBI.Name = "Gunpowder x10" -COMBI.Description = "Converts an item into Ren, This will also make 325 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Gunpowder"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 -COMBI.Results["HolyRen"] = 3 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Herbs */ -local COMBI = {} - -COMBI.Name = "Herbs" -COMBI.Description = "Converts an item into Ren, This will also make 325 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Herbs"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 325 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Herbs x10*/ -local COMBI = {} - -COMBI.Name = "Herbs x10" -COMBI.Description = "Converts an item into Ren, This will also make 3250 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Herbs"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 -COMBI.Results["HolyRen"] = 3 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Spices */ -local COMBI = {} - -COMBI.Name = "Spices" -COMBI.Description = "Converts an item into Ren, This will also make 650 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Spices"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 650 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Spices x10 */ -local COMBI = {} - -COMBI.Name = "Spices x10" -COMBI.Description = "Converts an item into Ren, This will also make 6500 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Spices"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 500 -COMBI.Results["HolyRen"] = 6 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Banana Seeds */ -local COMBI = {} - -COMBI.Name = "Banana Seeds" -COMBI.Description = "Converts an item into Ren, This will also make 25 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Banana_Seeds"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 25 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Banana Seeds */ -local COMBI = {} - -COMBI.Name = "Banana Seeds x10" -COMBI.Description = "Converts an item into Ren, This will also make 250 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Banana_Seeds"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Watermelon Seeds */ -local COMBI = {} - -COMBI.Name = "Watermelon Seeds" -COMBI.Description = "Converts an item into Ren, This will also make 25 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Watermelon_Seeds"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 25 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Watermelon Seeds x10 */ -local COMBI = {} - -COMBI.Name = "Watermelon Seeds x10" -COMBI.Description = "Converts an item into Ren, This will also make 250 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Watermelon_Seeds"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - - -/* Orange Seeds */ -local COMBI = {} - -COMBI.Name = "Orange Seeds" -COMBI.Description = "Converts an item into Ren, This will also make 25 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Orange_Seeds"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 25 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Orange Seeds x10*/ -local COMBI = {} - -COMBI.Name = "Orange Seeds x10" -COMBI.Description = "Converts an item into Ren, This will also make 250 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Orange_Seeds"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Grain */ -local COMBI = {} - -COMBI.Name = "Grain Seeds" -COMBI.Description = "Converts an item into Ren, This will also make 25 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Grain_Seeds"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 25 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Grain x10*/ -local COMBI = {} - -COMBI.Name = "Grain Seeds x10" -COMBI.Description = "Converts an item into Ren, This will also make 250 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Grain_Seeds"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Berries */ -local COMBI = {} - -COMBI.Name = "Berries" -COMBI.Description = "Converts an item into Ren, This will also make 30 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Berries"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 30 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Berries x10*/ -local COMBI = {} - -COMBI.Name = "Berries x10" -COMBI.Description = "Converts an item into Ren, This will also make 300 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Berries"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 300 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Glass */ -local COMBI = {} - -COMBI.Name = "Glass" -COMBI.Description = "Converts an item into Ren, This will also make 50 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Glass"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 50 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Glass x10 */ -local COMBI = {} - -COMBI.Name = "Glass x10" -COMBI.Description = "Converts an item into Ren, This will also make 500 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Glass"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 500 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Baits */ -local COMBI = {} - -COMBI.Name = "Baits" -COMBI.Description = "Converts an item into Ren, This will also make 200 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Baits"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 200 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Baits x10*/ -local COMBI = {} - -COMBI.Name = "Baits x10" -COMBI.Description = "Converts an item into Ren, This will also make 2 HolyRen." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Baits"] = 100 - -COMBI.Results = {} -COMBI.Results["HolyRen"] = 2 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Dough */ -local COMBI = {} - -COMBI.Name = "Dough" -COMBI.Description = "Converts an item into Ren, This will also make 75 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Dough"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 75 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Dough x10 */ -local COMBI = {} - -COMBI.Name = "Dough x10" -COMBI.Description = "Converts an item into Ren, This will also make 750 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Dough"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 750 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Flour */ -local COMBI = {} - -COMBI.Name = "Flour" -COMBI.Description = "Converts an item into Ren, This will also make 37 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Flour"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 37 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Flour x10 */ -local COMBI = {} - -COMBI.Name = "Flour x10" -COMBI.Description = "Converts an item into Ren, This will also make 370 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Flour"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 370 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Meat */ -local COMBI = {} - -COMBI.Name = "Meat" -COMBI.Description = "Converts an item into Ren, This will also make 50 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Meat"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 50 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Meat x10*/ -local COMBI = {} - -COMBI.Name = "Meat x10" -COMBI.Description = "Converts an item into Ren, This will also make 500 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Meat"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 500 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Batteries */ -local COMBI = {} - -COMBI.Name = "Batteries" -COMBI.Description = "Converts an item into Ren, This will also make 40 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Batteries"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 40 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Batteries x10*/ -local COMBI = {} - -COMBI.Name = "Batteries x10" -COMBI.Description = "Converts an item into Ren, This will also make 400 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Batteries"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 400 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Sand */ -local COMBI = {} - -COMBI.Name = "Sand" -COMBI.Description = "Converts an item into Ren, This will also make 25 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Sand"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 25 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Sand x10 */ -local COMBI = {} - -COMBI.Name = "Sand x10 " -COMBI.Description = "Converts an item into Ren, This will also make 250 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Sand"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Bass */ -local COMBI = {} - -COMBI.Name = "Bass" -COMBI.Description = "Converts an item into Ren, This will also make 50 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Bass"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 50 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Bass x10*/ -local COMBI = {} - -COMBI.Name = "Bass x10" -COMBI.Description = "Converts an item into Ren, This will also make 500 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Bass"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 500 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Trout */ -local COMBI = {} - -COMBI.Name = "Trout" -COMBI.Description = "Converts an item into Ren, This will also make 75 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Trout"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 75 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Trout x10*/ -local COMBI = {} - -COMBI.Name = "Trout x10" -COMBI.Description = "Converts an item into Ren, This will also make 750 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Trout"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 750 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Salmon */ -local COMBI = {} - -COMBI.Name = "Salmon" -COMBI.Description = "Converts an item into Ren, This will also make 100 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Salmon"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 100 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Salmon x10*/ -local COMBI = {} - -COMBI.Name = "Salmon x10" -COMBI.Description = "Converts an item into Ren, This will also make 1 HolyRen." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Salmon"] = 100 - -COMBI.Results = {} -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Shark */ -local COMBI = {} - -COMBI.Name = "Shark" -COMBI.Description = "Converts an item into Ren, This will also make 125 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Shark"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 125 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Shark x10*/ -local COMBI = {} - -COMBI.Name = "Shark x10" -COMBI.Description = "Converts an item into Ren, This will also make 1250 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Shark"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 250 -COMBI.Results["HolyRen"] = 1 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Medicine */ -local COMBI = {} - -COMBI.Name = "Medicine" -COMBI.Description = "Converts an item into Ren, This will also make 455 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Medicine"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 455 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Medicine x10 */ -local COMBI = {} - -COMBI.Name = "Medicine x10" -COMBI.Description = "Converts an item into Ren, This will also make 4550 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Medicine"] = 100 - -COMBI.Results = {} -COMBI.Results["Ren"] = 550 -COMBI.Results["HolyRen"] = 4 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Flashlight */ -local COMBI = {} - -COMBI.Name = "Flash Light" -COMBI.Description = "Converts an item into Ren, This will also make 140 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Flashlight"] = 1 - -COMBI.Results = {} -COMBI.Results["Ren"] = 140 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Wrist Watch */ -local COMBI = {} - -COMBI.Name = "Wrist Watch" -COMBI.Description = "Converts an item into Ren, This will also make 61 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Wrist Watch"] = 1 - -COMBI.Results = {} -COMBI.Results["Ren"] = 61 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Welder */ -local COMBI = {} - -COMBI.Name = "Welder" -COMBI.Description = "Converts an item into Ren, This will also make 455 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Welder"] = 1 - -COMBI.Results = {} -COMBI.Results["Ren"] = 35 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" ) - -/* Medicine */ -local COMBI = {} - -COMBI.Name = "Medicine" -COMBI.Description = "Converts an item into Ren, This will also make 455 Ren." -COMBI.Entity = "gms_rensellshop" - -COMBI.Req = {} -COMBI.Req["Medicine"] = 10 - -COMBI.Results = {} -COMBI.Results["Ren"] = 455 - -GMS.RegisterCombi( COMBI, "gms_rensellshop" )
\ No newline at end of file diff --git a/ftp_gmstranded/gamemode/init.lua b/ftp_gmstranded/gamemode/init.lua deleted file mode 100644 index 4051ca6..0000000 --- a/ftp_gmstranded/gamemode/init.lua +++ /dev/null @@ -1,3257 +0,0 @@ - --- Send clientside files -AddCSLuaFile( "shared.lua" ) -AddCSLuaFile( "cl_init.lua" ) -AddCSLuaFile( "cl_scoreboard.lua" ) -AddCSLuaFile( "cl_qmenu.lua" ) -AddCSLuaFile( "cl_panels.lua" ) -AddCSLuaFile( "cl_hud.lua" ) -AddCSLuaFile( "unlocks.lua" ) -AddCSLuaFile( "combinations.lua" ) -AddCSLuaFile( "combinations2.lua" ) -AddCSLuaFile( "combirenbuy.lua" ) -AddCSLuaFile( "combirensell.lua" ) -AddCSLuaFile( "time_weather.lua" ) -AddCSLuaFile( "cl_deathmenu.lua" ) - -include( "shared.lua" ) -include( "processes.lua" ) -include( "chatcommands.lua" ) --- include( "resources.lua" ) - ---Vars -GM.NextSaved = 0 -GM.NextLoaded = 0 - ---Locals -local PlayerMeta = FindMetaTable( "Player" ) -local EntityMeta = FindMetaTable( "Entity" ) - ---Tribes table -if ( !GM.Tribes ) then - GM.Tribes = GM.Tribes or {} - table.insert( GM.Tribes, { name = "The Stranded", color = Color( 200, 200, 0 ), password = false } ) - table.insert( GM.Tribes, { name = "Survivalists", color = Color( 225, 225, 225 ), password = false } ) - table.insert( GM.Tribes, { name = "Anonymous", color = Color( 0, 145, 145 ), password = false } ) - table.insert( GM.Tribes, { name = "The Gummies", color = Color( 255, 23, 0 ), password = false } ) - table.insert( GM.Tribes, { name = "The Dynamics", color = Color( 0, 72, 255 ), password = false } ) - table.insert( GM.Tribes, { name = "Scavengers", color = Color( 8, 255, 0 ), password = false } ) -end - -GM.AntlionBarrowSpawns = {} -GM.AntlionBarrowSpawns[ "gm_construct" ] = { Vector( -4321.8149, -2551.3449, 257.5130 ) } -GM.AntlionBarrowSpawns[ "gms_rollinghills" ] = { Vector( 3131.2876, -980.5972, 519.5605 ), Vector( -4225.0200, 6009.3516, 513.1411 ) } -GM.AntlionBarrowSpawns[ "gms_rollinghills_daynight" ] = GM.AntlionBarrowSpawns[ "gms_rollinghills" ] -GM.AntlionBarrowSpawns[ "gms_rollinghills_daynight_b1" ] = GM.AntlionBarrowSpawns[ "gms_rollinghills" ] - -GM.AntlionBarrowSpawns[ "gms_nowhere2" ] = { Vector( 3918.7753, 5111.8149, 7.5218 ), Vector( -2061.3061, 4842.8325, 7.6148 ) } -GM.AntlionBarrowSpawns[ "gms_minisurvival_v2" ] = { Vector( -2818.7075, 3132.7507, -529.3529 ), Vector( -1423.5445, -1801.8461, -521.4026 ) } - -GM.AntlionBarrowSpawns[ "gms_coastal_outlands" ] = { - -Vector( 5682.056152, -504.173035, 181.781555 ), -Vector( 5960.534180, 10054.454102, 83.857697 ), -Vector( 2401.916504, 431.268372, -11125.555664 ), -Vector( 3803.869141, 7341.371094, -11190.447266 ), -Vector( 2804.810303, 12146.677734, -9125.259766 ), - -} - -GM.TreeSpawns = {} - -GM.TreeSpawns[ "gms_coastal_outlands" ] = { - -// The third coordinate is the height coordinate -// Always subtract 70 to the height coord if it is positive so that the tree will be touching the floor - -Vector( 1462.160522, -3664.370361, -10941.564453 ), -Vector( 3718.633545, -1710.644409, -11269.974609 ), -Vector( 3159.402588, 145.593597, -11045.797852 ), -Vector( 2519.847168, -547.534180, -11161.646484 ), -Vector( 4932.186035, 4456.111328, -11258.104492 ), -Vector( 4781.265137, 6047.670410, -11249.711914 ), -Vector( 3673.399170, 5922.402832, -11243.965820 ), -Vector( 3063.780273, 6409.881348, -11238.132813 ), -Vector( 5274.083496, 8890.347656, -10530.000000 ), -Vector( 5899.765137, 6888.799316, -10543.629883 ), -Vector( 6781.679199, 6864.066895, -10404.078125 ), -Vector( 7762.570313, 8027.228516, -9794.528320 ), -Vector( 3582.199219, 8849.200195, -10587.720703 ), -Vector( 2345.549072, 9190.130859, -9654.171875 ), -Vector( -184.908630, 9758.339844, -9654.647461 ), -Vector( -1548.173218, 10890.804688, -9306.844727 ), -Vector( -791.436951, 11616.236328, -9311.025391 ), -Vector( -1412.835571, 12691.185547, -9611.835938 ), -Vector( 504.700775, 13039.500977, -9156.863281 ), -Vector( 1297.606201, 12465.360352, -9147.304688 ), -Vector( 2329.148193, 11747.046875, -9157.968750 ), -Vector( 3458.504883, 9959.944336, -9299.968750 ), -Vector( 5360.672363, 4706.935547, 344.907623 ), -Vector( 4492.113281, 4696.718750, 319.830444 ), -Vector( 4619.547852, 5449.032715, 407.463806 ), -Vector( 5092.520508, 5595.101563, 535.216309 ), -Vector( 5451.174805, 4665.181152, 354.842255 ), -Vector( 4171.684570, 2509.103271, 370.570892 ), -Vector( 5031.233398, 1786.687256, 311.406921 ), -Vector( 4515.268555, 136.138535, 327.624390 ), -Vector( 2986.565674, -3083.914551, 866.749268 ), -Vector( 3086.577148, -7007.732910, 1510.264038 ), -Vector( 3577.333252, -9913.345703, 1559.749146 ), -Vector( 2075.320313, 9463.977539, 152.691238 ), -Vector( 7145.083008, 8708.809570, -9852.012695 ) - -} - -util.AddNetworkString('givePlayerWeapon') -util.AddNetworkString('givePlayerResource') - --- Give player weapons from grave -net.Receive('givePlayerWeapon', function(len, ply) - - local wepToGive = net.ReadString() - local wepSlot = net.ReadInt(32) - local weptbl = ply:GetEyeTrace().Entity.deathWeapons - table.remove(weptbl, wepSlot) - - ply:Give(wepToGive) - - - -end) - ---Give player resource from grave -net.Receive('givePlayerResource', function(len, ply) - - local ResToGive = net.ReadString() - local Amount = net.ReadInt(32) - local resSlot = net.ReadInt(32) - local restbl = ply:GetEyeTrace().Entity.deathResources - local tbl1 = string.Split(restbl[resSlot], " ") - local tbl2 = string.Split(tbl1[2], "x") - local amt = tbl2[2] - - ply:IncResource( ResToGive, Amount ) - - if (amt - Amount <= 0) then - - table.remove(restbl, resSlot) - else - amt = amt - Amount - restbl[resSlot] = tbl1[1] .. " x" .. amt - - end - - -end) - --- Custom anlion barrow auto placement -hook.Add( "InitPostEntity", "gms_custom_antspawns", function() - if ( !GAMEMODE.AntlionBarrowSpawns[ game.GetMap() ] ) then return end - for id, pos in pairs( GAMEMODE.AntlionBarrowSpawns[ game.GetMap() ] ) do - local ent = ents.Create( "gms_antlionbarrow" ) - ent:SetPos( pos ) - ent:Spawn() - ent.GMSAutoSpawned = true - ent:SetNetworkedString( "Owner", "World" ) - end - -end ) - --- Custom tree auto placement -hook.Add( "InitPostEntity", "gms_custom_treespawns", function() - - if ( !GAMEMODE.TreeSpawns[ game.GetMap() ] ) then return end - for id, pos in pairs( GAMEMODE.TreeSpawns[ game.GetMap() ] ) do - local ent = ents.Create( "gms_tree" ) - ent:SetPos( pos ) - ent:Spawn() - ent.GMSAutoSpawned = true - ent:SetNetworkedString( "Owner", "World" ) - end -end ) - --- Find tribe by ID -function GM.FindTribeByID( id ) - for tid, tabl in pairs( GAMEMODE.Tribes ) do - if ( tid == id ) then return tabl end - end - return false -end - --- Cancel process -concommand.Add( "gms_cancelprocess", function( ply, cmd, args ) ply:CancelProcess() end ) - -/* Menu toggles */ -function GM:ShowHelp( ply ) end -function GM:ShowTeam( ply ) end -function GM:ShowSpare1( ply ) end - -function GM:ShowSpare2( ply ) - if ( ply:GetNWBool( "AFK" ) ) then - GAMEMODE.AFK( ply, "gms_afk", {} ) - elseif ( ply:GetNWBool( "Sleeping" ) ) then - ply:Wakeup() - end - ply:CancelProcess() -end - - -/* ---------------------------------------------------------------------------------------------------- - Player Functions ----------------------------------------------------------------------------------------------------- */ - -function PlayerMeta:SendMessage( text, duration, color ) - if ( !IsValid( self ) ) then return end - local duration = duration or 3 - local color = color or color_white - - umsg.Start( "gms_sendmessage", self ) - umsg.String( text ) - umsg.Short( duration ) - umsg.String( color.r .. "," .. color.g .. "," .. color.b .. "," .. color.a ) - umsg.End() -end - -function PlayerMeta:OpenCombiMenu( str ) - umsg.Start( "gms_OpenCombiMenu", self ) - umsg.String( str ) - umsg.End() -end - -util.AddNetworkString('deathmenu') - -function PlayerMeta:DeathMenu( res, wep ) - net.Start('deathmenu') - net.WriteTable(res) - net.WriteTable(wep) - net.Send(self) -end - -function PlayerMeta:SendAchievement( text ) - umsg.Start( "gms_sendachievement", self ) - umsg.String( text ) - umsg.End() - - local sound = CreateSound( self, Sound( "music/hl1_song11.mp3" ) ) - sound:Play() - timer.Simple( 5.5, function() sound:Stop() end ) -end - -function PlayerMeta:SetSkill( skill, int ) - skill = string.Capitalize( skill ) - if ( !self.Skills[ skill ] ) then self.Skills[ skill ] = 0 end - - if ( skill != "Survival" ) then - int = math.Clamp( int, 0, 200 ) - else - self.MaxResources = ( int * 5 ) + 25 - end - self.Skills[ skill ] = int - - umsg.Start( "gms_SetSkill", self ) - umsg.String( skill ) - umsg.Short( self:GetSkill( skill ) ) - umsg.End() -end - -function PlayerMeta:GetSkill( skill ) - skill = string.Capitalize( skill ) - if ( skill == "Survival" ) then self:SetNWInt( skill, self.Skills[skill] ) end - return self.Skills[ skill ] or 0 -end - -function PlayerMeta:IncSkill( skill, int ) - skill = string.Capitalize( skill ) - if ( !self.Skills[ skill ] ) then self:SetSkill( skill, 0 ) end - if ( !self.Experience[ skill ] ) then self:SetXP( skill, 0 ) end - - if ( skill != "Survival" ) then - int = math.Clamp( int, 0, 200 ) - for id = 1, int do self:IncXP( "Survival", 20 ) end - self:SendMessage( string.Replace( skill, "_", " " ) .. " +" .. int, 3, Color( 10, 200, 10, 255 ) ) - else - self.MaxResources = self.MaxResources + 5 - self:SendAchievement( "Level Up!" ) - end - - self.Skills[skill] = self.Skills[skill] + int - - umsg.Start( "gms_SetSkill", self ) - umsg.String( skill ) - umsg.Short( self:GetSkill( skill ) ) - umsg.End() - - self:CheckForUnlocks() -end - -function PlayerMeta:DecSkill( skill, int ) - skill = string.Capitalize( skill ) - self.Skills[skill] = math.max( self.Skills[skill] - int, 0 ) - - umsg.Start( "gms_SetSkill", self ) - umsg.String( skill ) - umsg.Short( self:GetSkill( skill ) ) - umsg.End() -end - -function PlayerMeta:SetXP( skill, int ) - skill = string.Capitalize( skill ) - if ( !self.Skills[skill] ) then self:SetSkill( skill, 0 ) end - if ( !self.Experience[skill] ) then self.Experience[skill] = 0 end - - self.Experience[skill] = int - - umsg.Start( "gms_SetXP", self ) - umsg.String( skill ) - umsg.Short( self:GetXP( skill ) ) - umsg.End() -end - -function PlayerMeta:GetXP( skill ) - skill = string.Capitalize( skill ) - return self.Experience[skill] or 0 -end - -function PlayerMeta:IncXP( skill, int ) - skill = string.Capitalize( skill ) - if ( !self.Skills[skill] ) then self.Skills[skill] = 0 end - if ( !self.Experience[skill] ) then self.Experience[skill] = 0 end - - if ( self.Experience[skill] + int >= 100 ) then - self.Experience[skill] = 0 - self:IncSkill( skill, 1 ) - else - self.Experience[skill] = self.Experience[skill] + int - end - - umsg.Start( "gms_SetXP", self ) - umsg.String( skill ) - umsg.Short( self:GetXP( skill ) ) - umsg.End() -end - -function PlayerMeta:DecXP( skill, int ) - skill = string.Capitalize( skill ) - self.Experience[skill] = self.Experience[skill] - int - - umsg.Start( "gms_SetXP", self ) - umsg.String( skill ) - umsg.Short( self:GetXP( skill ) ) - umsg.End() -end - -function PlayerMeta:SetResource( resource, int ) - resource = string.Capitalize( resource ) - if ( !self.Resources[resource] ) then self.Resources[resource] = 0 end - - - self.Resources[resource] = int - - umsg.Start( "gms_SetResource", self ) - umsg.String( resource ) - umsg.Short( int ) - umsg.End() -end - -function PlayerMeta:GetResource( resource ) - resource = string.Capitalize( resource ) - return self.Resources[ resource ] or 0 -end - -function PlayerMeta:IncResource( resource, int ) - resource = string.Capitalize( resource ) - - if ( !self.Resources[resource] ) then self.Resources[resource] = 0 end - local all = self:GetAllResources() - local max = self.MaxResources - - if ( all + int > max ) then - self.Resources[resource] = self.Resources[resource] + ( max - all ) - self:DropResource( resource, ( all + int ) - max ) - self:SendMessage( "You can't carry anymore!", 3, Color( 200, 0, 0, 255 ) ) - else - self.Resources[resource] = self.Resources[resource] + int - end - - umsg.Start( "gms_SetResource", self ) - umsg.String( resource ) - umsg.Short( self:GetResource( resource ) ) - umsg.End() -end - -function PlayerMeta:DecResource( resource, int ) - if ( !self.Resources[resource] ) then self.Resources[resource] = 0 end - self.Resources[resource] = self.Resources[resource] - int - - local r = self.Resources[resource] - if ( resource == "Flashlight" and r < 1 ) then self:Flashlight( false ) end - if ( resource == "Batteries" ) then - local maxPow = 50 - if ( r ) then maxPow = math.min( maxPow + r * 50, 500 ) end - self.Power = math.min( self.Power, maxPow ) - self:UpdateNeeds() - end - - umsg.Start( "gms_SetResource", self ) - umsg.String( resource ) - umsg.Short( self:GetResource( resource ) ) - umsg.End() -end - -function PlayerMeta:GetAllResources() - local num = 0 - - for k, v in pairs( self.Resources ) do - num = num + v - end - - return num -end - -function PlayerMeta:CreateBuildingSite( pos, angle, model, class, cost ) - local rep = ents.Create( "gms_buildsite" ) - rep:SetPos( pos ) - rep:SetAngles( angle ) - rep.Costs = cost - rep:Setup( model, class ) - rep:Spawn() - - rep.Player = self - rep.OwnerTable = { Team = self:Team(), SteamID = self:SteamID(), Name = self:Name(), EntIndex = self:EntIndex() } - - self:SetNetworkedEntity( "Hasbuildingsite", rep ) - - SPropProtection.PlayerMakePropOwner( self , rep ) - return rep -end - -local NoDropModels = { - "models/props_c17/furniturefireplace001a.mdl", - "models/props_c17/factorymachine01.mdl", - "models/Gibs/airboat_broken_engine.mdl", - "models/props_c17/furniturestove001a.mdl", - "models/props_wasteland/controlroom_desk001b.mdl", - "models/props_c17/FurnitureFridge001a.mdl", - "models/props_lab/reciever_cart.mdl", - "models/props_trainstation/trainstation_clock001.mdl" -} - -function PlayerMeta:CreateStructureBuildingSite( pos, angle, model, class, cost, name ) - local rep = ents.Create( "gms_buildsite" ) - local str = ":" - for k, v in pairs( cost ) do - str = str .. "\n" .. string.Replace( k, "_", " " ) .. " ( " .. v .. "x )" - end - - rep:SetAngles( angle ) - rep.Costs = cost - rep:Setup( model, class ) - rep:SetPos( pos ) - rep.Name = name - rep:SetNWString( "Name", name ) - rep:SetNWString( "Resources", str ) - rep:Spawn() - - local cormin, cormax = rep:WorldSpaceAABB() - local offset = cormax - cormin - - if ( model == "models/props_c17/FurnitureFridge001a.mdl" ) then pos = pos + Vector( 0, 0, 10 ) end - rep:SetPos( Vector( pos.x, pos.y, pos.z + ( offset.z / 2 ) ) ) - if ( !table.HasValue( NoDropModels, model ) ) then - rep:DropToGround() - end - - self:SetNWEntity( "Hasbuildingsite", rep ) - rep.Player = self - rep.OwnerTable = { Team = self:Team(), SteamID = self:SteamID(), Name = self:Name(), EntIndex = self:EntIndex() } - SPropProtection.PlayerMakePropOwner( self, rep ) - return rep -end - -function PlayerMeta:GetBuildingSite() - return self:GetNWEntity( "Hasbuildingsite" ) -end - -function PlayerMeta:DropResource( resource, int ) - local nearby = {} - - for k, v in pairs( ents.FindByClass( "gms_resource*" ) ) do - if ( v:GetPos():Distance( self:GetPos() ) < 150 ) then - if ( v:GetClass() == "gms_resourcedrop" and v.Type != resource ) then - else - table.insert( nearby, v ) - end - end - end - - for id, ent in pairs( nearby ) do - if ( !SPropProtection.PlayerCanTouch( self, ent ) ) then continue end - if ( ent:GetClass() == "gms_resourcedrop" ) then - ent.Amount = ent.Amount + int - ent:SetResourceDropInfoInstant( ent.Type, ent.Amount ) - return - else - if ( !ent.Resources ) then ent.Resources = {} end - - if ( ent.Resources[ resource ] ) then - ent.Resources[ resource ] = ent.Resources[ resource ] + int - else - ent.Resources[ resource ] = int - end - - ent:SetResPackInfo( resource, ent.Resources[ resource ] ) - return - end - end - - local ent = ents.Create( "gms_resourcedrop" ) - ent:SetPos( self:TraceFromEyes( 60 ).HitPos + Vector( 0, 0, 15 ) ) - ent:SetAngles( self:GetAngles() ) - ent:Spawn() - - ent:GetPhysicsObject():Wake() - - ent.Type = resource - ent.Amount = int - - ent:SetResourceDropInfo( ent.Type, ent.Amount ) - SPropProtection.PlayerMakePropOwner( self, ent ) -end - -function PlayerMeta:SetFood( int ) - if ( int > 1000 ) then - int = 1000 - end - - self.Hunger = int - self:UpdateNeeds() -end - -function PlayerMeta:SetThirst( int ) - if ( int > 1000 ) then - int = 1000 - end - - self.Thirst = int - self:UpdateNeeds() -end - -function PlayerMeta:Heal( int ) - self:SetHealth( math.min( self:Health() + int, self:GetMaxHealth() ) ) -end - -function PlayerMeta:AddUnlock( text ) - self.FeatureUnlocks[text] = 1 - - umsg.Start( "gms_AddUnlock", self ) - umsg.String( text ) - umsg.End() - - if ( GMS.FeatureUnlocks[text].OnUnlock ) then GMS.FeatureUnlocks[text].OnUnlock( self ) end -end - -function PlayerMeta:HasUnlock( text ) - if ( self.FeatureUnlocks and self.FeatureUnlocks[text] ) then return true end - return false -end - -function PlayerMeta:CheckForUnlocks() - for k, unlock in pairs( GMS.FeatureUnlocks ) do - if ( !self:HasUnlock( k ) ) then - local NrReqs = 0 - - for skill, value in pairs( unlock.Req ) do - if ( self:GetSkill( skill ) >= value ) then - NrReqs = NrReqs + 1 - end - end - - if ( NrReqs == table.Count( unlock.Req ) ) then - self:AddUnlock( k ) - end - end - end -end - -function PlayerMeta:TraceFromEyes( dist ) - return util.TraceLine( { - start = self:GetShootPos(), - endpos = self:GetShootPos() + ( self:GetAimVector() * dist ), - filter = self - } ) -end - -function PlayerMeta:UpdateNeeds() - umsg.Start( "gms_setneeds", self ) - umsg.Short( self.Sleepiness ) - umsg.Short( self.Hunger ) - umsg.Short( self.Thirst ) - umsg.Short( self.Oxygen ) - umsg.Short( self.Power ) - umsg.Short( Time ) - umsg.End() -end - -function PlayerMeta:PickupResourceEntity( ent ) - if ( !SPropProtection.PlayerCanTouch( self, ent ) ) then return end - - local int = ent.Amount - local room = self.MaxResources - self:GetAllResources() - - if ( room <= 0 ) then self:SendMessage( "You can't carry anymore!", 3, Color( 200, 0, 0, 255 ) ) return end - if ( room < int ) then int = room end - ent.Amount = ent.Amount - int - if ( ent.Amount <= 0 ) then ent:Fadeout() else ent:SetResourceDropInfo( ent.Type, ent.Amount ) end - - self:IncResource( ent.Type, int ) - self:SendMessage( "Picked up " .. string.Replace( ent.Type, "_", " " ) .. " ( " .. int .. "x )", 4, Color( 10, 200, 10, 255 ) ) -end - -function PlayerMeta:PickupResourceEntityPack( ent ) - if ( !SPropProtection.PlayerCanTouch( self, ent ) ) then return end - - if ( table.Count( ent.Resources ) > 0 ) then - for res, int in pairs( ent.Resources ) do - local room = self.MaxResources - self:GetAllResources() - - if ( room <= 0 ) then self:SendMessage( "You can't carry anymore!", 3, Color( 200, 0, 0, 255 ) ) return end - if ( room < int ) then int = room end - ent.Resources[res] = ent.Resources[res] - int - - ent:SetResPackInfo( res, ent.Resources[res] ) - if ( ent.Resources[res] <= 0 ) then ent.Resources[res] = nil end - - self:IncResource( res, int ) - self:SendMessage( "Picked up " .. string.Replace( res, "_", " " ) .. " ( " .. int .. "x )", 4, Color( 10, 200, 10, 255 ) ) - end - end -end - -function PlayerMeta:MakeLoadingBar( msg ) - umsg.Start( "gms_MakeLoadingBar", self ) - umsg.String( msg ) - umsg.End() -end - -function PlayerMeta:StopLoadingBar() - umsg.Start( "gms_StopLoadingBar",self ) - umsg.End() -end - -function PlayerMeta:MakeSavingBar( msg ) - umsg.Start( "gms_MakeSavingBar", self ) - umsg.String( msg ) - umsg.End() -end - -function PlayerMeta:StopSavingBar() - umsg.Start( "gms_StopSavingBar", self ) - umsg.End() -end - -function PlayerMeta:AllSmelt( ResourceTable ) - local resourcedata = {} - resourcedata.Req = {} - resourcedata.Results = {} - local AmountReq = 0 - for k, v in pairs( ResourceTable.Req ) do - if ( self:GetResource( k ) > 0 ) then - if ( self:GetResource( k ) <= ResourceTable.Max ) then - resourcedata.Req[k] = self:GetResource( k ) - AmountReq = AmountReq + self:GetResource( k ) - else - resourcedata.Req[k] = ResourceTable.Max - AmountReq = AmountReq + ResourceTable.Max - self:SendMessage( "You can only do " .. tostring( ResourceTable.Max ) .. " " .. string.Replace( k, "_", " " ) .. " at a time.", 3, Color( 200, 0, 0, 255 ) ) - end - else - resourcedata.Req[k] = 1 - end - end - for k, v in pairs( ResourceTable.Results ) do - resourcedata.Results[k] = AmountReq - end - return resourcedata -end - -function PlayerMeta:Sleep() - if ( !self:Alive() or self:GetNWBool( "Sleeping" ) or self:GetNWBool( "AFK" ) ) then return end - if ( self.Sleepiness > 700 ) then self:SendMessage( "You're not tired enough.", 3, Color( 255, 255, 255, 255 ) ) return end - - self:SetNWBool( "Sleeping", true ) - self:Freeze( true ) - - -- Check for shelter - local tr = util.TraceLine( { - start = self:GetShootPos(), - endpos = self:GetShootPos() + ( self:GetUp() * 300 ), - filter = self - } ) - - self.NeedShelter = false - if ( !tr.HitWorld and !tr.HitNonWorld ) then - self.NeedShelter = true - end - - self:EmitSound( "stranded/start_sleeping.wav" ) -end - -function PlayerMeta:Wakeup() - if ( !self:GetNWBool( "Sleeping" ) ) then return end - self:SetNWBool( "Sleeping", false ) - self:Freeze( false ) - - --Check for shelter - local trace = {} - trace.start = self:GetShootPos() - trace.endpos = trace.start + ( self:GetUp() * 300 ) - trace.filter = self - - local tr = util.TraceLine( trace ) - - if ( self.NeedShelter ) then - self:SendMessage( "I should get something to sleep under next time...", 6, Color( 200, 0, 0, 255 ) ) - else - self:SendMessage( "Ah, nothing like a good nights sleep!", 5, Color( 255, 255, 255, 255 ) ) - end -end - -/* ---------------------------------------------------------------------------------------------------- - Entity Functions ----------------------------------------------------------------------------------------------------- */ - -function EntityMeta:SetResourceDropInfo( strType, int ) - timer.Simple( 0.5, function() self:SetResourceDropInfoInstant( strType, int ) end ) -end - -function EntityMeta:SetResourceDropInfoInstant( strType, int ) - for k, v in pairs( player.GetAll() ) do - local strType = strType or "Error" - umsg.Start( "gms_SetResourceDropInfo", v ) - umsg.String( self:EntIndex() ) - umsg.String( string.gsub( strType, "_", " " ) ) - umsg.Short( self.Amount ) - umsg.End() - end -end - -function EntityMeta:SetResPackInfo( strType, int ) - for k, v in pairs( player.GetAll() ) do - local strType = strType or "Error" - umsg.Start( "gms_SetResPackInfo", v ) - umsg.String( self:EntIndex() ) - umsg.String( string.gsub( strType, "_", " " ) ) - umsg.Short( int ) - umsg.End() - end -end - - -function EntityMeta:SetFoodInfo( strType ) - timer.Simple( 0.5, function() self:SetFoodInfoInstant( strType ) end ) -end - -function EntityMeta:SetFoodInfoInstant( strType ) - for k, v in pairs( player.GetAll() ) do - local strType = strType or "Error" - umsg.Start( "gms_SetFoodDropInfo", v ) - umsg.String( self:EntIndex() ) - umsg.String( string.gsub( strType, "_", " " ) ) - umsg.End() - end -end - -function EntityMeta:DropToGround() - local trace = {} - trace.start = self:GetPos() - trace.endpos = trace.start + Vector( 0, 0, -100000 ) - trace.mask = MASK_SOLID_BRUSHONLY - trace.filter = self - - local tr = util.TraceLine( trace ) - - self:SetPos( tr.HitPos ) -end - -function GM.ReproduceTrees() - local GM = GAMEMODE - if ( GetConVarNumber( "gms_ReproduceTrees" ) == 1 ) then - local trees = {} - for k, v in pairs( ents.GetAll() ) do - if ( v:IsTreeModel() ) then - table.insert( trees, v ) - end - end - - if ( #trees < GetConVarNumber( "gms_MaxReproducedTrees" ) ) then - for k, ent in pairs( trees ) do - local num = math.random( 1, 3 ) - - if ( num == 1 ) then - local nearby = {} - for k, v in pairs( ents.FindInSphere( ent:GetPos(), 50 ) ) do - if ( v:GetClass() == "gms_seed" or v:IsProp() ) then - table.insert( nearby, v ) - end - end - - if ( #nearby < 3 ) then - local pos = ent:GetPos() + Vector( math.random( -500, 500 ), math.random( -500, 500 ), 0 ) - local retries = 50 - - while ( ( pos:Distance( ent:GetPos() ) < 200 or GMS.ClassIsNearby( pos, "prop_physics", 100 ) ) and retries > 0 ) do - pos = ent:GetPos() + Vector( math.random( -300, 300 ),math.random( -300, 300 ), 0 ) - retries = retries - 1 - end - - local pos = pos + Vector( 0, 0, 500 ) - - local seed = ents.Create( "gms_seed" ) - seed:SetPos( pos ) - seed:DropToGround() - seed:Setup( "tree", 180 ) - seed:SetNetworkedString( "Owner", "World" ) - seed:Spawn() - end - end - end - end - if ( #trees == 0 ) then - local info = {} - for i = 1, 20 do - info.pos = Vector( math.random( -10000, 10000 ), math.random( -10000, 10000 ), 1000 ) - info.Retries = 50 - - --Find pos in world - while ( util.IsInWorld( info.pos ) == false and info.Retries > 0 ) do - info.pos = Vector( math.random( -10000, 10000 ),math.random( -10000, 10000 ), 1000 ) - info.Retries = info.Retries - 1 - end - - --Find ground - local trace = {} - trace.start = info.pos - trace.endpos = trace.start + Vector( 0, 0, -100000 ) - trace.mask = MASK_SOLID_BRUSHONLY - - local groundtrace = util.TraceLine( trace ) - - --Assure space - local nearby = ents.FindInSphere( groundtrace.HitPos, 200 ) - info.HasSpace = true - - for k, v in pairs( nearby ) do - if ( v:IsProp() ) then - info.HasSpace = false - end - end - - --Find sky - local trace = {} - trace.start = groundtrace.HitPos - trace.endpos = trace.start + Vector( 0, 0, 100000 ) - - local skytrace = util.TraceLine( trace ) - - --Find water? - local trace = {} - trace.start = groundtrace.HitPos - trace.endpos = trace.start + Vector( 0, 0, 1 ) - trace.mask = MASK_WATER - - local watertrace = util.TraceLine( trace ) - - --All a go, make entity - if ( info.HasSpace and skytrace.HitSky and !watertrace.Hit and ( groundtrace.MatType == MAT_DIRT or groundtrace.MatType == MAT_GRASS or groundtrace.MatType == MAT_SAND ) ) then - local seed = ents.Create( "gms_seed" ) - seed:SetPos( groundtrace.HitPos ) - seed:DropToGround() - seed:Setup( "tree", 180 + math.random( -20, 20 ) ) - seed:SetNetworkedString( "Owner", "World" ) - seed:Spawn() - end - end - end - end - - timer.Simple( math.random( 1, 3 ) * 60, function() GM.ReproduceTrees() end ) -end -timer.Simple( 60, function() GAMEMODE.ReproduceTrees() end ) - -GMS.LootableNPCs = { "npc_antlion", "npc_antlionguard", "npc_crow", "npc_seagull", "npc_pigeon", "npc_zombie" } - -function EntityMeta:IsLootableNPC() - return table.HasValue( GMS.LootableNPCs, self:GetClass() ) -end - -function EntityMeta:MakeCampfire() - if ( GetConVarNumber( "gms_campfire" ) <= 0 ) then return end - - local min, max = self:OBBMins(), self:OBBMaxs() - local vol = math.abs( max.x - min.x ) * math.abs( max.y - min.y ) * math.abs( max.z - min.z ) - local mul = math.min( math.sqrt( vol ) / 200, 1 ) - - if ( !self.CampFire ) then self:SetHealth( 1337 ) end - self.CampFire = true - - timer.Create( "gms_removecampfire_" .. self:EntIndex(), 480 * mul, 1, function() if ( IsValid( self ) ) then self:Fadeout() end end ) - - if ( GetConVarNumber( "gms_SpreadFire" ) >= 1 ) then - self:Ignite( 360, ( self:OBBMins() - self:OBBMaxs() ):Length() + 10 ) - else - self:Ignite( 360, 0.001 ) - end -end - -/* ---------------------------------------------------------------------------------------------------- - Entity Fading ----------------------------------------------------------------------------------------------------- */ - -GMS.FadingOutProps = {} -GMS.FadingInProps = {} - -function EntityMeta:Fadeout( speed ) - if ( !IsValid( self ) ) then return end - local speed = speed or 1 - - for k, v in pairs( player.GetAll() ) do - umsg.Start( "gms_CreateFadingProp", v ) - umsg.String( self:GetModel() ) - umsg.Vector( self:GetPos() ) - local ang = self:GetAngles() - umsg.Vector( Vector( ang.p, ang.y, ang.r ) ) - local col = self:GetColor() - umsg.Vector( Vector( col.r, col.g, col.b ) ) - umsg.Short( math.Round( speed ) ) - umsg.End() - end - - self:Remove() -end - ---Fadein is serverside -function EntityMeta:Fadein( speed ) - self.AlphaFade = 0 - self:SetRenderMode( RENDERMODE_TRANSALPHA ) - self:SetColor( Color( 255, 255, 255, 0 ) ) - self.FadeInSpeed = speed or 4 - table.insert( GMS.FadingInProps, self ) -end - -hook.Add( "Think", "gms_FadePropsThink", function() - for k, ent in pairs( GMS.FadingInProps ) do - if ( !ent or ent == NULL ) then - table.remove( GMS.FadingInProps, k ) - elseif ( !IsValid( ent ) ) then - table.remove( GMS.FadingInProps, k ) - elseif ( ent.AlphaFade >= 255 ) then - table.remove( GMS.FadingInProps, k ) - else - ent.AlphaFade = ent.AlphaFade + ent.FadeInSpeed - ent:SetColor( Color( 255, 255, 255, ent.AlphaFade ) ) - end - end -end ) - -/* ---------------------------------------------------------------------------------------------------- - Entity rising / lowering ( Used by gms_seed ) ----------------------------------------------------------------------------------------------------- */ - -GM.RisingProps = {} -GM.SinkingProps = {} - -function EntityMeta:RiseFromGround( speed, altmax ) - local speed = speed or 1 - local max; - - if ( !altmax ) then - min, max = self:WorldSpaceAABB() - max = max.z - else - max = altmax - end - - local tbl = {} - tbl.Origin = self:GetPos().z - tbl.Speed = speed - tbl.Entity = self - - self:SetPos( self:GetPos() + Vector( 0, 0, -max + 10 ) ) - table.insert( GAMEMODE.RisingProps, tbl ) -end - -function EntityMeta:SinkIntoGround( speed ) - local speed = speed or 1 - - local tbl = {} - tbl.Origin = self:GetPos().z - tbl.Speed = speed - tbl.Entity = self - tbl.Height = max - - table.insert( GAMEMODE.SinkingProps, tbl ) -end - -hook.Add( "Think", "gms_RiseAndSinkPropsHook", function() - for k, tbl in pairs( GAMEMODE.RisingProps ) do - if ( !IsValid( tbl.Entity ) || tbl.Entity:GetPos().z >= tbl.Origin ) then - table.remove( GAMEMODE.RisingProps, k ) - else - tbl.Entity:SetPos( tbl.Entity:GetPos() + Vector( 0, 0, 1 * tbl.Speed ) ) - end - end - - for k, tbl in pairs( GAMEMODE.SinkingProps ) do - if ( !IsValid( tbl.Entity ) || tbl.Entity:GetPos().z <= tbl.Origin - tbl.Height ) then - table.remove( GAMEMODE.SinkingProps, k ) - tbl.Entity:Remove() - else - tbl.Entity:SetPos( tbl.Entity:GetPos() + Vector( 0, 0, -1 * tbl.Speed ) ) - end - end -end ) - -/* ---------------------------------------------------------------------------------------------------- - Admin commands ----------------------------------------------------------------------------------------------------- */ - -concommand.Add( "gms_admin_maketree", function( ply ) - if ( IsValid( ply ) && !ply:IsAdmin() ) then ply:SendMessage( "You need admin rights for this!", 3, Color( 200, 0, 0, 255 ) ) return end - local tr = ply:TraceFromEyes( 10000 ) - GAMEMODE.MakeTree( tr.HitPos ) -end ) - -concommand.Add( "gms_admin_makerock", function( ply ) - if ( IsValid( ply ) && !ply:IsAdmin() ) then ply:SendMessage( "You need admin rights for this!", 3, Color( 200, 0, 0, 255 ) ) return end - local tr = ply:TraceFromEyes( 10000 ) - GAMEMODE.MakeGenericPlant( ply, tr.HitPos, GMS.RockModels[ math.random( 1, #GMS.RockModels ) ], true ) -end ) - -concommand.Add( "gms_admin_makefood", function( ply ) - if ( IsValid( ply ) && !ply:IsAdmin() ) then ply:SendMessage( "You need admin rights for this!", 3, Color( 200, 0, 0, 255 ) ) return end - local tr = ply:TraceFromEyes( 10000 ) - local ent = ents.Create( "prop_physics" ) - ent:SetAngles( Angle( 0, math.random( 1, 360 ), 0 ) ) - ent:SetModel( GMS.EdibleModels[math.random( 1, #GMS.EdibleModels )] ) - ent:SetPos( tr.HitPos + Vector( 0, 0, 10 ) ) - ent:Spawn() - SPropProtection.PlayerMakePropOwner( ply, ent ) -end ) - -concommand.Add( "gms_admin_makeantlionbarrow", function( ply, cmd, args ) - if ( IsValid( ply ) && !ply:IsAdmin() ) then ply:SendMessage( "You need admin rights for this!", 3, Color( 200, 0, 0, 255 ) ) return end - if ( !args[1] ) then ply:SendMessage( "Specify max antlions!", 3, Color( 200, 0, 0, 255 ) ) return end - local tr = ply:TraceFromEyes( 10000 ) - local ent = ents.Create( "gms_antlionbarrow" ) - ent:SetPos( tr.HitPos ) - ent:Spawn() - ent:SetNetworkedString( "Owner", "World" ) - ent:SetKeyValue( "MaxAntlions", args[1] ) -end ) - -concommand.Add( "gms_admin_makeplant", function( ply, cmd, args ) - if ( IsValid( ply ) && !ply:IsAdmin() ) then ply:SendMessage( "You need admin rights for this!", 3, Color( 200, 0, 0, 255 ) ) return end - - local tr = ply:TraceFromEyes( 10000 ) - local typ = tonumber( args[ 1 ] ) or math.random( 1, 5 ) - local pos = tr.HitPos - - if ( typ == 1 ) then - GAMEMODE.MakeMelon( pos, math.random( 1, 3 ), ply ) - elseif ( typ == 2 ) then - GAMEMODE.MakeBanana( pos, math.random( 1, 3 ), ply ) - elseif ( typ == 3 ) then - GAMEMODE.MakeOrange( pos, math.random( 1, 3 ), ply ) - elseif ( typ == 4 ) then - GAMEMODE.MakeBush( pos, ply ) - elseif ( typ == 5 ) then - GAMEMODE.MakeGrain( pos, ply ) - end -end ) - -concommand.Add( "gms_admin_populatearea", function( ply, cmd, args ) - if ( IsValid( ply ) && !ply:IsAdmin() ) then ply:SendMessage( "You need admin rights for this!", 3, Color( 200, 0, 0, 255 ) ) return end - if ( !args[1] or !args[2] or !args[3] ) then ply:SendMessage( "You need to specify <type> <amount> <radius>", 3, Color( 200, 0, 0, 255 ) ) return end - - for k, v in pairs( player.GetAll() ) do - v:SendMessage( "Populating area...", 3, Color( 255, 255, 255, 255 ) ) - end - - --Population time - local Amount = tonumber( args[2] ) or 10 - local info = {} - info.Amount = Amount - - if ( Amount > 200 ) then - ply:SendMessage( "Auto-capped at 200 props.", 3, Color( 200, 0, 0, 255 ) ) - info.Amount = 200 - end - - local Type = args[1] - local Amount = info.Amount - local Radius = tonumber( args[3] ) or 1000 - - --Find playertrace - local plytrace = ply:TraceFromEyes( 10000 ) - - for i = 1, Amount do - info.pos = plytrace.HitPos + Vector( math.random( -Radius, Radius ), math.random( -Radius, Radius ), 1000 ) - info.Retries = 50 - - --Find pos in world - while ( util.IsInWorld( info.pos ) == false and info.Retries > 0 ) do - info.pos = plytrace.HitPos + Vector( math.random( -Radius, Radius ), math.random( -Radius, Radius ), 1000 ) - info.Retries = info.Retries - 1 - end - - --Find ground - local trace = {} - trace.start = info.pos - trace.endpos = trace.start + Vector( 0, 0, -100000 ) - trace.mask = MASK_SOLID_BRUSHONLY - - local groundtrace = util.TraceLine( trace ) - - --Assure space - local nearby = ents.FindInSphere( groundtrace.HitPos, 200 ) - info.HasSpace = true - - for k, v in pairs( nearby ) do - if ( v:IsProp() ) then - info.HasSpace = false - end - end - - --Find sky - local trace = {} - trace.start = groundtrace.HitPos - trace.endpos = trace.start + Vector( 0, 0, 100000 ) - - local skytrace = util.TraceLine( trace ) - - --Find water? - local trace = {} - trace.start = groundtrace.HitPos - trace.endpos = trace.start + Vector( 0, 0, 1 ) - trace.mask = MASK_WATER - - local watertrace = util.TraceLine( trace ) - - --All a go, make entity - if ( Type == "Trees" ) then - if ( info.HasSpace and skytrace.HitSky and !watertrace.Hit and ( groundtrace.MatType == MAT_DIRT or groundtrace.MatType == MAT_GRASS or groundtrace.MatType == MAT_SAND ) ) then - GAMEMODE.MakeTree( groundtrace.HitPos ) - end - elseif ( Type == "Rocks" ) then - if ( !watertrace.Hit and ( groundtrace.MatType == MAT_DIRT or groundtrace.MatType == MAT_GRASS or groundtrace.MatType == MAT_SAND ) ) then - local ent = ents.Create( "prop_physics" ) - ent:SetAngles( Angle( 0, math.random( 1, 360 ), 0 ) ) - ent:SetModel( GMS.RockModels[math.random( 1, #GMS.RockModels )] ) - ent:SetPos( groundtrace.HitPos ) - ent:Spawn() - ent:SetNetworkedString( "Owner", "World" ) - ent:Fadein() - ent.PhysgunDisabled = true - ent:GetPhysicsObject():EnableMotion( false ) - end - elseif ( Type == "Random_Plant" and info.HasSpace ) then - if ( !watertrace.Hit and ( groundtrace.MatType == MAT_DIRT or groundtrace.MatType == MAT_GRASS or groundtrace.MatType == MAT_SAND ) ) then - local typ = math.random( 1, 5 ) - local pos = groundtrace.HitPos - - if ( typ == 1 ) then - GAMEMODE.MakeMelon( pos,math.random( 1, 2 ), ply ) - elseif ( typ == 2 ) then - GAMEMODE.MakeBanana( pos,math.random( 1, 2 ), ply ) - elseif ( typ == 3 ) then - GAMEMODE.MakeOrange( pos,math.random( 1, 2 ), ply ) - elseif ( typ == 4 ) then - GAMEMODE.MakeBush( pos, ply ) - elseif ( typ == 5 ) then - GAMEMODE.MakeGrain( pos, ply ) - end - end - end - end - - --Finished - for k, v in pairs( player.GetAll() ) do - v:SendMessage( "Done!", 3, Color( 255, 255, 255, 255 ) ) - end -end ) - -concommand.Add( "gms_admin_clearmap", function( ply ) - if ( IsValid( ply ) && !ply:IsAdmin() ) then ply:SendMessage( "You need admin rights for this!", 3, Color( 200, 0, 0, 255 ) ) return end - - for k, v in pairs( ents.GetAll() ) do - if ( v:IsRockModel() or v:IsTreeModel() ) then - for k, tbl in pairs( GAMEMODE.RisingProps ) do - if ( tbl.Entity == v ) then - table.remove( GAMEMODE.RisingProps, k ) - end - end - for k, tbl in pairs( GAMEMODE.SinkingProps ) do - if ( tbl.Entity == v ) then - table.remove( GAMEMODE.SinkingProps, k ) - end - end - for k, ent in pairs( GAMEMODE.FadingInProps ) do - if ( ent == v ) then - table.remove( GAMEMODE.FadingInProps, k ) - end - end - v:Fadeout() - end - end - - for k, v in pairs( player.GetAll() ) do v:SendMessage( "Cleared map.", 3, Color( 255, 255, 255, 255 ) ) end -end ) - -concommand.Add( "gms_admin_saveallcharacters", function( ply ) - if ( IsValid( ply ) && !ply:IsAdmin() ) then ply:SendMessage( "You need admin rights for this!", 3, Color( 200, 0, 0, 255 ) ) return end - - for k, v in pairs( player.GetAll() ) do - v:SaveCharacter() - end - - ply:SendMessage( "Saved characters on all current players.", 3, Color( 255, 255, 255, 255 ) ) -end ) - -function GM.ADropResource( ply, cmd, args ) - if ( IsValid( ply ) && !ply:IsAdmin() ) then ply:SendMessage( "You need admin rights for this!", 3, Color( 200, 0, 0, 255 ) ) return end - if ( args == nil or args[1] == nil ) then ply:SendMessage( "You need to at least give a resource type!", 3, Color( 200, 0, 0, 255 ) ) return end - - args[1] = string.Capitalize( args[1] ) - if ( args[2] == nil or string.lower( args[2] ) == "all" ) then args[2] = tostring( ply:GetResource( args[1] ) ) end - if ( tonumber( args[2] ) <= 0 ) then ply:SendMessage( "No zeros/negatives!", 3, Color( 200, 0, 0, 255 ) ) return end - - local int = tonumber( args[2] ) - local Type = args[1] - - ply:DropResource( Type, int ) - ply:SendMessage( "Dropped " .. string.Replace( Type, "_", " " ) .. " ( " .. int .. "x )", 3, Color( 10, 200, 10, 255 ) ) -end -concommand.Add( "gms_ADropResources", GM.ADropResource ) - -/* ---------------------------------------------------------------------------------------------------- - Console Commands ----------------------------------------------------------------------------------------------------- */ - -concommand.Add( "gms_dropall", function( ply ) - local DeltaTime = 0 - for k, v in pairs( ply.Resources ) do - if ( v > 0 ) then - timer.Simple( DeltaTime, function() ply:DecResource( k, v ) ply:DropResource( k, v ) end, ply, k, v ) - DeltaTime = DeltaTime + 0.2 - end - end - ply.NextSpawnTime = CurTime() + DeltaTime + 0.5 -end ) - -concommand.Add( "gms_salvage", function( ply ) - if ( ply.InProcess ) then return end - - local tr = ply:TraceFromEyes( 100 ) - if ( !tr.HitNonWorld ) then return end - - local ent = tr.Entity - - if ( ent:GetClass() != "gms_buildsite" && ( table.HasValue( GMS.StructureEntities, ent:GetClass() ) || ent.NormalProp == true ) && SPropProtection.PlayerCanTouch( ply, ent ) ) then - ply:DoProcess( "Salvage", 6, { Entity = ent, MatType = tr.MatType } ) - else - ply:SendMessage( "Cannot salvage this kind of prop.", 5, Color( 255, 255, 255, 255 ) ) - end -end ) - -concommand.Add( "gms_steal", function( ply, cmd, args ) - local tr = ply:TraceFromEyes( 100 ) - local ent = tr.Entity - - if ( ply:GetSkill( "Survival" ) < 30 ) then ply:SendMessage( "You can only steal at survival level 30+.", 3, Color( 200, 0, 0, 255 ) ) return end - if ( !IsValid( ent ) || !tr.HitNonWorld || ent:IsNPC() || ent:IsPlayer() || ent:GetClass() == "gms_buildsite" || ent:GetClass() == "gms_seed" || ent:GetNWString( "Owner", "None" ) == "World" || SPropProtection.PlayerCanTouch( ply, ent ) ) then - ply:SendMessage( "You can't steal this.", 3, Color( 200, 0, 0, 255 ) ) - return - end - - local cls = ent:GetClass() - local time = math.max( ent:GetVolume(), 1 ) - if ( cls == "gms_resourcedrop" ) then - time = ent.Amount * 0.5 - elseif ( cls == "gms_resourcepack" or cls == "gms_fridge" ) then - for r, n in pairs( ent.Resources ) do - time = time + ( n * 0.25 ) - end - end - - time = math.max( time - math.floor( ply:GetSkill( "Stealing" ) / 3 ), math.max( time * 0.25, 2 ) ) - ply:DoProcess( "Steal", time, { Ent = ent } ) -end ) - -function GM.PlantMelon( ply, cmd, args ) - if ( ply:GetNWInt( "plants" ) >= GetConVarNumber( "gms_PlantLimit" ) ) then - ply:SendMessage( "You have hit the plant limit.", 3, Color( 200, 0, 0, 255 ) ) - return - end - local tr = ply:TraceFromEyes( 150 ) - - if ( tr.HitWorld ) then - if ( tr.MatType == MAT_DIRT or tr.MatType == MAT_GRASS or tr.MatType == MAT_SAND ) and !GMS.IsInWater( tr.HitPos ) then - if ( ply:GetResource( "Melon_Seeds" ) >= 1 ) then - if ( !GMS.ClassIsNearby( tr.HitPos, "gms_seed", 30 ) and !GMS.ClassIsNearby( tr.HitPos, "prop_physics", 50 ) ) then - local data = {} - data.Pos = tr.HitPos - ply:DoProcess( "PlantMelon", 3, data ) - else - ply:SendMessage( "You need more distance between seeds/props.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "You need a watermelon seed.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "You cannot plant on this terrain.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "Aim at the ground to plant.", 3, Color( 200, 0, 0, 255 ) ) - end -end -concommand.Add( "gms_plantmelon", GM.PlantMelon ) - -function GM.PlantBanana( ply, cmd, args ) - if ( ply:GetNWInt( "plants" ) >= GetConVarNumber( "gms_PlantLimit" ) ) then ply:SendMessage( "You have hit the plant limit.", 3, Color( 200, 0, 0, 255 ) ) return end - local tr = ply:TraceFromEyes( 150 ) - - if ( tr.HitWorld ) then - if ( ( tr.MatType == MAT_DIRT or tr.MatType == MAT_GRASS or tr.MatType == MAT_SAND ) and !GMS.IsInWater( tr.HitPos ) ) then - if ( ply:GetResource( "Banana_Seeds" ) >= 1 ) then - if ( !GMS.ClassIsNearby( tr.HitPos, "gms_seed", 30 ) and !GMS.ClassIsNearby( tr.HitPos, "prop_physics", 50 ) ) then - ply:DoProcess( "PlantBanana", 3, { Pos = tr.HitPos } ) - else - ply:SendMessage( "You need more distance between seeds/props.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "You need a banana seed.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "You cannot plant on this terrain.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "Aim at the ground to plant.", 3, Color( 200, 0, 0, 255 ) ) - end -end -concommand.Add( "gms_plantbanana", GM.PlantBanana ) - -function GM.PlantOrange( ply, cmd, args ) - if ( ply:GetNWInt( "plants" ) >= GetConVarNumber( "gms_PlantLimit" ) ) then ply:SendMessage( "You have hit the plant limit.",3,Color( 200,0,0,255 ) ) return end - local tr = ply:TraceFromEyes( 150 ) - - if ( tr.HitWorld ) then - if ( ( tr.MatType == MAT_DIRT or tr.MatType == MAT_GRASS or tr.MatType == MAT_SAND ) and !GMS.IsInWater( tr.HitPos ) ) then - if ( ply:GetResource( "Orange_Seeds" ) >= 1 ) then - if ( !GMS.ClassIsNearby( tr.HitPos, "gms_seed", 30 ) and !GMS.ClassIsNearby( tr.HitPos, "prop_physics", 50 ) ) then - ply:DoProcess( "PlantOrange", 3, { Pos = tr.HitPos } ) - else - ply:SendMessage( "You need more distance between seeds/props.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "You need an orange seed.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "You cannot plant on this terrain.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "Aim at the ground to plant.", 3, Color( 200 ,0, 0, 255 ) ) - end -end -concommand.Add( "gms_plantorange", GM.PlantOrange ) - -function GM.PlantGrain( ply, cmd, args ) - if ( !ply:HasUnlock( "Grain_Planting" ) ) then ply:SendMessage( "You need more planting skill.", 3, Color( 200, 0, 0, 255 ) ) return end - if ( ply:GetNWInt( "plants" ) >= GetConVarNumber( "gms_PlantLimit" ) ) then ply:SendMessage( "You have hit the plant limit.", 3, Color( 200, 0, 0, 255 ) ) return end - local tr = ply:TraceFromEyes( 150 ) - - if ( tr.HitWorld ) then - local nearby = false - - for k, v in pairs( ents.FindInSphere( tr.HitPos, 50 ) ) do - if ( ( v:IsGrainModel() or v:IsProp() or v:GetClass() == "gms_seed" ) and ( tr.HitPos-Vector( v:LocalToWorld( v:OBBCenter() ).x, v:LocalToWorld( v:OBBCenter() ).y, tr.HitPos.z ) ):Length() <= 50 ) then - nearby = true - end - end - - if ( ( tr.MatType == MAT_DIRT or tr.MatType == MAT_GRASS or tr.MatType == MAT_SAND ) and !GMS.IsInWater( tr.HitPos ) ) then - if ( ply:GetResource( "Grain_Seeds" ) >= 1 ) then - if ( !nearby ) then - ply:DoProcess( "PlantGrain", 3, { Pos = tr.HitPos } ) - else - ply:SendMessage( "You need more distance between seeds/props.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "You need a grain seed.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "You cannot plant on this terrain.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "Aim at the ground to plant.", 3, Color( 200, 0, 0, 255 ) ) - end -end -concommand.Add( "gms_plantgrain", GM.PlantGrain ) - -function GM.PlantBush( ply, cmd, args ) - if ( ply:GetNWInt( "plants" ) >= GetConVarNumber( "gms_PlantLimit" ) ) then ply:SendMessage( "You have hit the plant limit.", 3, Color( 200, 0, 0, 255 ) ) return end - local tr = ply:TraceFromEyes( 150 ) - - if ( tr.HitWorld ) then - local nearby = false - - for k, v in pairs( ents.FindInSphere( tr.HitPos, 50 ) ) do - if ( ( v:IsBerryBushModel() or v:IsProp() or v:GetClass() == "gms_seed" ) and ( tr.HitPos-Vector( v:LocalToWorld( v:OBBCenter() ).x, v:LocalToWorld( v:OBBCenter() ).y, tr.HitPos.z ) ):Length() <= 50 ) then - nearby = true - end - end - - if ( ( tr.MatType == MAT_DIRT or tr.MatType == MAT_GRASS or tr.MatType == MAT_SAND ) and !GMS.IsInWater( tr.HitPos ) ) then - if ( ply:GetResource( "Berries" ) >= 1 ) then - if ( !nearby ) then - ply:DoProcess( "PlantBush", 3, { Pos = tr.HitPos } ) - else - ply:SendMessage( "You need more distance between seeds/props.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "You need a berry.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "You cannot plant on this terrain.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "Aim at the ground to plant.", 3, Color( 200, 0, 0, 255 ) ) - end -end -concommand.Add( "gms_plantbush", GM.PlantBush ) - -function GM.PlantTree( ply, cmd, args ) - if ( !ply:HasUnlock( "Sprout_Planting" ) ) then ply:SendMessage( "You need more planting skill.", 3, Color( 200, 0, 0, 255 ) ) return end - local tr = ply:TraceFromEyes( 150 ) - - if ( tr.HitWorld ) then - if ( ( tr.MatType == MAT_DIRT or tr.MatType == MAT_GRASS or tr.MatType == MAT_SAND ) and !GMS.IsInWater( tr.HitPos ) ) then - if ( ply:GetResource( "Sprouts" ) >= 1 ) then - ply:DoProcess( "PlantTree", 5, { Pos = tr.HitPos } ) - else - ply:SendMessage( "You need a sprout.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "You cannot plant on this terrain.", 3, Color( 200, 0, 0, 255 ) ) - end - else - ply:SendMessage( "Aim at the ground to plant.", 3, Color( 200, 0, 0, 255 ) ) - end -end -concommand.Add( "gms_planttree", GM.PlantTree ) - -function GM.DrinkFromBottle( ply, cmd, args ) - if ( ply:GetResource( "Water_Bottles" ) < 1 ) then ply:SendMessage( "You need a water bottle.", 3, Color( 200, 0, 0, 255 ) ) return end - ply:DoProcess( "DrinkBottle", 1.5 ) -end -concommand.Add( "gms_drinkbottle", GM.DrinkFromBottle ) - -function GM.EatBerry( ply, cmd, args ) - if ( ply:GetResource( "Berries" ) < 1 ) then ply:SendMessage( "You need some berries.", 3, Color( 200, 0, 0, 255 ) ) return end - ply:DoProcess( "EatBerry", 1.5 ) -end -concommand.Add( "gms_eatberry", GM.EatBerry ) - -function GM.TakeAMedicine( ply, cmd, args ) - if ( ply:GetResource( "Medicine" ) < 1 ) then ply:SendMessage( "You need Medicine.", 3, Color( 200, 0, 0, 255 ) ) return end - ply:DoProcess( "TakeMedicine", 1.5 ) -end -concommand.Add( "gms_takemedicine", GM.TakeAMedicine ) - -function GM.DropWeapon( ply, cmd, args ) - if ( !ply:Alive() ) then return end - if ( table.HasValue( GMS.NonDropWeapons, ply:GetActiveWeapon():GetClass() ) ) then - ply:SendMessage( "You cannot drop this!", 3, Color( 200, 0, 0, 255 ) ) - else - ply:DropWeapon( ply:GetActiveWeapon() ) - end -end -concommand.Add( "gms_dropweapon", GM.DropWeapon ) - -function GM.DropResource( ply, cmd, args ) - if ( args == nil or args[1] == nil ) then ply:SendMessage( "You need to at least give a resource type!", 3, Color( 200, 0, 0, 255 ) ) return end - - args[1] = string.Capitalize( args[1] ) - if ( !ply.Resources[args[1]] or ply.Resources[args[1]] == 0 ) then ply:SendMessage( "You don't have this kind of resource.", 3, Color( 200, 0, 0, 255 ) ) return end - if ( args[2] == nil or string.lower( args[2] ) == "all" ) then args[2] = tonumber( ply:GetResource( args[1] ) ) end - - if ( !tonumber( args[2] ) || tonumber( args[2] ) <= 0 ) then ply:SendMessage( "No zeros/negatives!", 3, Color( 200, 0, 0, 255 ) ) return end - - local int = tonumber( args[2] ) - local Type = args[1] - local res = ply:GetResource( Type ) - - if ( int > res ) then - int = res - end - ply:DropResource( Type, int ) - ply:DecResource( Type, int ) - - ply:SendMessage( "Dropped " .. string.Replace( Type, "_", " " ) .. " ( " .. int .. "x )", 3, Color( 10, 200, 10, 255 ) ) -end -concommand.Add( "gms_DropResources", GM.DropResource ) - -function GM.TakeResource( ply, cmd, args ) - if ( ply.InProcess ) then return end - - local takeAll = false - if ( args == nil or args[ 1 ] == nil ) then takeAll = true end - - local int = tonumber( args[ 2 ] ) or 99999 - local typ = string.Capitalize( args[ 1 ] or "" ) - - if ( int <= 0 ) then ply:SendMessage( "No zeros/negatives!", 3, Color( 200, 0, 0, 255 ) ) return end - - local tr = ply:TraceFromEyes( 150 ) - local ent = tr.Entity - - if ( !IsValid( ent ) ) then return end - - local cls = ent:GetClass() - - if ( cls != "gms_resourcedrop" && cls != "gms_resourcepack" && cls != "gms_fridge" ) then return end - if ( !SPropProtection.PlayerCanTouch( ply, ent ) ) then return end - if ( ( ply:GetPos() - ent:LocalToWorld( ent:OBBCenter() ) ):Length() >= 100 ) then return end - - if ( cls == "gms_resourcedrop" ) then - if ( ent.Type != typ && !takeAll ) then return end - local room = ply.MaxResources - ply:GetAllResources() - if ( room <= 0 ) then return end - if ( int >= ent.Amount ) then int = ent.Amount end - if ( room < int ) then int = room end - ent.Amount = ent.Amount - int - if ( ent.Amount <= 0 ) then ent:Fadeout() else ent:SetResourceDropInfo( ent.Type, ent.Amount ) end - - ply:IncResource( ent.Type, int ) - ply:SendMessage( "Picked up " .. string.Replace( ent.Type, "_", " " ) .. " ( " .. int .. "x )", 4, Color( 10, 200, 10, 255 ) ) - end - - if ( cls == "gms_resourcepack" ) then - for res, num in pairs( ent.Resources ) do - if ( res == typ or takeAll ) then - local totake = int - local room = ply.MaxResources - ply:GetAllResources() - if ( room <= 0 ) then return end - if ( totake >= num ) then totake = num end - if ( room < totake ) then totake = room end - ent.Resources[ res ] = num - totake - ent:SetResPackInfo( res, ent.Resources[ res ] ) - if ( ent.Resources[ res ] <= 0 ) then ent.Resources[ res ] = nil end - - ply:IncResource( res, totake ) - ply:SendMessage( "Picked up " .. string.Replace( res, "_", " " ) .. " ( " .. totake .. "x )", 4, Color( 10, 200, 10, 255 ) ) - end - end - end - - if ( takeAll ) then return end - - if ( cls == "gms_fridge" ) then - for res, num in pairs( ent.Resources ) do - if ( res == args[ 1 ] ) then - ent.Resources[ res ] = num - 1 - ent:SetResPackInfo( res, ent.Resources[ res ] ) - if ( ent.Resources[ res ] <= 0 ) then ent.Resources[ res ] = nil end - - local food = ents.Create( "gms_food" ) - food:SetPos( ent:GetPos() + Vector( 0, 0, ent:OBBMaxs().z + 16 ) ) - SPropProtection.PlayerMakePropOwner( ply, food ) - food.Value = GMS.Combinations[ "Cooking" ][ string.Replace( res, " ", "_" ) ].FoodValue - food.Name = res - food:Spawn() - food:SetFoodInfo( res ) - - timer.Simple( 300, function( food ) if ( IsValid( food ) ) then food:Fadeout( 2 ) end end, food ) - end - end - end -end -concommand.Add( "gms_TakeResources", GM.TakeResource ) // ply:PickupResourceEntityPack( ent ) - -concommand.Add( "gms_structures", function( ply ) - ply:OpenCombiMenu( "Structures" ) -end ) - -concommand.Add( "gms_combinations", function( ply ) - ply:OpenCombiMenu( "Combinations" ) -end ) - -concommand.Add( "gms_MakeCombination", function( ply, cmd, args ) - print("Concommand called with group:" .. args[1] .. " and combi " .. args[2]) - if ( !args[1] or !args[2] ) then ply:SendMessage( "Please specify a valid combination.", 3, Color( 255, 255, 255, 255 ) ) return end - - local group = args[1] - local combi = args[2] - - if ( !GMS.Combinations[ group ] ) then return end - if ( !GMS.Combinations[ group ][ combi ] ) then return end - - local tbl = GMS.Combinations[ group ][ combi ] - - if ( group == "Cooking" and tbl.Entity ) then - local nearby = false - - for k, v in pairs( ents.FindInSphere( ply:GetPos(), 100 ) ) do - if ( ( v:IsProp() and v:IsOnFire() ) or v:GetClass() == tbl.Entity ) then nearby = true end - end - - if ( !nearby ) then ply:SendMessage( "You need to be close to a fire!", 3, Color( 200, 0 ,0, 255 ) ) return end - elseif ( tbl.Entity ) then - local nearby = false - - for k, v in pairs( ents.FindInSphere( ply:GetPos(), 100 ) ) do - if ( v:GetClass() == tbl.Entity ) then nearby = true end - end - - if ( !nearby ) then ply:SendMessage( "You need to be close to a " .. tbl.Entity .. "!", 3, Color( 200, 0, 0, 255 ) ) return end - end - - --Check for skills - local numreq = 0 - - if ( tbl.SkillReq ) then - for k, v in pairs( tbl.SkillReq ) do - if ( ply:GetSkill( k ) >= v ) then - numreq = numreq + 1 - end - end - - if ( numreq < table.Count( tbl.SkillReq ) ) then ply:SendMessage( "Not enough skill.", 3, Color( 200, 0, 0, 255 ) ) return end - end - - --Check for resources - local numreq = 0 - - for k, v in pairs( tbl.Req ) do - if ( ply:GetResource( k ) ) >= v then - numreq = numreq + 1 - end - end - - if ( numreq < table.Count( tbl.Req ) and group != "Structures" ) then ply:SendMessage( "Not enough resources.", 3, Color( 200, 0, 0, 255 ) ) return end - - --All well, make stuff: - if ( group == "Cooking" ) then - local data = {} - data.Name = tbl.Name - data.FoodValue = tbl.FoodValue - data.Cost = table.Copy( tbl.Req ) - local time = 5 - - if ply:GetActiveWeapon():GetClass() == "gms_fryingpan" then - time = 2 - end - - ply:DoProcess( "Cook", time, data ) - elseif ( group == "Combinations" ) then - local data = {} - data.Name = tbl.Name - data.Res = tbl.Results - data.Cost = table.Copy( tbl.Req ) - local time = 5 - - ply:DoProcess( "MakeGeneric", time, data ) - elseif ( group == "gms_pistolgunlab" or group == "gms_gunchunks" or group == "gms_smggunlab" or group == "gms_hightechgunlab" or group == "gms_transmutator" or group == "gms_advancedtransmutator" or group == "gms_renbuyshop" or group == "gms_rensellshop" ) then - local data = {} - data.Name = tbl.Name - if ( tbl.AllSmelt == true ) then - local sourcetable = ply:AllSmelt( tbl ) - data.Res = sourcetable.Results - data.Cost = table.Copy( sourcetable.Req ) - else - data.Res = tbl.Results - data.Cost = table.Copy( tbl.Req ) - end - local timecount = 1 - for k, v in pairs( data.Cost ) do - timecount = timecount + v - end - local time = timecount * 0.3 - - if ( tbl.SwepClass != nil ) then - data.Class = tbl.SwepClass - ply:DoProcess( "MakeWeapon", time, data ) - else - ply:DoProcess( "Processing", time, data ) - end - elseif ( group == "gms_factory" ) then - local data = {} - data.Name = tbl.Name - if ( tbl.AllSmelt == true ) then - local sourcetable = ply:AllSmelt( tbl ) - data.Res = sourcetable.Results - data.Cost = table.Copy( sourcetable.Req ) - else - data.Res = tbl.Results - data.Cost = table.Copy( tbl.Req ) - end - local timecount = 1 - for k, v in pairs( data.Cost ) do - timecount = timecount + v - end - local time = timecount * 0.3 - - local smelt = false - for r,n in pairs( data.Res ) do - if ( r == "Iron" or r == "Copper" ) then smelt = true end - end - - if ( tbl.SwepClass != nil ) then - data.Class = tbl.SwepClass - ply:DoProcess( "MakeWeapon", time, data ) - elseif ( smelt ) then - time = math.max( time - math.floor( ply:GetSkill( "Smelting" ) / 5 ), math.max( timecount * 0.15, 2 ) ) - ply:DoProcess( "Smelt", time, data ) - else - ply:DoProcess( "Processing", time, data ) - end - elseif ( group == "gms_stoneworkbench" or group == "gms_copperworkbench" or group == "gms_ironworkbench" or group == "gms_silverworkbench" or group == "gms_goldworkbench" or group == "gms_steelworkbench" or group == "gms_platinumworkbench" ) then - local data = {} - data.Name = tbl.Name - data.Class = tbl.SwepClass - data.Cost = table.Copy( tbl.Req ) - - local time = 10 - if ( ply:GetActiveWeapon():GetClass() == "gms_wrench" ) then time = 7 end - time = math.max( time - math.floor( math.max( ply:GetSkill( "Weapon_Crafting" ) - 8, 0 ) / 4 ), 4 ) - - ply:DoProcess( "MakeWeapon", time, data ) - elseif ( group == "gms_techworkbench" or group == "gms_obelisk" or group == "gms_runealtar" or group == "gms_mithrilworkbench" or group == "gms_runicinfuser") then - local data = {} - data.Name = tbl.Name - data.Cost = table.Copy( tbl.Req ) - - if ( tbl.SwepClass != nil ) then - local time = 10 - if ( ply:GetActiveWeapon():GetClass() == "gms_wrench" ) then time = 7 end - time = math.max( time - math.floor( math.max( ply:GetSkill( "Weapon_Crafting" ) - 8, 0 ) / 4 ), 4 ) - data.Class = tbl.SwepClass - ply:DoProcess( "MakeWeapon", time, data ) - else - data.Res = tbl.Results - local time = 5 - ply:DoProcess( "MakeGeneric", time, data ) - end - elseif ( group == "Structures" ) then - local trs = ply:TraceFromEyes( 250 ) - if ( !trs.HitWorld ) then ply:SendMessage( "Aim at the ground to construct a structure.", 3, Color( 200, 0, 0, 255 ) ) return end - - ply:DoProcess( "MakeBuilding", 20, { - Name = tbl.Name, - Class = tbl.Results, - Cost = table.Copy( tbl.Req ), - BuildSiteModel = tbl.BuildSiteModel, - Pos = trs.HitPos - } ) - - elseif ( group == "gms_stonefurnace" ) then - local data = {} - data.Name = tbl.Name - if ( tbl.AllSmelt == true ) then - local sourcetable = ply:AllSmelt( tbl ) - data.Res = sourcetable.Results - data.Cost = table.Copy( sourcetable.Req ) - else - data.Res = tbl.Results - data.Cost = table.Copy( tbl.Req ) - end - local timecount = 1 - for k, v in pairs( data.Cost ) do - timecount = timecount + v - end - - local time = timecount * 0.5 - time = math.max( time - math.floor( ply:GetSkill( "Smelting" ) / 5 ), math.max( timecount * 0.25, 2 ) ) - - ply:DoProcess( "Smelt", time, data ) - elseif ( group == "gms_copperfurnace" ) then - local data = {} - data.Name = tbl.Name - if ( tbl.AllSmelt == true ) then - local sourcetable = ply:AllSmelt( tbl ) - data.Res = sourcetable.Results - data.Cost = table.Copy( sourcetable.Req ) - else - data.Res = tbl.Results - data.Cost = table.Copy( tbl.Req ) - end - local timecount = 1 - for k, v in pairs( data.Cost ) do - timecount = timecount + v - end - local time = timecount * 0.6 - time = math.max( time - math.floor( ply:GetSkill( "Smelting" ) / 5 ), math.max( timecount * 0.3, 2 ) ) - - ply:DoProcess( "Smelt", time, data ) - elseif ( group == "gms_ironfurnace" ) then - local data = {} - data.Name = tbl.Name - if ( tbl.AllSmelt == true ) then - local sourcetable = ply:AllSmelt( tbl ) - data.Res = sourcetable.Results - data.Cost = table.Copy( sourcetable.Req ) - else - data.Res = tbl.Results - data.Cost = table.Copy( tbl.Req ) - end - local timecount = 1 - for k, v in pairs( data.Cost ) do - timecount = timecount + v - end - local time = timecount * 0.7 - time = math.max( time - math.floor( ply:GetSkill( "Smelting" ) / 5 ), math.max( timecount * 0.35, 2 ) ) - - ply:DoProcess( "Smelt", time, data ) - elseif ( group == "gms_techfurnace" ) then - local data = {} - data.Name = tbl.Name - if ( tbl.AllSmelt == true ) then - local sourcetable = ply:AllSmelt( tbl ) - data.Res = sourcetable.Results - data.Cost = table.Copy( sourcetable.Req ) - else - data.Res = tbl.Results - data.Cost = table.Copy( tbl.Req ) - end - local timecount = 1 - for k, v in pairs( data.Cost ) do - timecount = timecount + v - end - local time = timecount * 0.7 - time = math.max( time - math.floor( ply:GetSkill( "Smelting" ) / 5 ), math.max( timecount * 0.35, 2 ) ) - - ply:DoProcess( "Smelt", time, data ) - elseif ( group == "gms_silverfurnace" ) then - local data = {} - data.Name = tbl.Name - if ( tbl.AllSmelt == true ) then - local sourcetable = ply:AllSmelt( tbl ) - data.Res = sourcetable.Results - data.Cost = table.Copy( sourcetable.Req ) - else - data.Res = tbl.Results - data.Cost = table.Copy( tbl.Req ) - end - local timecount = 1 - for k, v in pairs( data.Cost ) do - timecount = timecount + v - end - local time = timecount * 0.7 - time = math.max( time - math.floor( ply:GetSkill( "Smelting" ) / 5 ), math.max( timecount * 0.35, 2 ) ) - - ply:DoProcess( "Smelt", time, data ) - elseif ( group == "gms_goldfurnace" ) then - local data = {} - data.Name = tbl.Name - if ( tbl.AllSmelt == true ) then - local sourcetable = ply:AllSmelt( tbl ) - data.Res = sourcetable.Results - data.Cost = table.Copy( sourcetable.Req ) - else - data.Res = tbl.Results - data.Cost = table.Copy( tbl.Req ) - end - local timecount = 1 - for k, v in pairs( data.Cost ) do - timecount = timecount + v - end - local time = timecount * 0.7 - time = math.max( time - math.floor( ply:GetSkill( "Smelting" ) / 5 ), math.max( timecount * 0.35, 2 ) ) - - ply:DoProcess( "Smelt", time, data ) - elseif ( group == "gms_steelfurnace" ) then - local data = {} - data.Name = tbl.Name - if ( tbl.AllSmelt == true ) then - local sourcetable = ply:AllSmelt( tbl ) - data.Res = sourcetable.Results - data.Cost = table.Copy( sourcetable.Req ) - else - data.Res = tbl.Results - data.Cost = table.Copy( tbl.Req ) - end - local timecount = 1 - for k, v in pairs( data.Cost ) do - timecount = timecount + v - end - local time = timecount * 0.1 - time = math.max( time - math.floor( ply:GetSkill( "Smelting" ) / 5 ), math.max( timecount * 0.35, 2 ) ) - - ply:DoProcess( "Smelt", time, data ) - elseif ( group == "gms_platinumfurnace") then - local data = {} - data.Name = tbl.Name - if ( tbl.AllSmelt == true ) then - local sourcetable = ply:AllSmelt( tbl ) - data.Res = sourcetable.Results - data.Cost = table.Copy( sourcetable.Req ) - else - data.Res = tbl.Results - data.Cost = table.Copy( tbl.Req ) - end - local timecount = 1 - for k, v in pairs( data.Cost ) do - timecount = timecount + v - end - local time = timecount * 0.5 - time = math.max( time - math.floor( ply:GetSkill( "Smelting" ) / 5 ), math.max( timecount * 0.35, 2 ) ) - - - - ply:DoProcess( "Smelt", time, data ) - elseif ( group == "gms_mithrilfactory") then - local data = {} - data.Name = tbl.Name - if ( tbl.AllSmelt == true ) then - local sourcetable = ply:AllSmelt( tbl ) - data.Res = sourcetable.Results - data.Cost = table.Copy( sourcetable.Req ) - else - data.Res = tbl.Results - data.Cost = table.Copy( tbl.Req ) - end - local timecount = 1 - for k, v in pairs( data.Cost ) do - timecount = timecount + v - end - local time = timecount * 0.2 - time = math.max( time - math.floor( ply:GetSkill( "Smelting" ) / 5 ), math.max( timecount * 0.20, 2 ) ) - - - - - - - ply:DoProcess( "Smelt", time, data ) - elseif ( group == "gms_grindingstone" ) then - local data = {} - data.Name = tbl.Name - if ( tbl.AllSmelt == true ) then - local sourcetable = ply:AllSmelt( tbl ) - - for r, n in pairs( sourcetable.Results ) do - if ( r == "Flour" ) then sourcetable.Results[r] = math.floor( n * 0.6 ) end - end - - data.Res = sourcetable.Results - data.Cost = table.Copy( sourcetable.Req ) - else - data.Res = tbl.Results - data.Cost = table.Copy( tbl.Req ) - end - local timecount = 1 - for k, v in pairs( data.Cost ) do - timecount = timecount + v - end - local time = timecount * 0.75 - - ply:DoProcess( "Crush", time, data ) - end -end ) - -concommand.Add( "gms_sleep", function( ply, cmd, args ) ply:Sleep() end ) -concommand.Add( "gms_wakeup", function( ply, cmd, args ) ply:Wakeup() end ) - -function GM.AFK( ply, cmd, args ) - if ( ply:GetNWBool( "Sleeping" ) or !ply:Alive() ) then return end - if ( ply.InProcess ) then return end - if ( !ply:GetNWBool( "AFK", false ) ) then - ply:SetNWBool( "AFK", true ) - else - ply:SetNWBool( "AFK", false ) - end - - ply:Freeze( ply:GetNWBool( "AFK" ) ) -end -concommand.Add( "gms_afk", GM.AFK ) - -function GM.PlayerStuck( ply, cmd, args ) - if ( ply.InProcess ) then return end - if ( ply.Spam == true ) then ply:SendMessage( "No spamming!", 3, Color( 200, 0, 0, 255 ) ) return end - if ( ply.Spam == false or ply.Spam == nil ) then ply:SetPos( ply:GetPos() + Vector( 0, 0, 64 ) ) end - - ply.Spam = true - timer.Simple( 0.2, function() ply.Spam = false end ) -end -concommand.Add( "gms_stuck", GM.PlayerStuck ) - -function GM.MakeCampfire( ply, cmd, args ) - if ( GetConVarNumber( "gms_campfire" ) == 1 ) then - local tr = ply:TraceFromEyes( 150 ) - - if ( !tr.HitNonWorld or !tr.Entity ) then ply:SendMessage( "Aim at the prop( s ) to use for campfire.", 3, Color( 255, 255, 255, 255 ) ) return end - - local ent = tr.Entity - local cls = tr.Entity:GetClass() - - if ( ent:IsOnFire() or cls != "prop_physics" and cls != "prop_physics_multiplayer" and cls != "prop_dynamic" ) then - ply:SendMessage( "Aim at the prop( s ) to use for campfire.", 3, Color( 255, 255, 255, 255 ) ) - return - end - - local mat = tr.MatType - - if ( ply:GetResource( "Wood" ) < 5 ) then ply:SendMessage( "You need at least 5 wood to make a fire.", 5, Color( 255, 255, 255, 255 ) ) return end - - if ( mat != MAT_WOOD ) then ply:SendMessage( "Prop has to be wood, or if partially wood, aim at the wooden part.", 5, Color( 255, 255, 255, 255 ) ) return end - - local data = {} - data.Entity = ent - - if ( SPropProtection.PlayerCanTouch( ply, ent ) ) then - ply:DoProcess( "Campfire", 5, data ) - return - end - end -end -concommand.Add( "gms_makefire", GM.MakeCampfire ) - -/* ---------------------------------------------------------------------------------------------------- - Player spawn ----------------------------------------------------------------------------------------------------- */ - -function GM:PlayerInitialSpawn( ply ) - ply:SetTeam( 1 ) - - ply.Skills = {} - ply.Resources = {} - ply.Experience = {} - ply.FeatureUnlocks = {} - - ply:SetSkill( "Survival", 0 ) - ply:SetXP( "Survival", 0 ) - ply.MaxResources = 25 - ply.Loaded = true - - -- Admin info, needed clientside - if ( ply:IsAdmin() ) then - for k, v in pairs( file.Find( "gmstranded/gamesaves/*.txt", "DATA" ) ) do - local name = string.sub( v, 1, string.len( v ) - 4 ) - - if ( string.Right( name, 5 ) != "_info" ) then - umsg.Start( "gms_AddLoadGameToList", ply ) - umsg.String( name ) - umsg.End() - end - end - end - - -- Character loading - if ( file.Exists( "gmstranded/saves/" .. ply:UniqueID() .. ".txt", "DATA" ) ) then - local tbl = util.JSONToTable( file.Read( "gmstranded/saves/" .. ply:UniqueID() .. ".txt", "DATA" ) ) - - if ( tbl[ "skills" ] ) then - for k, v in pairs( tbl[ "skills" ] ) do ply:SetSkill( k, v ) end - end - - if ( tbl[ "experience" ] ) then - for k, v in pairs( tbl["experience"] ) do ply:SetXP( k, v ) end - end - - /*if ( tbl["unlocks"] ) then - for k, v in pairs( tbl["unlocks"] ) do ply.FeatureUnlocks[ k ] = v end - end*/ - - if ( tbl["resources"] ) then - for k, v in pairs( tbl["resources"] ) do ply:SetResource( k, v ) end - end - - if ( tbl["weapons"] ) then - for k, v in pairs( tbl["weapons"] ) do ply:Give( v ) end - end - - ply:StripAmmo() - - if ( tbl[ "ammo" ] ) then - for k, v in pairs( tbl[ "ammo" ] ) do ply:GiveAmmo( v, k ) end - end - - if ( !ply.Skills[ "Survival" ] ) then ply.Skills[ "Survival" ] = 0 end - - ply.FeatureUnlocks = tbl["unlocks"] - ply.MaxResources = ( ply.Skills["Survival"] * 5 ) + 25 - - ply:SendMessage( "Loaded character successfully.", 3, Color( 255, 255, 255, 255 ) ) - ply:SendMessage( "Last visited on " .. tbl.date .. ", enjoy your stay.", 10, Color( 255, 255, 255, 255 ) ) - end - - ply:SetNWInt( "plants", 0 ) - for k, v in pairs( ents.GetAll() ) do - if ( v and IsValid( v ) and v:GetNWEntity( "plantowner" ) and IsValid( v:GetNWEntity( "plantowner" ) ) and v:GetNWEntity( "plantowner" ) == ply ) then - ply:SetNWInt( "plants", ply:GetNWInt( "plants" ) + 1 ) - end - end - - local time = 2 - - local rp = RecipientFilter() - rp:AddPlayer( ply ) - - for id, t in pairs( GAMEMODE.Tribes ) do - timer.Simple( time, function() - umsg.Start( "sendTribe", rp ) - umsg.Short( id ) - umsg.String( t.name ) - umsg.Vector( Vector( t.color.r, t.color.g, t.color.b ) ) - if ( t.password == false ) then - umsg.Bool( false ) - else - umsg.Bool( true ) - end - umsg.End() - - end ) - time = time + 0.1 - end - - for _, v in ipairs( ents.FindByClass( "gms_resourcedrop" ) ) do - timer.Simple( time, function() - umsg.Start( "gms_SetResourceDropInfo", rp ) - umsg.String( v:EntIndex() ) - umsg.String( string.gsub( v.Type or "Error!", "_", " " ) ) - umsg.Short( v.Amount ) - umsg.End() - end ) - time = time + 0.1 - end - - for _, v in ipairs( table.Add( ents.FindByClass( "gms_resourcepack" ), ents.FindByClass( "gms_fridge" ) ) ) do - for res, num in pairs( v.Resources ) do - timer.Simple( time, function() - umsg.Start( "gms_SetResPackInfo", rp ) - umsg.String( v:EntIndex() ) - umsg.String( string.gsub( res, "_", " " ) ) - umsg.Short( num ) - umsg.End() - end ) - time = time + 0.1 - end - time = time + 0.1 - end - - for _, v in ipairs( ents.FindByClass( "gms_food" ) ) do - timer.Simple( time, function() - umsg.Start( "gms_SetFoodDropInfo", ply ) - umsg.String( v:EntIndex() ) - umsg.String( string.gsub( v.Name or "ERROR", "_", " " ) ) - umsg.End() - end ) - time = time + 0.1 - end -end - -local SpawnClasses = { - "info_player_deathmatch", "info_player_combine", "info_player_combine", - "info_player_rebel", "info_player_counterterrorist", "info_player_terrorist", - "info_player_axis", "info_player_allies", "gmod_player_start", - "info_player_teamspawn", "ins_spawnpoint", "aoc_spawnpoint", - "dys_spawn_point", "info_player_pirate", "info_player_viking", - "info_player_knight", "diprip_start_team_blue", "diprip_start_team_red", - "info_player_red", "info_player_blue", "info_player_coop", - "info_player_human", "info_player_zombie", "info_player_deathmatch", - "info_player_zombiemaster" -} - -function GM:PlayerSelectSpawn( pl ) - if ( GAMEMODE.TeamBased ) then - local ent = GAMEMODE:PlayerSelectTeamSpawn( pl:Team(), pl ) - if ( IsValid( ent ) ) then return ent end - end - - if ( !IsTableOfEntitiesValid( self.SpawnPoints ) ) then - self.LastSpawnPoint = 0 - self.SpawnPoints = ents.FindByClass( "info_player_start" ) - for id, cl in pairs( SpawnClasses ) do - self.SpawnPoints = table.Add( self.SpawnPoints, ents.FindByClass( cl ) ) - end - end - - local count = table.Count( self.SpawnPoints ) - if ( count == 0 ) then - MsgN( "[PlayerSelectSpawn] Error! No spawn points!" ) - return nil - end - - local ChosenSpawnPoint = nil - - for id, ChosenSpawnPoint in pairs( self.SpawnPoints ) do - - if ( IsValid( ChosenSpawnPoint ) && ChosenSpawnPoint:IsInWorld() ) then - if ( GAMEMODE:IsSpawnpointSuitable( pl, ChosenSpawnPoint, id == count ) ) then - return ChosenSpawnPoint - end - end - - end - - return ChosenSpawnPoint -end - -function GM:PlayerSpawn( ply ) - - self:SetPlayerSpeed( ply, 250, 250 ) - ply:SetMaxHealth( 100 ) - ply:UnSpectate() - - for k, v in pairs( GMS.FeatureUnlocks ) do - if ( ply:HasUnlock( k ) && v.OnUnlock ) then v.OnUnlock( ply ) end - end - - hook.Call("PlayerLoadout", self, ply) - hook.Call("PlayerSetModel", self, ply) - - ply.Sleepiness = 1000 - ply.Hunger = 1000 - ply.Thirst = 1000 - ply.Oxygen = 1000 - ply.Power = 50 - - ply.Resources = ply.Resources or {} - - if ( ply.Resources[ "Batteries" ] ) then ply.Power = math.min( ply.Power + ply.Resources[ "Batteries" ] * 50, 500 ) end - - /* GMOD CUSTOMIZATION */ - ply:UpdatePlayerColor() - - local col = ply:GetInfo( "cl_weaponcolor" ) - ply:SetWeaponColor( Vector( col ) ) - - ply:SetupHands() - - ply:UpdateNeeds() -end - -function GM:PlayerSetModel( ply ) - local cl_playermodel = ply:GetInfo( "cl_playermodel" ) - local modelname = player_manager.TranslatePlayerModel( cl_playermodel ) - util.PrecacheModel( modelname ) - ply:SetModel( modelname ) -end - -function GM:PlayerSetHandsModel( ply, ent ) - - local simplemodel = player_manager.TranslateToPlayerModelName( ply:GetModel() ) - local info = player_manager.TranslatePlayerHands( simplemodel ) - if ( info ) then - ent:SetModel( info.model ) - ent:SetSkin( info.skin ) - ent:SetBodyGroups( info.body ) - end - -end - -function GM:PlayerLoadout( ply ) - ply:Give( "gms_fists" ) - ply:Give( "weapon_physcannon" ) - ply:Give( "weapon_physgun" ) - - ply:SelectWeapon( "weapon_physgun" ) - ply:SelectWeapon( "gms_fists" ) - - if ( GetConVarNumber( "gms_AllTools" ) == 1 ) then - for id, wep in pairs( GMS.AllWeapons ) do ply:Give( wep ) end - end - - if ( ply:IsDeveloper() ) then ply:Give( "gmod_tool" ) ply:Give( "pill_pigeon" ) end -end - -function GM:PlayerCanPickupWeapon( ply, wep ) - if ( ply:HasWeapon( wep:GetClass() ) ) then return false end - return true -end - -function GM:CanProperty( pl, property, ent ) - if ( !IsValid( ent ) ) then return false end - if ( !pl:IsAdmin() ) then return false end - - if ( ent.m_tblToolsAllowed ) then - local vFound = false - for k, v in pairs( ent.m_tblToolsAllowed ) do - if ( property == v ) then vFound = true end - end - - if ( !vFound ) then return false end - end - - if ( property == "bonemanipulate" ) then - if ( game.SinglePlayer() ) then return true end - - if ( ent:IsNPC() ) then return GetConVarNumber( "sbox_bonemanip_npc" ) != 0 end - if ( ent:IsPlayer() ) then return GetConVarNumber( "sbox_bonemanip_player" ) != 0 end - - return GetConVarNumber( "sbox_bonemanip_misc" ) != 0 - end - - return true -end - -hook.Add( "PlayerDeath", "Death", function( ply ) - - // Creates the gravestone - local grave = ents.Create("gms_gravestone") - - grave:SetPos( Vector( ply:GetPos().x, ply:GetPos().y, ply:GetPos().z+18 ) ) - - grave:Spawn() - grave:SetplName(ply:Nick()) - - grave:SetNetworkedString( "Owner", "Everyone" ) - - wepstbl = {} - restbl = {} - - for _, v in pairs( ply:GetWeapons() ) do - if ( !table.HasValue( GMS.NonDropWeapons, v:GetClass() ) && GetConVarNumber( "gms_AllTools" ) != 1 ) then - //ply:DropWeapon( v ) - table.insert(wepstbl, v:GetClass()) - SPropProtection.PlayerMakePropOwner( ply, v ) - end - end - - for _, v in pairs(ply.Resources) do - - num1 = v * 0.1 - num2 = v - math.Round(num1) - - if (num2 > 0) then - - table.insert(restbl, _.." x"..num2) - ply:DecResource(_,v) - - end - - - - end - - ply.Resources = {} - - grave.deathWeapons = wepstbl - grave.deathResources = restbl - - ply:CancelProcess() - - if ( ply:GetNWBool("AFK") ) then - ply:Freeze( false ) - ply:SetNWBool( "AFK", false ) - end -end ) - -timer.Create( "GMS.AutoSaveAllCharacters", math.Clamp( GetConVarNumber( "gms_AutoSaveTime" ), 1, 60 ) * 60, 0, function() - if ( GetConVarNumber( "gms_AutoSave" ) == 1 ) then - for k, v in pairs( player.GetAll() ) do - v:SendMessage( "Autosaving..", 3, Color( 255, 255, 255, 255 ) ) - v:SaveCharacter() - end - end -end ) - -function GM:PlayerDisconnected( ply ) - Msg( "Saving character of disconnecting player " .. ply:Nick() .. "...\n" ) - ply:SaveCharacter() -end - -function GM:ShutDown() - for k, v in pairs( player.GetAll() ) do v:SaveCharacter() end -end - -function PlayerMeta:UpdatePlayerColor() - local col = self:GetInfo( "cl_playercolor" ) - if ( GetConVarNumber( "gms_TeamColors" ) > 0 ) then - local tcol = team.GetColor( self:Team() ) - col = tcol.r / 255 .. " " .. tcol.g / 255 .. " " .. tcol.b / 255 - end - self:SetPlayerColor( Vector( col ) ) -end - -function PlayerMeta:ResetCharacter() - - self.Skills = {} - self.Resources = {} - self.Experience = {} - self.FeatureUnlocks = {} - - self:SetSkill( "Survival", 0 ) - self:SetXP( "Survival", 0 ) - self.MaxResources = 25 - - self:SaveCharacter() - - umsg.Start( "gms_ResetPlayer", ply ) - umsg.End() - -end - -function PlayerMeta:SaveCharacter() - if ( !file.IsDir( "gmstranded", "DATA" ) ) then file.CreateDir( "gmstranded" ) end - if ( !file.IsDir( "gmstranded/saves", "DATA" ) ) then file.CreateDir( "gmstranded/saves" ) end - if ( !self.Loaded ) then - print( "Player " .. self:Name() .. " tried to save before he has loaded!" ) - self:SendMessage( "Character save failed: Not yet loaded!", 3, Color( 255, 50, 50, 255 ) ) - return - end - - local tbl = {} - tbl["date"] = os.date( "%A %m/%d/%y" ) - tbl["name"] = self:Nick() - - tbl["skills"] = self.Skills - tbl["experience"] = self.Experience - tbl["unlocks"] = self.FeatureUnlocks - - tbl["resources"] = {} - tbl["weapons"] = {} - tbl["ammo"] = {} - - for k, v in pairs( self.Resources ) do - if ( v > 0 ) then tbl["resources"][ k ] = v end - end - - for id, wep in pairs( self:GetWeapons() ) do - if ( wep:GetClass() != "gms_fists" || wep:GetClass() != "weapon_physgun" || wep:GetClass() != "weapon_physcannon" ) then - table.insert( tbl[ "weapons" ], wep:GetClass() ) - end - end - - local ammo_types = { "ar2", "smg1", "pistol", "buckshot", "357", "grenade", "alyxgun", "xbowbolt", "AlyxGun", "RPG_Round","SMG1_Grenade", "SniperRound", - "SniperPenetratedRound", "Grenade", "Thumper", "Gravity", "Battery", "GaussEnergy", "CombineCannon", "AirboatGun", "StriderMinigun", "StriderMinigunDirect", - "HelicopterGun", "AR2AltFire", "Grenade", "Hopwire", "CombineHeavyCannon", "ammo_proto1" - } - - for id, str in pairs( ammo_types ) do - local ammo = self:GetAmmoCount( str ) - if ( ammo > 0 ) then tbl[ "ammo" ][ str ] = ammo end - end - - file.Write( "gmstranded/saves/" .. self:UniqueID() .. ".txt", util.TableToJSON( tbl ) ) - self:SendMessage( "Saved character!", 3, Color( 255, 255, 255 ) ) -end - -concommand.Add( "gms_savecharacter", function( ply, cmd, args ) - if ( ply.GMSLastSave && ply.GMSLastSave > CurTime() ) then ply:SendMessage( "You must wait " .. math.floor( ply.GMSLastSave - CurTime() ) .. " seconds before saving again.", 3, Color( 255, 50, 50, 255 ) ) return end - ply.GMSLastSave = CurTime() + 30 - ply:SaveCharacter() -end ) - -concommand.Add( "gms_resetcharacter", function( ply, cmd, args ) - if ( !args[ 1 ] ) then ply:ConCommand( "gms_resetcharacter_verify" ) return end - if ( args[ 1 ] != "I agree" ) then ply:ChatPrint( "You didn't type what was asked." ) return end - ply:ResetCharacter() -end ) - -/*------------------------ Prop spawning ------------------------*/ - -function GM:PlayerSpawnProp( ply, model ) - if ( ply.InProcess ) then return false end - if ( ply.NextSpawn && ply.NextSpawn > CurTime() ) then ply:SendMessage( "No spamming!", 3, Color( 200, 0, 0, 255 ) ) return false end -- No spamming - if ( !ply:IsAdmin() && GMS_IsAdminOnlyModel( model ) ) then ply:SendMessage( "You cannot spawn this prop unless you're admin.", 5, Color( 200, 0, 0, 255 ) ) return false end - return true //LimitReachedProcess( ply, "props" ) -end - -function GM:PlayerSpawnedProp( ply, mdl, ent ) - ply.NextSpawn = CurTime() + 1 - SPropProtection.PlayerMakePropOwner( ply, ent ) - - if ( GetConVarNumber( "gms_FreeBuild" ) == 1 ) then return end - if ( GetConVarNumber( "gms_FreeBuildSA" ) == 1 and ply:IsAdmin() ) then return end - - ent.NormalProp = true - - timer.Simple( 0.2, function() self:PlayerSpawnedPropDelay( ply, mdl, ent ) end ) -end - -function GM:PlayerSpawnedPropDelay( ply, mdl, ent ) - if ( !IsValid( ent ) ) then return end - - --Trace - ent.EntOwner = ply - - -- Do volume in cubic "feet" - local vol = ent:GetVolume() - - local x = 0 - local trace = nil - local tr = nil - trace = {} - trace.start = ent:GetPos() + Vector( ( math.random() * 200 ) - 100, ( math.random() * 200 ) - 100, ( math.random() * 200 ) - 100 ) - trace.endpos = ent:GetPos() - tr = util.TraceLine( trace ) - - while ( tr.Entity != ent and x < 5 ) do - x = x + 1 - trace = {} - trace.start = ent:GetPos() + Vector( ( math.random() * 200 ) - 100, ( math.random() * 200 ) - 100, ( math.random() * 200 ) - 100 ) - trace.endpos = ent:GetPos() - tr = util.TraceLine( trace ) - end - - --Faulty trace - if ( tr.Entity != ent ) then ent:Remove() ply:SendMessage( "You need more space to spawn.", 3, Color( 255, 255, 255, 255 ) ) return end - - if ( !GMS.MaterialResources[ tr.MatType ] ) then - MsgC( Color( 255, 0, 0 ), "WARNING! Can't detect material of " .. mdl .. "!\n" ) - tr.MatType = MAT_CONCRETE - end - - local res = GMS.MaterialResources[ tr.MatType ] - //local cost = math.ceil( vol * ( GetConVarNumber( "gms_CostsScale" ) / 2 ) ) - local cost = math.ceil( vol * 0.5 ) - - if ( cost > ply:GetResource( res ) ) then - if ( IsValid( ply:GetBuildingSite() ) ) then ply:GetBuildingSite():Remove() end - local site = ply:CreateBuildingSite( ent:GetPos(), ent:GetAngles(), ent:GetModel(), ent:GetClass() ) - local tbl = site:GetTable() - site.EntOwner = ply - site.NormalProp = true - local costtable = {} - costtable[ res ] = cost - - tbl.Costs = table.Copy( costtable ) - ply:DoProcess( "Assembling", math.max( 2, math.min( cost / 100, 120 ) ) ) - ply:SendMessage( "Not enough resources, creating buildsite.", 3, Color( 255, 255, 255, 255 ) ) - local str = ":" - for k, v in pairs( site.Costs ) do - str = str .. " " .. string.Replace( k, "_", " " ) .. " ( " .. v .. "x )" - end - site:SetNWString( "Resources", str ) - local Name = "Prop" - site:SetNWString( "Name", Name ) - ent:Remove() - return - end - - -- Resource cost - if ply:GetResource( res ) < cost then - ent:Remove() - ply:SendMessage( "You need " .. string.Replace( res, "_", " " ) .. " ( " .. cost .. "x ) to spawn this prop.", 3, Color( 200, 0, 0, 255 ) ) - else - ply:DecResource( res, cost ) - ply:SendMessage( "Used " .. string.Replace( res, "_", " " ) .. " ( " .. cost .. "x ) to spawn this prop.", 3, Color( 255, 255, 255, 255 ) ) - ply:DoProcess( "Assembling", math.max( 2, math.min( cost / 100, 120 ) ) ) - end -end - --- No Ragdolls, Effects, SENTs, NPCs, SWEPs or Vehicles in Stranded. - -function GM:PlayerSpawnRagdoll( ply, model ) - return false -end - -function GM:PlayerSpawnEffect( ply, model ) - return false -end - -function GM:PlayerSpawnSENT( ply, name ) - return false -end - -function GM:PlayerSpawnNPC( ply, npc_type, equipment ) - return false -end - -function GM:PlayerSpawnSWEP( ply, wname, wtable ) - return false -end - -function GM:PlayerGiveSWEP( ply, wname, wtable ) - return false -end - -function GM:PlayerSpawnVehicle( ply, model, vname, vtable ) - return false -end - -/*------------------------ Needs ------------------------*/ - -timer.Create( "GMS.SubtractNeeds", 3, 0, function() - for k, ply in pairs( player.GetAll() ) do - if ( ply:Alive() ) then - local AddHunger = -3 - local AddThirst = -6 - - -- Sleeping - if ( ply:GetNWBool( "Sleeping" ) ) then - if ( ply.Sleepiness <= 950 ) then - local trace = {} - trace.start = ply:GetShootPos() - trace.endpos = trace.start - ( ply:GetUp() * 300 ) - trace.filter = ply - - local tr = util.TraceLine( trace ) - if ( IsValid( tr.Entity ) and tr.Entity:IsSleepingFurniture() ) then - ply.Sleepiness = math.Clamp( ply.Sleepiness + 100, 0, 1000 ) - else - ply.Sleepiness = math.Clamp( ply.Sleepiness + 50, 0, 1000 ) - end - elseif ( ply.Sleepiness > 950 ) then - ply.Sleepiness = 1000 - ply:Wakeup() - end - - AddThirst = -20 - AddHunger = -20 - - if ( ply.NeedShelter ) then - if ( ply:Health() >= 11 ) then - ply:SetHealth( ply:Health() - 10 ) - else - ply:Kill() - for k, v in pairs( player.GetAll() ) do v:SendMessage( ply:Nick() .. " died in sleep.", 3, Color( 170, 0, 0, 255 ) ) end - end - end - end - - if ( !ply:GetNWBool( "AFK" ) ) then - - // Oxygen - if ( ply:WaterLevel() > 2 ) then - if ( ply.Oxygen > 0 ) then - ply.Oxygen = math.max( ply.Oxygen - math.min( 1600 / ply:GetSkill( "Swimming" ), 500 ), 0 ) - ply:IncXP( "Swimming", math.Clamp( math.Round( 100 / ply:GetSkill( "Swimming" ) ), 1, 1000 ) ) - end - else - if ( ply.Oxygen < 1000 ) then ply.Oxygen = math.min( ply.Oxygen + 100, 1000 ) end - end - - // Flashlight - if ( ply:FlashlightIsOn() ) then - if ( ply.Power > 0 ) then - ply.Power = math.max( ply.Power - 5, 0 ) - if ( ply.Power < 5 ) then ply:Flashlight( false ) end - end - else - local maxPow = 50 - if ( ply.Resources["Batteries"] ) then maxPow = math.min( maxPow + ply.Resources["Batteries"] * 50, 500 ) end - if ( ply.Power < maxPow ) then ply.Power = math.min( ply.Power + 10, maxPow ) end - end - - if ( ply.Sleepiness > 0 ) then ply.Sleepiness = math.Clamp( ply.Sleepiness - 2, 0, 1000 ) end - if ( ply.Thirst > 0 ) then ply.Thirst = math.Clamp( ply.Thirst + AddThirst, 0, 1000 ) end - if ( ply.Hunger > 0 ) then ply.Hunger = math.Clamp( ply.Hunger + AddHunger, 0, 1000 ) end - end - - ply:UpdateNeeds() - - --Are you dying? - if ( ply.Sleepiness <= 0 or ply.Thirst <= 0 or ply.Hunger <= 0 ) then - if ( ply:Health() >= 3 ) then - ply:SetHealth( ply:Health() - 2 ) - ply:ScreenFade( SCREENFADE.IN, Color( 255, 0, 0 ), 0.7, 0 ) - ply:ViewPunch( Angle( math.random( 6, -6 ), math.random( 4, -4 ), 0 ) ) - else - ply:Kill() - for k, v in pairs( player.GetAll() ) do v:SendMessage( ply:Nick() .. " didn't survive.", 3, Color( 170, 0, 0, 255 ) ) end - end - end - - if ( ply.Oxygen <= 0 ) then - if ( ply:Health() >= 9 ) then - ply:SetHealth( ply:Health() - 8 ) - ply:EmitSound( "player/pl_drown" .. math.random( 1, 3 ) .. ".wav", 100, math.random( 95, 105 ) ) - ply:ScreenFade( SCREENFADE.IN, Color( 0, 0, 255 ), 0.7, 0) - ply:ViewPunch( Angle( math.random( 6, -6 ), 0, 0 ) ) - else - ply:Kill() - for k, v in pairs( player.GetAll() ) do v:SendMessage( ply:Nick() .. " has drowned.", 3, Color( 170, 0, 0, 255 ) ) end - end - end - end - end -end ) - -/* NPC Looting and hunting */ - -function GM:OnNPCKilled( npc, killer, weapon ) - - if ( npc != killer ) then self.BaseClass.OnNPCKilled( self, npc, killer, weapon ) end - npc:Fadeout( 5 ) - - if ( !killer:IsPlayer() ) then return end - killer:SetFrags( killer:Frags() + 1 ) - - if ( !npc:IsLootableNPC() ) then return end - - local loot = ents.Create( "gms_loot" ) - SPropProtection.PlayerMakePropOwner( killer, loot ) - - loot.Resources = { Meat = math.random( 1, 5 ) } - loot:SetPos( npc:GetPos() + Vector( 0, 0, 64 ) ) - loot:Spawn() - timer.Simple( 180, function() if ( loot:IsValid() ) then loot:Fadeout( 2 ) end end ) - - killer:IncXP( "Hunting", math.Clamp( math.Round( 150 / killer:GetSkill( "Hunting" ) ), 1, 1000 ) ) -end - -/* Use Hook */ -hook.Add( "KeyPress", "GMS_UseKeyHook", function( ply, key ) - if ( key != IN_USE ) then return end - if ( ply:KeyDown( 1 ) ) then return end - - local tr = ply:TraceFromEyes( 128 ) - if ( tr.HitNonWorld && IsValid( tr.Entity ) && !GMS.IsInWater( tr.HitPos ) ) then - local ent = tr.Entity - local mdl = tr.Entity:GetModel() - local cls = tr.Entity:GetClass() - - if ( ( ent:IsFoodModel() or cls == "gms_food" ) and ( ( ply:GetPos() - ent:LocalToWorld( ent:OBBCenter() ) ):Length() <= 128 ) and SPropProtection.PlayerCanTouch( ply, ent ) ) then - if ( cls == "gms_food" ) then - ply:DoProcess( "EatFood", 3, { Entity = ent } ) - else - ply:DoProcess( "EatFruit", 2, { Entity = ent } ) - end - elseif ( ent:IsTreeModel() or ent:GetClass() == "gms_tree" ) then - if ( !ply:HasUnlock( "Sprout_Collecting" ) ) then ply:SendMessage( "You don't have enough skill.", 3, Color( 200, 0, 0, 255 ) ) return end - ply:DoProcess( "SproutCollect", 5 ) - elseif ( cls == "gms_resourcedrop" and ( ply:GetPos() - tr.HitPos ):Length() <= 128 and SPropProtection.PlayerCanTouch( ply, ent ) ) then - ply:PickupResourceEntity( ent ) - elseif ( ( cls == "gms_resourcepack" or cls == "gms_fridge" ) and ( ply:GetPos() - tr.HitPos ):Length() <= 128 and SPropProtection.PlayerCanTouch( ply, ent ) ) then - ply:ConCommand( "gms_openrespackmenu" ) - elseif ( ent:IsOnFire() && SPropProtection.PlayerCanTouch( ply, ent ) ) then - if ( GetConVarNumber( "gms_campfire" ) == 1 ) then ply:OpenCombiMenu( "Cooking" ) end - end - elseif ( tr.HitWorld ) then - for k, v in pairs( ents.FindInSphere( tr.HitPos, 100 ) ) do - if ( v:IsGrainModel() && SPropProtection.PlayerCanTouch( ply, v ) ) then - ply:DoProcess( "HarvestGrain", 3, { Entity = v } ) - return - elseif ( v:IsBerryBushModel() && SPropProtection.PlayerCanTouch( ply, v ) ) then - ply:DoProcess( "HarvestBush", 3, { Entity = v } ) - return - end - end - if ( ( tr.MatType == MAT_DIRT or tr.MatType == MAT_GRASS or tr.MatType == MAT_SAND or tr.MatType == MAT_SNOW ) and !GMS.IsInWater( tr.HitPos ) ) then - local time = 5 - if ( IsValid( ply:GetActiveWeapon() ) && ply:GetActiveWeapon():GetClass() == "gms_shovel" ) then time = 2 end - ply:DoProcess( "Foraging", time ) - end - end - - local trace = {} - trace.start = ply:GetShootPos() - trace.endpos = trace.start + ( ply:GetAimVector() * 150 ) - trace.mask = bit.bor( MASK_WATER, MASK_SOLID ) - trace.filter = ply - - local tr2 = util.TraceLine( trace ) - if ( ( tr2.Hit && tr2.MatType == MAT_SLOSH && ply:WaterLevel() > 0 ) or ply:WaterLevel() == 3 ) then - ply.Thirst = math.min( ply.Thirst + 50, 1000 ) - if ( !ply.Hasdrunk ) then - ply:EmitSound( Sound( "npc/barnacle/barnacle_gulp" .. math.random( 1, 2 ) .. ".wav" ), 100, math.random( 95, 105 ) ) - ply.Hasdrunk = true - timer.Simple( 0.9, function() ply.Hasdrunk = false end, ply ) - end - ply:UpdateNeeds() - elseif ( GMS.IsInWater( tr.HitPos ) && !tr.HitNonWorld ) then - if (ply:GetActiveWeapon():GetClass() == "gms_bucket") then - ply:DoProcess( "BottleWater", 20 ) - else - ply:DoProcess( "BottleWater", 3 ) - end - end -end ) - -/* Saving / loading functions */ - --- Commands -concommand.Add( "gms_admin_savemap", function( ply, cmd, args ) - if ( IsValid( ply ) && !ply:IsAdmin() ) then ply:SendMessage( "You need admin rights for this!", 3, Color( 200, 0, 0, 255 ) ) return end - if ( !args[ 1 ] or string.Trim( args[ 1 ] ) == "" ) then return end - GAMEMODE:PreSaveMap( string.Trim( args[1] ) ) -end ) - -concommand.Add( "gms_admin_loadmap", function( ply, cmd, args ) - if ( IsValid( ply ) && !ply:IsAdmin() ) then ply:SendMessage( "You need admin rights for this!", 3, Color( 200, 0 ,0, 255 ) ) return end - if ( !args[ 1 ] or string.Trim( args[ 1 ] ) == "" ) then return end - GAMEMODE:PreLoadMap( string.Trim( args[ 1 ] ) ) -end ) - -concommand.Add( "gms_admin_deletemap", function( ply, cmd, args ) - if ( IsValid( ply ) && !ply:IsAdmin() ) then ply:SendMessage( "You need admin rights for this!", 3, Color( 200, 0, 0, 255 ) ) return end - if ( !args[ 1 ] or string.Trim( args[ 1 ] ) == "" ) then return end - GAMEMODE:DeleteSavegame( string.Trim( args[ 1 ] ) ) -end ) - ---Delete map -function GM:DeleteSavegame( name ) - if ( !file.Exists( "gmstranded/gamesaves/" .. name .. ".txt", "DATA" ) ) then return end - file.Delete( "gmstranded/gamesaves/" .. name .. ".txt" ) - if ( file.Exists( "gmstranded/gamesaves/" .. name .. "_info.txt", "DATA" ) ) then file.Delete( "gmstranded/gamesaves/" .. name .. "_info.txt" ) end - - for k, ply in pairs( player.GetAll() ) do - if( ply:IsAdmin() ) then - umsg.Start( "gms_RemoveLoadGameFromList", ply ) - umsg.String( name ) - umsg.End() - end - end -end - ---Save map -function GM:PreSaveMap( name ) - if ( CurTime() < 3 ) then return end - if ( CurTime() < self.NextSaved ) then return end - - for k, ply in pairs( player.GetAll() ) do - ply:MakeSavingBar( "Saving game as \"" .. name .. "\"" ) - end - - self.NextSaved = CurTime() + 0.6 - timer.Simple( 0.5, function() self:SaveMap( name ) end ) -end - -function GM:SaveMap( name ) - local savegame = {} - savegame["name"] = name - savegame["entries"] = {} - - savegame_info = {} - savegame_info["map"] = game.GetMap() - savegame_info["date"] = os.date( "%A %m/%d/%y" ) - - for k, ent in pairs( ents.GetAll() ) do - if ( !IsValid( ent ) || ent:CreatedByMap() || !table.HasValue( GMS.SavedClasses, ent:GetClass() ) ) then continue end - if ( ent.GMSAutoSpawned ) then continue end - local entry = {} - - entry["class"] = ent:GetClass() - entry["model"] = ent:GetModel() - - entry["owner"] = ent:GetNWString( "Owner" ) - entry["ownerid"] = ent:GetNWInt( "OwnerID" ) - entry["tribeid"] = ent:GetNWInt( "TribeID" ) - - if ( ent.Children != nil ) then entry[ "Children" ] = ent.Children end - if ( ent.IsPlantChild ) then entry["PlantParentName"] = ent.PlantParentName end - if ( ent.IsPlant ) then entry["PlantName"] = ent:GetName() end - - entry["color"] = ent:GetColor() - entry["pos"] = ent:GetPos() - entry["angles"] = ent:GetAngles() - entry["material"] = ent:GetMaterial() or "0" - entry["keyvalues"] = ent:GetKeyValues() - entry["table"] = ent:GetTable() - entry["solid"] = ent:GetSolid() - - local phys = ent:GetPhysicsObject() - - if ( IsValid( phys ) ) then - entry["freezed"] = phys:IsMoveable() - entry["sleeping"] = phys:IsAsleep() - end - - if ( entry["class"] == "gms_resourcedrop" ) then entry["type"] = ent.Type entry["amount"] = ent.Amount end // ResDrop - - table.insert( savegame["entries"], entry ) - - end - - if ( !file.IsDir( "gmstranded", "DATA" ) ) then file.CreateDir( "gmstranded" ) end - if ( !file.IsDir( "gmstranded/gamesaves", "DATA" ) ) then file.CreateDir( "gmstranded/gamesaves" ) end - - file.Write( "gmstranded/gamesaves/" .. name .. ".txt", util.TableToJSON( savegame ) ) - file.Write( "gmstranded/gamesaves/" .. name .. "_info.txt", util.TableToJSON( savegame_info ) ) - - for k, ply in pairs( player.GetAll() ) do - ply:SendMessage( "Saved game \"" .. name .. "\".", 3, Color( 255, 255, 255, 255 ) ) - ply:StopSavingBar() - - if ( ply:IsAdmin() ) then - umsg.Start( "gms_AddLoadGameToList", ply ) - umsg.String( name ) - umsg.End() - end - end -end - ---Load map -function GM:PreLoadMap( name ) - if ( CurTime() < 3 ) then return end - if ( CurTime() < self.NextLoaded ) then return end - if ( !file.Exists( "gmstranded/gamesaves/" .. name .. ".txt", "DATA" ) ) then return end - - game.CleanUpMap() - - for k, ply in pairs( player.GetAll() ) do ply:MakeLoadingBar( "Savegame \"" .. name .. "\"" ) end - - self.NextLoaded = CurTime() + 0.6 - timer.Simple( 0.5, function() self:LoadMap( name ) end ) -end - -function GM:LoadMap( name ) - local savegame = util.JSONToTable( file.Read( "gmstranded/gamesaves/" .. name .. ".txt" ) ) - local num = table.Count( savegame["entries"] ) - - if ( num == 0 ) then - for k, ply in pairs( player.GetAll() ) do - ply:SendMessage( "This savegame is empty!", 3, Color( 255, 255, 255, 255 ) ) - ply:StopLoadingBar() - end - return end - - Time = DayTime - - self:LoadMapEntity( savegame, num, 1 ) -end - ---Don't load it all at once -function GM:LoadMapEntity( savegame, max, k ) - local entry = savegame["entries"][k] - - local ent = ents.Create( entry["class"] ) - - if ( !entry["model"] ) then - print( "WARNING! " .. entry["class"] .. " doesn't have a model!" ) - else - ent:SetModel( entry["model"] ) - end - - - ent:SetColor( entry["color"] ) - ent:SetPos( entry["pos"] ) - ent:SetAngles( entry["angles"] ) - - if ( entry["Children"] ) then ent.Children = entry[ "Children" ] end - if ( entry["PlantParentName"] ) then ent.PlantParentName = entry["PlantParentName"] end - if ( entry["PlantName"] ) then ent:SetName( entry["PlantName"] ) end - if ( entry["material"] != "0" ) then ent:SetMaterial( entry["material"] ) end - if ( entry["solid"] ) then ent:SetSolid( entry["solid"] ) end - - for k, v in pairs( entry["keyvalues"] ) do ent:SetKeyValue( k, v ) end - for k, v in pairs( entry["table"] ) do ent[ k ] = v end - - ent:Spawn() - - if ( entry["table"].Resources ) then - ent.Resources = {} - for k1, v1 in pairs( entry["table"].Resources ) do ent.Resources[ k1 ] = tonumber( v1 ) end - end - - if ( player.FindByName( entry["owner"] ) ) then - if ( ent.IsPlant ) then ent:SetNWEntity( "plantowner", player.FindByName( entry["owner"] ) ) end - SPropProtection.PlayerMakePropOwner( player.FindByName( entry["owner"] ), ent ) - elseif ( entry["owner"] == "World" ) then - ent:SetNetworkedString( "Owner", entry["owner"] ) - end - - if ( entry["class"] == "gms_resourcedrop" ) then // RP - ent.Type = entry["type"] - ent.Amount = entry["amount"] - ent:SetResourceDropInfo( ent.Type, ent.Amount ) - end - - local phys = ent:GetPhysicsObject() - if ( phys and phys != NULL and phys:IsValid() ) then - phys:EnableMotion( entry["freezed"] ) - if ( entry["sleeping"] ) then phys:Sleep() else phys:Wake() end - end - - if ( k >= max ) then - for k, ply in pairs( player.GetAll() ) do - ply:SendMessage( "Loaded game \"" .. savegame[ "name" ] .. "\" ( " .. max .. " entries )", 3, Color( 255, 255, 255, 255 ) ) - ply:StopLoadingBar() - end - - -- Fix all plants - for id, ent in pairs( ents.GetAll() ) do - if ( ent.IsPlantChild ) then - ent.PlantParent = ents.FindByName( ent.PlantParentName )[ 1 ] - if ( !IsValid( ent.PlantParent ) ) then continue end - ent.PlantParent:SetName( "gms_plant" .. ent.PlantParent:EntIndex() ) - ent.PlantParentName = ent.PlantParent:GetName() - end - end - - local time = 0 - for _, v in ipairs( table.Add( ents.FindByClass( "gms_resourcepack" ), ents.FindByClass( "gms_fridge" ) ) ) do - for res, num in pairs( v.Resources ) do - timer.Simple( time, function() - umsg.Start( "gms_SetResPackInfo", rp ) - umsg.String( v:EntIndex() ) - umsg.String( string.gsub( res, "_", " " ) ) - umsg.Short( num ) - umsg.End() - end ) - time = time + 0.1 - end - time = time + 0.1 - end - else - timer.Simple( 0.05, function() self:LoadMapEntity( savegame, max, k + 1 ) end ) - end -end - -/* Misc functions */ -hook.Add( "Think", "GM_WaterExtinguish", function() - for _, v in ipairs( ents.FindByClass( "prop_phy*" ) ) do - if ( v:WaterLevel() > 0 and v:IsOnFire() ) then - v:Extinguish() - timer.Remove( "gms_removecampfire_" .. v:EntIndex() ) - end - end -end ) - -function GM:PlayerSwitchFlashlight( ply, SwitchOn ) - return ( ply.Power > 25 && ply.Resources[ "Flashlight" ] != nil && ply.Resources[ "Flashlight" ] > 0 ) or !SwitchOn -end - -local AlertSoundsHunger = { "stranded/need_hunger1.wav", "stranded/need_hunger2.wav" } -local AlertSoundsThirst = { "stranded/need_thirst1.wav" } -local AlertSoundsSleep = { "stranded/need_sleepiness1.wav", "stranded/need_sleepiness2.wav", "stranded/need_sleepiness3.wav", "stranded/need_sleepiness4.wav" } - -/* Alert Messages */ -timer.Create( "AlertTimer", 6, 0, function() - //if ( GetConVarNumber( "gms_alerts" ) != 1 ) then return end - for k, ply in pairs( player.GetAll() ) do - if ( !ply:Alive() ) then continue end - if ( ply.Hunger < 125 ) then ply:EmitSound( Sound( AlertSoundsHunger[ math.random( 1, #AlertSoundsHunger ) ] ), 100, math.random( 95, 105 ) ) end - if ( ply.Thirst < 125 ) then ply:EmitSound( Sound( AlertSoundsThirst[ math.random( 1, #AlertSoundsThirst ) ] ), 100, math.random( 95, 105 ) ) end - if ( ply.Sleepiness < 125 ) then ply:EmitSound( Sound( AlertSoundsSleep[ math.random( 1, #AlertSoundsSleep ) ] ), 100, math.random( 95, 105 ) ) end - end -end ) - -/* Tribe system */ -function CreateTribe( ply, name, red, green, blue, password ) - - name = string.Trim( name ) - if ( name == "" ) then ply:SendMessage( "You should enter tribe name!", 5, Color( 255, 50, 50, 255 ) ) return end - for id, tribe in pairs( GAMEMODE.Tribes ) do - if ( tribe.name == name ) then ply:SendMessage( "Tribe with this name already exists!", 5, Color( 255, 50, 50, 255 ) ) return end - end - - local id = table.insert( GAMEMODE.Tribes, { - name = name, - color = Color( red, green, blue ), - password = password or false - } ) - - local rp = RecipientFilter() - rp:AddAllPlayers() - - umsg.Start( "sendTribe", rp ) - umsg.Short( id ) - umsg.String( name ) - umsg.Vector( Vector( red, green, blue ) ) - if ( Password == false ) then - umsg.Bool( false ) - else - umsg.Bool( true ) - end - umsg.End() - - team.SetUp( id, name, Color( red, green, blue ) ) - ply:SetTeam( id ) - ply:UpdatePlayerColor() - SPropProtection.TribePP( ply ) - ply:SendMessage( "Successfully created " .. name .. ".", 5, Color( 255, 255, 255, 255 ) ) - -end - -function GM.CreateTribeCmd( ply, cmd, args, argv ) - if ( !args[4] or args[4] == "" ) then ply:ChatPrint( "Syntax is: gms_createtribe \"tribename\" red green blue [password( optional )]" ) return end - if ( args[5] and args[5] != "" ) then - CreateTribe( ply, args[1], args[2], args[3], args[4], args[5] ) - else - CreateTribe( ply, args[1], args[2], args[3], args[4], "" ) - end -end -concommand.Add( "gms_createtribe", GM.CreateTribeCmd ) - -function GM.JoinTribeCmd( ply, cmd, args ) - if ( !args[ 1 ] || args[ 1 ] == "" ) then ply:ChatPrint( "Syntax is: gms_join \"tribename\" [password( if needed )]" ) return end - for id, v in pairs( GAMEMODE.Tribes ) do - if ( string.lower( v.name ) != string.lower( args[1] ) ) then continue end - - if ( v.password && v.password != args[ 2 ] ) then ply:SendMessage( "Incorrcet tribal password", 3, Color( 255, 50, 50, 255 ) ) return end - - ply:SetTeam( id ) - ply:UpdatePlayerColor() - SPropProtection.TribePP( ply ) - ply:SendMessage( "Joined " .. v.name .. ".", 5, Color( 255, 255, 255, 255 ) ) - for id, pl in pairs( player.GetAll() ) do - if ( pl:Team() == ply:Team() && pl != ply ) then pl:SendMessage( ply:Name() .. " joined the tribe.", 5, Color( 255, 255, 255, 255 ) ) end - end - end - SPropProtection.CheckForEmptyTribes() -end -concommand.Add( "gms_join", GM.JoinTribeCmd ) - -function GM.LeaveTribeCmd( ply, cmd, args ) - ply:SetTeam( 1 ) - SPropProtection.TribePP( ply ) - ply:SendMessage( "Left the tribe.", 5, Color( 255, 255, 255, 255 ) ) - SPropProtection.CheckForEmptyTribes() - - for id, pl in pairs( player.GetAll() ) do - if ( pl:Team() == ply:Team() && pl != ply ) then pl:SendMessage( ply:Name() .. " left the tribe.", 5, Color( 255, 255, 255, 255 ) ) end - end -end -concommand.Add( "gms_leave", GM.LeaveTribeCmd ) - -/* Resource Box Touch */ -function big_gms_combineresource( ent_a, ent_b ) - local ent_a_owner = ent_a:GetNWString( "Owner" ) - local ent_b_owner = ent_b:GetNWString( "Owner" ) - local ply = player.GetByID( ent_a:GetNWInt( "OwnerID" ) ) - local plyb = player.GetByID( ent_b:GetNWInt( "OwnerID" ) ) - - if ( ent_a_owner != nil and ent_b_owner != nil and ply != nil ) then - if ( ent_a_owner == ent_b_owner or ( SPropProtection.PlayerCanTouch( ply, ent_b ) and SPropProtection.PlayerCanTouch( plyb, ent_a ) ) ) then - ent_a.Amount = ent_a.Amount + ent_b.Amount - ent_a:SetResourceDropInfoInstant( ent_a.Type, ent_a.Amount ) - ent_b:Remove() - end - end -end - -/* Resource box touches Resource pack */ -function big_gms_combineresourcepack( respack, ent_b ) - local ent_a_owner = respack:GetNWString( "Owner" ) - local ent_b_owner = ent_b:GetNWString( "Owner" ) - local ply = player.GetByID( respack:GetNWInt( "OwnerID" ) ) - local plyb = player.GetByID( ent_b:GetNWInt( "OwnerID" ) ) - - if ( ent_a_owner != nil and ent_b_owner != nil and ply != nil ) then - if ( ent_a_owner == ent_b_owner or ( SPropProtection.PlayerCanTouch( ply, ent_b ) and SPropProtection.PlayerCanTouch( plyb, respack ) ) ) then - if ( respack.Resources[ ent_b.Type ] ) then - respack.Resources[ ent_b.Type ] = respack.Resources[ ent_b.Type ] + ent_b.Amount - else - respack.Resources[ ent_b.Type ] = ent_b.Amount - end - respack:SetResPackInfo( ent_b.Type, respack.Resources[ ent_b.Type ] ) - ent_b:Remove() - end - end -end - -/* Food touches Fridge */ -function big_gms_combinefood( fridge, food ) - local ent_a_owner = fridge:GetNWString( "Owner" ) - local ent_b_owner = food:GetNWString( "Owner" ) - local ply = player.GetByID( fridge:GetNWInt( "OwnerID" ) ) - local plyb = player.GetByID( food:GetNWInt( "OwnerID" ) ) - local foodname = string.gsub( food.Name, " ", "_" ) - - if ( ent_a_owner != nil and ent_b_owner != nil and ply != nil ) then - if ( ent_a_owner == ent_b_owner or ( SPropProtection.PlayerCanTouch( ply, food ) and SPropProtection.PlayerCanTouch( plyb, fridge ) ) ) then - if ( fridge.Resources[ foodname ] ) then - fridge.Resources[ foodname ] = fridge.Resources[ foodname ] + 1 - else - fridge.Resources[ foodname ] = 1 - end - fridge:SetResPackInfo( foodname, fridge.Resources[ foodname ] ) - food:Remove() - end - end -end - -/* Resource Box Buildsite Touch */ -function gms_addbuildsiteresource( ent_resourcedrop, ent_buildsite ) - local ent_resourcedrop_owner = ent_resourcedrop:GetNWString( "Owner" ) - local ent_buildsite_owner = ent_buildsite:GetNWString( "Owner" ) - local ply = player.GetByID( ent_resourcedrop:GetNWInt( "OwnerID" ) ) - - if ( ent_resourcedrop_owner != nil and ent_buildsite_owner != nil and ply != nil and ent_resourcedrop:IsPlayerHolding() ) then - if ( SPropProtection.PlayerCanTouch( ply, ent_buildsite ) ) then - if ( ent_resourcedrop.Amount > ent_buildsite.Costs[ent_resourcedrop.Type] ) then - ent_resourcedrop.Amount = ent_resourcedrop.Amount - ent_buildsite.Costs[ent_resourcedrop.Type] - ent_resourcedrop:SetResourceDropInfo( ent_resourcedrop.Type, ent_resourcedrop.Amount ) - ent_buildsite.Costs[ent_resourcedrop.Type] = nil - elseif ( ent_resourcedrop.Amount <= ent_buildsite.Costs[ent_resourcedrop.Type] ) then - ent_buildsite.Costs[ent_resourcedrop.Type] = ent_buildsite.Costs[ent_resourcedrop.Type] - ent_resourcedrop.Amount - ent_resourcedrop:Remove() - end - for k, v in pairs( ent_buildsite.Costs ) do - if ( ent_buildsite.Costs[ent_resourcedrop.Type] ) then - if ( ent_buildsite.Costs[ent_resourcedrop.Type] <= 0 ) then - ent_buildsite.Costs[ent_resourcedrop.Type] = nil - end - end - end - - if ( table.Count( ent_buildsite.Costs ) > 0 ) then - local str = "You need: " - for k, v in pairs( ent_buildsite.Costs ) do - str = str .. " " .. string.Replace( k, "_", " " ) .. " ( " .. v .. "x )" - end - - str = str .. " to finish." - ply:SendMessage( str, 5, Color( 255, 255, 255, 255 ) ) - else - ply:SendMessage( "Finished!", 3, Color( 10, 200, 10, 255 ) ) - ent_buildsite:Finish() - end - - local str = ":" - for k, v in pairs( ent_buildsite.Costs ) do - str = str .. " " .. string.Replace( k, "_", " " ) .. " ( " .. v .. "x )" - end - ent_buildsite:SetNetworkedString( "Resources", str ) - end - end -end - -/* Resource Pack Buildsite Touch */ -function gms_addbuildsiteresourcePack( ent_resourcepack, ent_buildsite ) - local ent_resourcedrop_owner = ent_resourcepack:GetNWString( "Owner" ) - local ent_buildsite_owner = ent_buildsite:GetNWString( "Owner" ) - local ply = player.GetByID( ent_resourcepack:GetNWInt( "OwnerID" ) ) - - if ( ent_resourcedrop_owner != nil and ent_buildsite_owner != nil and ply != nil and ent_resourcepack:IsPlayerHolding() ) then - if ( SPropProtection.PlayerCanTouch( ply, ent_buildsite ) ) then - for res, num in pairs( ent_resourcepack.Resources ) do - if ( ent_buildsite.Costs[res] and num > ent_buildsite.Costs[res] ) then - ent_resourcepack.Resources[res] = num - ent_buildsite.Costs[res] - ent_resourcepack:SetResPackInfo( res, ent_resourcepack.Resources[res] ) - ent_buildsite.Costs[res] = nil - elseif ( ent_buildsite.Costs[res] and num <= ent_buildsite.Costs[res] ) then - ent_buildsite.Costs[res] = ent_buildsite.Costs[res] - num - ent_resourcepack:SetResPackInfo( res, 0 ) - ent_resourcepack.Resources[res] = nil - end - for k, v in pairs( ent_buildsite.Costs ) do - if ( ent_buildsite.Costs[res] ) then - if ( ent_buildsite.Costs[res] <= 0 ) then - ent_buildsite.Costs[res] = nil - end - end - end - end - - if ( table.Count( ent_buildsite.Costs ) > 0 ) then - local str = "You need: " - for k, v in pairs( ent_buildsite.Costs ) do - str = str .. " " .. string.Replace( k, "_", " " ) .. " ( " .. v .. "x )" - end - - str = str .. " to finish." - ply:SendMessage( str, 5, Color( 255, 255, 255, 255 ) ) - else - ply:SendMessage( "Finished!", 3, Color( 10, 200, 10, 255 ) ) - ent_buildsite:Finish() - end - - local str = ":" - for k, v in pairs( ent_buildsite.Costs ) do - str = str .. " " .. string.Replace( k, "_", " " ) .. " ( " .. v .. "x )" - end - ent_buildsite:SetNetworkedString( "Resources", str ) - end - end -end - -/* Resource Box versus Player Damage */ -hook.Add( "PlayerShouldTakeDamage", "playershouldtakedamage", function( victim, attacker ) - if ( victim:IsPlayer() and ( attacker:GetClass() == "gms_resourcedrop" or attacker:IsPlayerHolding() or attacker:GetClass() == "gms_resourcepack" or attacker:GetClass() == "gms_fridge" or attacker:GetClass() == "gms_food" ) ) then - return false - end - return true -end ) diff --git a/ftp_gmstranded/gamemode/processes.lua b/ftp_gmstranded/gamemode/processes.lua deleted file mode 100644 index 468d03e..0000000 --- a/ftp_gmstranded/gamemode/processes.lua +++ /dev/null @@ -1,1269 +0,0 @@ - -local PlayerMeta = FindMetaTable( "Player" ) -local EntityMeta = FindMetaTable( "Entity" ) - -GMS.Processes = {} - -function GMS.RegisterProcess( name, tbl ) - GMS.Processes[ name ] = tbl -end - -GM.ProcessThinkHookTable = {} -hook.Add( "Think", "gms_ProcessThinkHooks", function() - for k, v in pairs( GAMEMODE.ProcessThinkHookTable ) do - - local think - if ( v.Think ) then think = v:Think() end - - local basethink = v:BaseThink() - - if ( think or basethink or IsStopped ) then - if ( v.Owner and v.Owner != NULL and v.Owner:IsValid() ) then - v.Owner:Freeze( false ) - v.Owner:StopProcessBar() - v.Owner.InProcess = false - v.Owner:SendMessage( "Cancelled.", 3, Color( 200, 0, 0, 255 ) ) - end - - v.IsStopped = true - timer.Destroy( "GMS_ProcessTimer_" .. v.TimerID ) - GAMEMODE:RemoveProcessThink( v ) - end - end -end ) - -function GM:RemoveProcessThink( tbl ) - for k, v in pairs( self.ProcessThinkHookTable ) do - if ( v == tbl ) then table.remove( self.ProcessThinkHookTable, k ) break end - end -end - -function PlayerMeta:DoProcess( name, time, data ) - if ( self.InProcess ) then self:SendMessage( "You can't do this much at once.", 3, Color( 200, 0, 0, 255 ) ) return end - if ( self:GetNWBool( "AFK" ) ) then self:SendMessage( "You can't do this while afk.", 3, Color( 200, 0, 0, 255 ) ) return end - if ( self:GetNWBool( "Sleeping" ) ) then self:SendMessage( "You can't do this while sleeping.", 3, Color( 200, 0, 0, 255 ) ) return end - - self.ProcessTable = table.Merge( table.Copy( GMS.Processes.BaseProcess ), table.Copy( GMS.Processes[ name ] ) ) - self.ProcessTable.Owner = self - self.ProcessTable.Time = time - self.ProcessTable.StartTime = CurTime() - self.ProcessTable.TimerID = self:UniqueID() - if ( data ) then self.ProcessTable.Data = data end - - self.InProcess = true - if ( self.ProcessTable.Freeze ) then self:Freeze( true ) end - if ( self.ProcessTable.OnStart ) then self.ProcessTable:OnStart() end - - table.insert( GAMEMODE.ProcessThinkHookTable, self.ProcessTable ) - - timer.Create( "GMS_ProcessTimer_" .. self:UniqueID(), time, 1, function() self:StopProcess() end ) -end - -function PlayerMeta:MakeProcessBar( name, time, cancel ) - umsg.Start( "gms_MakeProcessBar", self ) - umsg.String( name ) - umsg.Short( time ) - umsg.Bool( cancel ) - umsg.End() -end - -function PlayerMeta:StopProcessBar() - umsg.Start( "gms_StopProcessBar", self ) - umsg.End() -end - -function PlayerMeta:StopProcess() - if ( !IsValid( self ) or self.ProcessTable == nil ) then return end - - local bool = self.ProcessTable:BaseStop() - if ( self.ProcessTable.Freeze ) then self:Freeze( false ) end - if ( self.ProcessTable.OnStop ) then self.ProcessTable:OnStop() end - if ( self.ProcessTable.Think ) then GAMEMODE:RemoveProcessThink( self.ProcessTable ) end - - self.InProcess = false - self.ProcessTable = nil -end - -function PlayerMeta:CancelProcess() - if ( !self.InProcess ) then return end - - local v = self.ProcessTable - if ( !v.Cancel ) then return end - - if ( v.Owner and v.Owner != NULL and IsValid( v.Owner ) ) then - v.Owner:Freeze( false ) - v.Owner:StopProcessBar() - v.Owner.InProcess = false - v.Owner:SendMessage( "Cancelled.", 3, Color( 200, 0, 0, 255 ) ) - end - - v.IsStopped = true - timer.Destroy( "GMS_ProcessTimer_" .. v.TimerID ) - GAMEMODE:RemoveProcessThink( v ) -end - -/* Base process */ -local PROCESS = {} - -function PROCESS:BaseThink() - if ( IsValid( ent ) ) then - if ( self == nil or self.Owner == nil ) then return true end - if ( !self.Owner:IsValid() or !self.Owner:IsConnected() or !self.Owner:Alive() ) then return true end - end -end - -function PROCESS:BaseStop() - if ( !IsValid( self.Owner ) or !self.Owner:Alive() ) then return false end - self.Owner:StopProcessBar() - return true -end - -PROCESS.Cancel = true -PROCESS.Freeze = true - -GMS.Processes.BaseProcess = PROCESS - -/* Stealing */ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Stealing", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - if ( !self.Data.Ent ) then return end - - SPropProtection.PlayerMakePropOwner( self.Owner, self.Data.Ent ) - self.Owner:IncXP( "Stealing", math.Clamp( math.Round( self.Time * 5 / self.Owner:GetSkill( "Stealing" ) ), 1, 1000 ) ) - - self.Owner:SendMessage( "Successfully stolen.", 3, Color( 50, 200, 50, 255 ) ) -end - -GMS.RegisterProcess( "Steal", PROCESS ) - -/* Fruit eating process */ -local PROCESS = {} - -PROCESS.SideGain = {} -PROCESS.SideGain["melon"] = "Melon_Seeds" -PROCESS.SideGain["orange"] = "Orange_Seeds" -PROCESS.SideGain["banana"] = "Banana_Seeds" - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Eating Fruit", self.Time, self.Cancel ) - - self.Owner:EmitSound( Sound( "stranded/eat.wav" ) ) - - local owner = nil - local ent = self.Data.Entity - local plant = ent.PlantParent - - if ( plant ) then owner = plant:GetNWEntity( "plantowner" ) end - - if ( self.Data.Entity:GetModel() == "models/props_junk/watermelon01.mdl" ) then - self.SideGain = "Melon_Seeds" - elseif ( self.Data.Entity:GetModel() == "models/props/cs_italy/orange.mdl" ) then - self.SideGain = "Orange_Seeds" - elseif ( self.Data.Entity:GetModel() == "models/props/cs_italy/bananna_bunch.mdl" ) then - self.SideGain = "Banana_Seeds" - end - - if ( plant ) then - plant.Children = plant.Children - 1 - if ( plant.Children <= 0 ) then - plant:Fadeout() - if ( IsValid( owner ) ) then owner:SetNWInt( "plants", owner:GetNWInt( "plants" ) - 1 ) end - end - end - - self.Data.Entity:Fadeout( 2 ) -end - -function PROCESS:OnStop() - if ( self.SideGain ) then - local numto = 1 - local numstart = 0 - if ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_woodenspoon" ) then - numto = numto + 2 - numstart = numstart + 1 - end - local num = math.random( numstart, numto ) - if ( num ~= 0 ) then - self.Owner:IncResource( self.SideGain, num ) - self.Owner:SendMessage( string.gsub( self.SideGain, "_", " " ) .. " ( " .. num .. "x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:EmitSound( Sound( "items/ammo_pickup.wav" ) ) - end - end - - self.Owner:SetFood( self.Owner.Hunger + 250 ) - self.Owner:SendMessage( "You feel a little less hungry now.", 3, Color( 255, 255, 255, 255 ) ) -end - -PROCESS.Cancel = false - -GMS.RegisterProcess( "EatFruit", PROCESS ) - -/* Food eating process */ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Eating", self.Time, self.Cancel ) - self.Owner:EmitSound( Sound( "stranded/eat.wav" ) ) - - local ent = self.Data.Entity - self.Value = ent.Value - ent:Fadeout( 2 ) -end - -function PROCESS:OnStop() - self.Owner:SendMessage( "Restored " .. tostring( ( self.Value / 1000 ) * 100 ) .. "% food.", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:SetFood( self.Owner.Hunger + self.Value ) - self.Owner:Heal( self.Value / 20 ) - self.Owner:SendMessage( "Regained " .. tostring( self.Value / 20 ) .. " hp.", 3, Color( 255, 0, 0, 255 ) ) - - self.Owner:SetFood( self.Owner.Hunger + 250 ) - self.Owner:SendMessage( "You feel a little less hungry now.", 3, Color( 255, 255, 255, 255 ) ) -end - -PROCESS.Cancel = false - -GMS.RegisterProcess( "EatFood", PROCESS ) - -/*--------------------------------------------------------- - Eat Berry ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Eating some berries", self.Time, self.Cancel ) - self.StartTime = CurTime() - - self.Owner:EmitSound( Sound( "stranded/eat.wav" ) ) -end - -function PROCESS:OnStop() - self.Owner:DecResource( "Berries", 1 ) - self.Owner:SendMessage( "You're a little less hungry and thirsty now.", 3, Color( 10, 200, 10, 255 ) ) - if ( self.Owner.Hunger <= 900 ) then - self.Owner:SetFood( self.Owner.Hunger + 100 ) - elseif ( self.Owner.Hunger >= 900 ) then - self.Owner:SetFood( 1000 ) - end - - if ( self.Owner.Thirst <= 900 ) then - self.Owner:SetThirst( self.Owner.Thirst + 100 ) - elseif ( self.Owner.Thirst >= 900 ) then - self.Owner:SetThirst( 1000 ) - end -end - -PROCESS.Cancel = false - -GMS.RegisterProcess( "EatBerry", PROCESS ) - -/*--------------------------------------------------------- - Foraging process ----------------------------------------------------------*/ -local PROCESS = {} - -PROCESS.Results = {} -PROCESS.Results[1] = "Melon Seeds" -PROCESS.Results[2] = "Banana Seeds" -PROCESS.Results[3] = "Orange Seeds" -PROCESS.Results[4] = "Grain Seeds" -PROCESS.Results[5] = "Herbs" -PROCESS.Results[6] = "Berries" -PROCESS.Results[7] = "Baits" - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Foraging", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - local num = math.random( 1, 100 ) - - if ( num > 50 - self.Owner:GetSkill( "Harvesting" ) ) then - local res = self.Results[math.random( 1, #self.Results )] - - local amount = math.random( 1, 3 ) - self.Owner:IncResource( string.gsub( res, " ", "_" ), amount ) - self.Owner:IncXP( "Harvesting", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Harvesting" ) ), 1, 1000 ) ) - self.Owner:SendMessage( res .. " ( " .. amount .. "x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:EmitSound( Sound( "items/ammo_pickup.wav" ) ) - else - self.Owner:SendMessage( "Found nothing of interest", 3, Color( 255, 255, 255, 255 ) ) - end -end - -GMS.RegisterProcess( "Foraging", PROCESS ) - -/*--------------------------------------------------------- - Looting process ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Looting", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - self.Data.Entity:Fadeout( 2 ) - - for k, v in pairs( self.Data.Resources ) do - self.Owner:SendMessage( k .. " ( " .. v .. "x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:IncResource( k, v ) - end - - self.Owner:EmitSound( Sound( "items/ammo_pickup.wav" ) ) -end - -GMS.RegisterProcess( "Loot", PROCESS ) - -/*--------------------------------------------------------- - Salvaging process ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Salvaging", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - local ent = self.Data.Entity - local ply = self.Owner - - if ( ent.NormalProp == true && SPropProtection.PlayerCanTouch( ply, ent ) ) then - local vol = ent:GetVolume() - - local res = GMS.MaterialResources[ self.Data.MatType ] - //local cost = math.Round( 0.6 * math.ceil( vol * ( GetConVarNumber( "gms_CostsScale" ) / 2 ) ) ) - local cost = math.Round( 0.6 * math.ceil( vol * 0.5 ) ) - ply:IncResource( res, cost ) - ply:SendMessage( "Gained " .. string.Replace( res, "_", " " ) .. " ( " .. cost .. "x ) from salvaging.", 3, Color( 255, 255, 255, 255 ) ) - elseif ( table.HasValue( GMS.StructureEntities, ent:GetClass() ) && SPropProtection.PlayerCanTouch( ply, ent ) ) then - local structures = GMS.Combinations[ "Structures" ] - local costs = {} - for name, t in pairs( structures ) do - if ( t.Results == ent:GetClass() ) then costs = t.Req end - end - - for res, num in pairs( costs ) do - local cost = math.Round( 0.6 * num ) - ply:IncResource( res, cost ) - ply:SendMessage( "Gained " .. string.Replace( res, "_", " " ) .. " ( " .. cost .. "x ) from salvaging.", 3, Color( 255, 255, 255, 255 ) ) - end - end - - ent:Fadeout() - - ply:EmitSound( Sound( "items/ammo_pickup.wav" ) ) -end - -GMS.RegisterProcess( "Salvage", PROCESS ) - -/*--------------------------------------------------------- - Digging ----------------------------------------------------------*/ -local PROCESS = {} - -PROCESS.Rarities = {} -PROCESS.Rarities[1] = "Iron" -PROCESS.Rarities[2] = "Sand" -PROCESS.Rarities[3] = "Rope" -PROCESS.Rarities[4] = "Bass" -PROCESS.Rarities[5] = "Sand" -PROCESS.Rarities[6] = "Stone" - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Digging", self.Time, self.Cancel ) - self.StartTime = CurTime() - - self:PlaySound() -end - -function PROCESS:PlaySound() - if ( CurTime() - self.StartTime > self.Time ) then return end - if ( !self.Owner.InProcess || self.StartTime != self.Owner.ProcessTable.StartTime ) then return end - - if ( self.Owner:Alive() ) then - self.Owner:GetActiveWeapon():DoEffects( self.Owner:GetEyeTrace() ) - self.Owner:EmitSound( Sound( "player/footsteps/gravel" .. math.random( 1, 4 ) .. ".wav" ) ) - - timer.Simple( 1.5, function() self:PlaySound() end ) - end -end - -function PROCESS:OnStop() - local num = math.random( 1, 100 ) - - if ( num < 10 ) then - local res = self.Rarities[math.random( 1, #self.Rarities )] - if ( self.Data and self.Data.Sand and math.random() > 0.50 ) then res = "Sand" end - self.Owner:IncResource( res, 1 ) - self.Owner:SendMessage( res .. " ( 1x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:SendMessage( "You found something weird!", 3, Color( 255, 255, 255, 255 ) ) - self.Owner:EmitSound( Sound( "items/ammo_pickup.wav" ) ) - elseif ( num > 10 and num < 40 ) then - self.Owner:SendMessage( "Found nothing of interest", 3, Color( 255, 255, 255, 255 ) ) - else - local tr = self.Owner:TraceFromEyes( 200 ) - - local ent = ents.Create( "prop_physics" ) - ent:SetPos( tr.HitPos + Vector( 0, 0, 10 ) ) - ent:SetModel( GMS.SmallRockModel ) - ent:Spawn() - SPropProtection.PlayerMakePropOwner( self.Owner, ent ) - - ent:Fadein( 2 ) - ent.Uses = 10 - end -end - -GMS.RegisterProcess( "Dig", PROCESS ) - -/*--------------------------------------------------------- - Filter ground process ----------------------------------------------------------*/ -local PROCESS = {} -PROCESS.Results = {} -PROCESS.Results[1] = "Sand" -PROCESS.Results[2] = "Sand" -PROCESS.Results[3] = "Sand" -PROCESS.Results[4] = "Glass" - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Filtering Ground", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - local num = math.random( 1, 100 ) - - if ( num > 50 - self.Owner:GetSkill( "Harvesting" ) ) then - local res = self.Results[math.random( 1, #self.Results )] - - local amount = math.random( 1, 3 ) - self.Owner:IncResource( string.gsub( res, " ", "_" ), amount ) - self.Owner:IncXP( "Harvesting", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Harvesting" ) ), 1, 1000 ) ) - self.Owner:SendMessage( res .. " ( " .. amount .. "x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:EmitSound( Sound( "items/ammo_pickup.wav" ) ) - else - self.Owner:SendMessage( "Found nothing of interest", 3, Color( 200, 10, 10, 255 ) ) - end -end - -GMS.RegisterProcess( "FilterGround", PROCESS ) - -/*--------------------------------------------------------- - Grain harvesting ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Harvesting Grain", self.Time, self.Cancel ) - - local ent = self.Data.Entity - - if ( IsValid( ent ) && !ent.Uses ) then - ent.Uses = math.random( 1, 3 ) - end -end - -function PROCESS:OnStop() - local num = math.random( 1, 100 ) - local add = 0 - if ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_sickle" ) then add = add + 30 end - - if ( num > 50 - self.Owner:GetSkill( "Harvesting" ) - add ) then - local amount = math.random( 1, 2 ) - self.Owner:IncResource( "Grain_Seeds", amount ) - self.Owner:IncXP( "Harvesting", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Harvesting" ) ), 1, 1000 ) ) - self.Owner:SendMessage( "Grain Seeds ( " .. amount .. "x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:EmitSound( Sound( "items/ammo_pickup.wav" ) ) - local ent = self.Data.Entity - local owner = ent:GetNWEntity( "plantowner" ) - - if ( IsValid( ent ) && ent.Uses ) then - ent.Uses = ent.Uses - 1 - if ( ent.Uses <= 0 ) then - if ( IsValid( owner ) ) then owner:SetNWInt( "plants", owner:GetNWInt( "plants" ) - 1 ) end - ent:Fadeout() - end - end - else - self.Owner:SendMessage( "Failed.", 3, Color( 200, 0, 0, 255 ) ) - end -end - -GMS.RegisterProcess( "HarvestGrain", PROCESS ) - -/*--------------------------------------------------------- - Berry harvesting ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Harvesting Bush", self.Time, self.Cancel ) - local ent = self.Data.Entity - - if ( IsValid( ent ) && !ent.Uses ) then - ent.Uses = math.random( 1, 3 ) - end -end - -function PROCESS:OnStop() - local num = math.random( 1, 100 ) - - local add = 0 - if ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_sickle" ) then add = add + 25 end - if ( num > 50 - self.Owner:GetSkill( "Harvesting" ) - add ) then - local amount = math.random( 1, 2 ) - self.Owner:IncResource( "Berries", amount ) - self.Owner:IncXP( "Harvesting", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Harvesting" ) ), 1, 1000 ) ) - self.Owner:SendMessage( "Berries ( " .. amount .. "x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:EmitSound( Sound( "items/ammo_pickup.wav" ) ) - local ent = self.Data.Entity - local owner = ent:GetNWEntity( "plantowner" ) - - if ( IsValid( ent ) && ent.Uses ) then - ent.Uses = ent.Uses - 1 - if ( ent.Uses <= 0 ) then - if ( IsValid( owner ) ) then owner:SetNWInt( "plants", owner:GetNWInt( "plants" ) - 1 ) end - ent:Fadeout() - end - end - else - self.Owner:SendMessage( "Failed.", 3, Color( 200, 0, 0, 255 ) ) - end -end - -GMS.RegisterProcess( "HarvestBush", PROCESS ) - -/*--------------------------------------------------------- - Make Campfire process ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - if ( GetConVarNumber( "gms_campfire" ) <= 0 ) then return end - self.Owner:MakeProcessBar( "Making Campfire", self.Time, self.Cancel ) - self.Owner:EmitSound( "stranded/start_campfire.wav" ) -end - -function PROCESS:OnStop() - if ( GetConVarNumber( "gms_campfire" ) <= 0 ) then return end - local num = math.random( 1, 3 ) - - if ( num == 1 ) then - self.Owner:SendMessage( "Failed.", 3, Color( 200, 0, 0, 255 ) ) - else - self.Data.Entity:MakeCampfire() - self.Owner:SendMessage( "Made campfire.", 5, Color( 10, 200, 100, 255 ) ) - self.Owner:DecResource( "Wood", 5 ) - end -end - -GMS.RegisterProcess( "Campfire", PROCESS ) - -/*--------------------------------------------------------- - Wood cutting ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Chopping Wood", self.Time, self.Cancel ) - - self.StartTime = CurTime() - - self:PlaySound() - if ( !self.Data.Entity.Uses ) then self.Data.Entity.Uses = 100 end -end - -function PROCESS:PlaySound() - if ( CurTime() - self.StartTime > self.Time ) then return end - if ( !self.Owner.InProcess || self.StartTime != self.Owner.ProcessTable.StartTime ) then return end - - if ( self.Owner:Alive() ) then - self.Owner:GetActiveWeapon():DoEffects( self.Owner:GetEyeTrace() ) - self.Owner:EmitSound( Sound( "physics/wood/wood_solid_impact_bullet" .. tostring( math.random( 1, 5 ) ) .. ".wav" ) ) - - timer.Simple( 1.5, function() self:PlaySound() end ) - end -end - -function PROCESS:OnStop() - local num = math.random( 1, 100 ) - - if ( num < self.Data.Chance + self.Owner:GetSkill( "Lumbering" ) ) then - local num2 = math.random( self.Data.MinAmount, self.Data.MaxAmount ) - self.Owner:IncResource( "Wood", num2 ) - self.Owner:IncXP( "Lumbering", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Lumbering" ) ), 1 , 1000 ) ) - self.Owner:SendMessage( "Wood ( " .. num2 .. "x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:EmitSound( Sound( "items/ammo_pickup.wav" ) ) - - if ( self.Data.Entity and self.Data.Entity.Uses ) then self.Data.Entity.Uses = self.Data.Entity.Uses - num2 end - else - self.Owner:SendMessage( "Failed.", 3, Color( 200, 0, 0, 255 ) ) - end - - if ( self.Data.Entity != NULL ) then - if ( self.Data.Entity.Uses <= 0 ) then - self.Data.Entity:EmitSound( "stranded/tree_fall.wav" ) - self.Data.Entity:Fadeout() - end - end -end - -GMS.RegisterProcess( "WoodCutting", PROCESS ) - -/* --------------------------------------------------------- - Mining ---------------------------------------------------------- */ - -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Mining", self.Time, self.Cancel ) - self.StartTime = CurTime() - - self:PlaySound() - if ( !self.Data.Entity.Uses ) then self.Data.Entity.Uses = 250 end -end - -function PROCESS:PlaySound() - if ( CurTime() - self.StartTime > self.Time ) then return end - if ( !self.Owner.InProcess || self.StartTime != self.Owner.ProcessTable.StartTime ) then return end - - if ( self.Owner:Alive() ) then - self.Owner:GetActiveWeapon():DoEffects( self.Owner:GetEyeTrace() ) - self.Owner:EmitSound( Sound( "physics/glass/glass_bottle_impact_hard" .. tostring( math.random( 1, 3 ) ) .. ".wav" ) ) - - timer.Simple( 1.5, function() self:PlaySound() end ) - end -end - -function PROCESS:OnStop() - local num = math.random( 1, 100 ) - local num2 = 1 - - if ( num < self.Data.Chance + self.Owner:GetSkill( "Mining" ) ) then - if ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_stonepickaxe" ) then - num2 = math.random( 1, 2 ) - elseif ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_copperpickaxe" ) then - num2 = math.random( 1, 3 ) - elseif ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_ironpickaxe" ) then - num2 = math.random( 1, 4 ) - elseif ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_techpickaxe" ) then - num2 = math.random( 1, 5 ) - elseif ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_silverpickaxe" ) then - num2 = math.random( 1, 6 ) - elseif ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_goldpickaxe" ) then - num2 = math.random( 1, 7 ) - elseif ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_steelpickaxe" ) then - num2 = math.random( 1, 8 ) - elseif ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_platinumpickaxe" ) then - num2 = math.random( 1, 9 ) - elseif ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_pickaxeofdjarex" ) then - num2 = math.random( 85, 85 ) - elseif ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_mithrilpickaxe" ) then - num2 = math.random( 1, 10 ) - elseif ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_runeapickaxe" ) then - num2 = math.random( 1, 8 ) - elseif ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_runeepickaxe" ) then - num2 = math.random( 1, 8 ) - elseif ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_runefpickaxe" ) then - num2 = math.random( 1, 8 ) - elseif ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_runewpickaxe" ) then - num2 = math.random( 1, 8 ) - end - - - local num3 = math.random( self.Data.MinAmount, self.Data.MaxAmount ) - - if ( num2 == 1 ) then - self.Owner:IncResource( "Stone", num3 ) - self.Owner:SendMessage( "Stone ( " .. num3 .. "x )", 3, Color( 10, 200, 10, 255 ) ) - elseif ( num2 == 2 ) then - self.Owner:IncResource( "Copper_Ore", num3 ) - self.Owner:SendMessage( "Copper Ore ( "..num3 .. "x )", 3, Color( 10, 200, 10, 255 ) ) - elseif ( num2 == 3 ) then - self.Owner:IncResource( "Iron_Ore", num3 ) - self.Owner:SendMessage( "Iron Ore ( " .. num3 .. "x )", 3, Color( 10, 200, 10, 255 ) ) - elseif ( num2 == 4 ) then - self.Owner:IncResource( "Tech_Ore", num3 ) - self.Owner:SendMessage( "Tech Ore ( " .. num3 .. "x )", 3, Color( 10, 200, 10, 255 ) ) - elseif ( num2 == 5 ) then - self.Owner:IncResource( "Silver_Ore", num3 ) - self.Owner:SendMessage( "Silver Ore ( " .. num3 .. "x )", 3, Color( 10, 200, 10, 255 ) ) - elseif ( num2 == 6 ) then - self.Owner:IncResource( "Gold_Ore", num3 ) - self.Owner:SendMessage( "Gold Ore ( " .. num3 .. "x )", 3, Color( 10, 200, 10, 255 ) ) - elseif ( num2 == 7 ) then - self.Owner:IncResource( "Steel_Ore", num3 ) - self.Owner:SendMessage( "Steel Ore ( " .. num3 .. "x )", 3, Color( 10, 200, 10, 255 ) ) - elseif ( num2 == 8 ) then - self.Owner:IncResource( "Platinum_Ore", num3 ) - self.Owner:SendMessage( "Platinum Ore ( " .. num3 .. "x )", 3, Color( 10, 200, 10, 255 ) ) - elseif ( num2 == 85 ) then - self.Owner:IncResource( "Strange_Stone", num3 ) - self.Owner:SendMessage( "Strange Stone ( " .. num3 .. "x ) ", 3, Color( 0, 247, 255, 255) ) - elseif ( num2 == 9 ) then - self.Owner:IncResource( "Mithril_Ore", num3 ) - self.Owner:SendMessage( "Mithril Ore ( " .. num3 .. "x ) ", 3, Color(10, 200, 10, 255) ) - elseif ( num2 == 10) then - self.Owner:IncResource( "Adamantine_Ore", num3 ) - self.Owner:SendMessage( "Adamantine Ore( " .. num3 .. "x ) ", 3, Color(255,0, 111, 255) ) - end - - self.Owner:IncXP( "Mining", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Mining" ) ), 1, 1000 ) ) - self.Owner:EmitSound( Sound( "items/ammo_pickup.wav" ) ) - if ( self.Data.Entity and self.Data.Entity.Uses ) then self.Data.Entity.Uses = self.Data.Entity.Uses - num3 end - else - self.Owner:SendMessage( "Failed.", 3, Color( 200, 0, 0, 255 ) ) - end - - if ( GetConVarNumber( "gms_FadeRocks" ) == 1 and self.Data.Entity != NULL ) then - if ( self.Data.Entity.Uses <= 0 ) then - self.Data.Entity:Fadeout() - end - end -end - -GMS.RegisterProcess( "Mining", PROCESS ) - -/*--------------------------------------------------------- - Sprout collect ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - if ( self.Owner:HasUnlock( "Sprout_Collecting" ) ) then - self.Owner:MakeProcessBar( "Loosening sprout", self.Time, self.Cancel ) - else - self.IsStopped = true - end -end - -function PROCESS:OnStop() - local num = math.random( 1, 100 ) - local add = 0 - - if ( IsValid( self.Owner:GetActiveWeapon() ) && self.Owner:GetActiveWeapon():GetClass() == "gms_sickle" ) then add = add + 30 end - - if ( num > 50 - self.Owner:GetSkill( "Harvesting" ) - add ) then - self.Owner:IncResource( "Sprouts", 1 ) - self.Owner:IncXP( "Harvesting", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Harvesting" ) ), 1, 1000 ) ) - self.Owner:SendMessage( "Sprout ( 1x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:EmitSound( Sound( "items/ammo_pickup.wav" ) ) - else - self.Owner:SendMessage( "Failed.", 3, Color( 200, 0, 0, 255 ) ) - end -end - -GMS.RegisterProcess( "SproutCollect", PROCESS ) - -/*--------------------------------------------------------- - Plant Melon ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Planting Watermelon", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - self.Owner:DecResource( "Melon_Seeds", 1 ) - self.Owner:IncXP( "Planting", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Planting" ) ), 1, 1000 ) ) - self.Owner:SendMessage( "Successfully planted.", 3, Color( 10, 200, 10, 255 ) ) - - local ent = ents.Create( "gms_seed" ) - SPropProtection.PlayerMakePropOwner( self.Owner, ent ) - ent:SetPos( self.Data.Pos ) - ent:Setup( "melon", 160 - math.Clamp( self.Owner:GetSkill( "Planting" ), 0, 60 ) + math.random( -20, 20 ), self.Owner ) - ent:Spawn() -end - -GMS.RegisterProcess( "PlantMelon", PROCESS ) - -/*--------------------------------------------------------- - Plant Banana ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Planting Banana", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - self.Owner:DecResource( "Banana_Seeds", 1 ) - self.Owner:IncXP( "Planting", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Planting" ) ), 1, 1000 ) ) - self.Owner:SendMessage( "Successfully planted.", 3, Color( 10, 200, 10, 255 ) ) - - local ent = ents.Create( "gms_seed" ) - SPropProtection.PlayerMakePropOwner( self.Owner , ent ) - ent:SetPos( self.Data.Pos ) - ent:Setup( "banana", 160 - math.Clamp( self.Owner:GetSkill( "Planting" ), 0, 60 ) + math.random( -20, 20 ), self.Owner ) - ent:Spawn() -end - -GMS.RegisterProcess( "PlantBanana", PROCESS ) - -/*--------------------------------------------------------- - Plant Orange ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Planting Orange", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - self.Owner:DecResource( "Orange_Seeds", 1 ) - self.Owner:IncXP( "Planting", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Planting" ) ) , 1, 1000 ) ) - self.Owner:SendMessage( "Successfully planted.", 3, Color( 10, 200, 10, 255 ) ) - - local ent = ents.Create( "gms_seed" ) - SPropProtection.PlayerMakePropOwner( self.Owner, ent ) - ent:SetPos( self.Data.Pos ) - ent:Setup( "orange", 160 - math.Clamp( self.Owner:GetSkill( "Planting" ), 0, 60 ) + math.random( -20, 20 ), self.Owner ) - ent:Spawn() -end - -GMS.RegisterProcess( "PlantOrange", PROCESS ) - -/*--------------------------------------------------------- - Plant Grain ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Planting Grain", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - self.Owner:DecResource( "Grain_Seeds", 1 ) - self.Owner:IncXP( "Planting", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Planting" ) ), 1, 1000 ) ) - self.Owner:SendMessage( "Successfully planted.", 3, Color( 10, 200, 10, 255 ) ) - - local ent = ents.Create( "gms_seed" ) - SPropProtection.PlayerMakePropOwner( self.Owner, ent ) - ent:SetPos( self.Data.Pos ) - ent:Setup( "grain", 160 - math.Clamp( self.Owner:GetSkill( "Planting" ), 0, 60 ) + math.random( -20, 20 ), self.Owner ) - ent:Spawn() -end - -GMS.RegisterProcess( "PlantGrain", PROCESS ) - -/*--------------------------------------------------------- - Plant Bush ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Planting Berry Bush", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - self.Owner:DecResource( "Berries", 1 ) - self.Owner:IncXP( "Planting", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Planting" ) ), 1, 1000 ) ) - self.Owner:SendMessage( "Successfully planted.", 3, Color( 10, 200, 10, 255 ) ) - - local ent = ents.Create( "gms_seed" ) - SPropProtection.PlayerMakePropOwner( self.Owner, ent ) - ent:SetPos( self.Data.Pos ) - ent:Setup( "berry", 160 - math.Clamp( self.Owner:GetSkill( "Planting" ), 0, 60 ) + math.random( -20, 20 ), self.Owner ) - ent:Spawn() -end - -GMS.RegisterProcess( "PlantBush", PROCESS ) - -/*--------------------------------------------------------- - Plant Tree ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Planting Tree", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - self.Owner:DecResource( "Sprouts", 1 ) - self.Owner:IncXP( "Planting", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Planting" ) ), 1, 1000 ) ) - self.Owner:SendMessage( "Successfully planted.", 3, Color( 10, 200, 10, 255 ) ) - - local ent = ents.Create( "gms_seed" ) - SPropProtection.PlayerMakePropOwner( self.Owner, ent ) - ent:SetPos( self.Data.Pos ) - ent:Setup( "tree", 240 - math.Clamp( self.Owner:GetSkill( "Planting" ), 0, 60 ) + math.random( -20, 20 ), self.Owner ) - ent:Spawn() -end - -GMS.RegisterProcess( "PlantTree", PROCESS ) - -/*--------------------------------------------------------- - Assembling ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Assembling", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - self.Owner:SendMessage( "Assembly successful.", 3, Color( 10, 200, 10, 255 ) ) -end - -PROCESS.Cancel = false - -GMS.RegisterProcess( "Assembling", PROCESS ) - -/*--------------------------------------------------------- - Fishing ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Fishing", self.Time, self.Cancel ) - self.Owner:EmitSound( "stranded/start_fishing.wav" ) -end - -function PROCESS:OnStop() - local num = math.random( 1, 100 ) - - if ( !self.Owner.Resources['Baits'] or self.Owner.Resources['Baits'] < 1 ) then - self.Data.Chance = self.Data.Chance * 0.25 - end - - if ( num < self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) then - if ( self.Owner.Resources['Baits'] and self.Owner.Resources['Baits'] > 0 ) then - self.Owner:DecResource( "Baits", 1 ) - end - - if ( num < ( self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) / 1.5 ) then - self.Owner:IncResource( "Bass", 1 ) - self.Owner:SendMessage( "Bass ( 1x )", 3, Color( 10, 200, 10, 255 ) ) - elseif ( num >= ( self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) / 1.5 && num < ( self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) / 1.2 ) then - self.Owner:IncResource( "Trout", 1 ) - self.Owner:SendMessage( "Trout ( 1x )", 3, Color( 10, 200, 10, 255 ) ) - elseif ( num >= ( self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) / 1.2 && num < self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) then - self.Owner:IncResource( "Salmon", 1 ) - self.Owner:SendMessage( "Salmon ( 1x )", 3, Color( 10, 200, 10, 255 ) ) - end - - self.Owner:IncXP( "Fishing", math.Clamp( math.Round( 250 / self.Owner:GetSkill( "Fishing" ) ), 1, 1000 ) ) - self.Owner:EmitSound( Sound( "ambient/water/water_splash" .. math.random( 1, 3 ) .. ".wav" ) ) - else - self.Owner:SendMessage( "Failed.", 3, Color( 200, 0, 0, 255 ) ) - end -end - -GMS.RegisterProcess( "Fishing", PROCESS ) - -/*--------------------------------------------------------- - Advanced Fishing ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Fishing", self.Time, self.Cancel ) - self.Owner:EmitSound( "stranded/start_fishing.wav" ) -end - -function PROCESS:OnStop() - local num = math.random( 1, 100 ) - - if ( !self.Owner.Resources['Baits'] or self.Owner.Resources['Baits'] < 1 ) then - self.Data.Chance = self.Data.Chance * 0.25 - end - - if ( num < self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) then - if ( self.Owner.Resources['Baits'] and self.Owner.Resources['Baits'] > 0 ) then - self.Owner:DecResource( "Baits", 1 ) - end - - if ( num < ( self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) / 2 ) then - self.Owner:IncResource( "Bass", 1 ) - self.Owner:SendMessage( "Bass ( 1x )", 3, Color( 10, 200, 10, 255 ) ) - elseif ( num >= ( self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) / 2 && num < ( self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) / 1.5 ) then - self.Owner:IncResource( "Trout", 1 ) - self.Owner:SendMessage( "Trout ( 1x )", 3, Color( 10, 200, 10, 255 ) ) - elseif ( num >= ( self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) / 1.5 && num < ( self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) / 1.2 ) then - self.Owner:IncResource( "Salmon", 1 ) - self.Owner:SendMessage( "Salmon ( 1x )", 3, Color( 10, 200, 10, 255 ) ) - elseif ( num >= ( self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) / 1.2 && num < self.Data.Chance + self.Owner:GetSkill( "Fishing" ) ) then - self.Owner:IncResource( "Shark", 1 ) - self.Owner:SendMessage( "Shark ( 1x )", 3, Color( 10, 200, 10, 255 ) ) - end - - self.Owner:IncXP( "Fishing", math.Clamp( math.Round( 250 / self.Owner:GetSkill( "Fishing" ) ), 1, 1000 ) ) - self.Owner:EmitSound( Sound( "ambient/water/water_splash" .. math.random( 1, 3 ) .. ".wav" ) ) - else - self.Owner:SendMessage( "Failed.", 3, Color( 200, 0, 0, 255 ) ) - end -end - -GMS.RegisterProcess( "AdvancedFishing", PROCESS ) - -/*--------------------------------------------------------- - Bottle Water ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Bottling Water", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - if (self.Owner:GetActiveWeapon():GetClass() == "gms_bucket") then - self.Owner:IncResource( "Water_Bottles", 10 ) - self.Owner:SendMessage( "Water Bottle ( 10x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:EmitSound( Sound( "ambient/water/water_spray" .. math.random( 1, 3 ) .. ".wav" ) ) - else - self.Owner:IncResource( "Water_Bottles", 1 ) - self.Owner:SendMessage( "Water Bottle ( 1x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:EmitSound( Sound( "ambient/water/water_spray" .. math.random( 1, 3 ) .. ".wav" ) ) - end -end - -GMS.RegisterProcess( "BottleWater", PROCESS ) - -/*--------------------------------------------------------- - Drink bottle ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Drinking Bottle", self.Time, self.Cancel ) - self.StartTime = CurTime() - - self:PlaySound() -end - -function PROCESS:PlaySound() - if ( CurTime() - self.StartTime > self.Time ) then return end - if ( !self.Owner.InProcess || self.StartTime != self.Owner.ProcessTable.StartTime ) then return end - - if ( self.Owner:Alive() ) then - self.Owner:EmitSound( Sound( "npc/barnacle/barnacle_gulp" .. math.random( 1, 2 ) .. ".wav" ) ) - timer.Simple( 0.75, function() self:PlaySound() end ) - end -end - -function PROCESS:OnStop() - self.Owner:DecResource( "Water_Bottles", 1 ) - self.Owner:SendMessage( "You're a little less thirsty now.", 3, Color( 10, 200, 10, 255 ) ) - if ( self.Owner.Thirst <= 750 ) then - self.Owner:SetThirst( self.Owner.Thirst + 250 ) - elseif ( self.Owner.Thirst >= 750 ) then - self.Owner:SetThirst( 1000 ) - end -end - -PROCESS.Cancel = false - -GMS.RegisterProcess( "DrinkBottle", PROCESS ) - -/*--------------------------------------------------------- - Take Medicine ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - if ( self.Owner:Health() >= 200 or ( self.Owner:Health() >= 150 and self.Owner:HasUnlock( "Master_Survivalist" ) != true ) or ( self.Owner:Health() >= 100 and self.Owner:HasUnlock( "Adept_Survivalist" ) != true ) ) then - self.Owner:SendMessage( "You're feeling good, why would you heal yourself.", 3, Color( 200, 0, 0, 255 ) ) - else - self.Owner:MakeProcessBar( "Taking Medicine", self.Time, self.Cancel ) - self.Owner:EmitSound( Sound( "items/smallmedkit1.wav" ) ) - end -end - -function PROCESS:OnStop() - if ( self.Owner:Health() >= 200 or ( self.Owner:Health() >= 150 and self.Owner:HasUnlock( "Master_Survivalist" ) != true ) or ( self.Owner:Health() >= 100 and self.Owner:HasUnlock( "Adept_Survivalist" ) != true ) ) then return end - self.Owner:DecResource( "Medicine", 1 ) - self.Owner:SendMessage( "You're feeling a bit better now.", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:Heal( 10 ) -end - -GMS.RegisterProcess( "TakeMedicine", PROCESS ) - -/*--------------------------------------------------------- - Cooking ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Cooking " .. self.Data.Name, self.Time, self.Cancel ) - self.Sound = CreateSound( self.Owner, Sound( "npc/headcrab/headcrab_burning_loop2.wav" ) ) - self.Sound:Play() -end - -function PROCESS:OnStop() - local num = math.random( 1, 100 ) - - if ( num + self.Owner:GetSkill( "Cooking" ) >= 50 ) then - self.Owner:SendMessage( "Successfully cooked.", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:IncXP( "Cooking", math.Clamp( math.Round( 150 / self.Owner:GetSkill( "Cooking" ) ), 1, 1000 ) ) - - local food = ents.Create( "gms_food" ) - food:SetPos( self.Owner:TraceFromEyes( 70 ).HitPos + Vector( 0, 0, 5 ) ) - SPropProtection.PlayerMakePropOwner( self.Owner, food ) - food.Value = self.Data.FoodValue - food.Name = self.Data.Name - food:Spawn() - food:SetFoodInfo( self.Data.Name ) - - timer.Simple( math.random( 240, 320 ), function() if ( IsValid( food ) ) then food:Fadeout( 2 ) end end ) - - for k, v in pairs( self.Data.Cost ) do self.Owner:DecResource( k, v ) end - else - self.Owner:SendMessage( "Failed.", 3, Color( 200, 0, 0, 255 ) ) - - local num = math.random( 1, 2 ) - - if ( num == 1 ) then - for k, v in pairs( self.Data.Cost ) do - self.Owner:DecResource( k, v ) - end - self.Owner:SendMessage( "The ingredients was wasted!", 3, Color( 200, 0, 0, 255 ) ) - end - end - - self.Sound:Stop() -end - -GMS.RegisterProcess( "Cook", PROCESS ) - -/*--------------------------------------------------------- - Make Weapon ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Crafting " .. self.Data.Name, self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - self.Owner:SendMessage( "Made a " .. self.Data.Name .. ".", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:IncXP( "Weapon_Crafting", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Weapon_Crafting" ) ), 1, 1000 ) ) - - if ( self.Owner:HasWeapon( self.Data.Class ) ) then - local weap = ents.Create( self.Data.Class ) - weap:SetPos( self.Owner:TraceFromEyes( 100 ).HitPos + Vector( 0, 0, 15 ) ) - weap:Spawn() - SPropProtection.PlayerMakePropOwner( self.Owner, weap ) - else - self.Owner:Give( self.Data.Class ) - end - - for k, v in pairs( self.Data.Cost ) do - self.Owner:DecResource( k, v ) - end -end - -GMS.RegisterProcess( "MakeWeapon", PROCESS ) - -/*--------------------------------------------------------- - MakeGeneric ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Making " .. self.Data.Name, self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - for k, v in pairs( self.Data.Cost ) do - self.Owner:DecResource( k, v ) - end - - for k, v in pairs( self.Data.Res ) do - self.Owner:SendMessage( "Made " .. string.gsub( k, "_", " " ) .. " ( " .. v .. "x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:IncResource( k, v ) - end -end - -GMS.RegisterProcess( "MakeGeneric", PROCESS ) - -/*--------------------------------------------------------- - Make Building ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Setting up " .. self.Data.Name .. " site", self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - self.Owner:SendMessage( "Made a " .. self.Data.Name .. " site.", 3, Color( 10, 200, 10, 255 ) ) - - if ( self.Owner:GetBuildingSite() and self.Owner:GetBuildingSite():IsValid() ) then - ent = self.Owner:GetBuildingSite() - ent:Remove() - end - - local site = self.Owner:CreateStructureBuildingSite( self.Data.Pos, self.Owner:GetAngles(), self.Data.BuildSiteModel, self.Data.Class, self.Data.Cost, self.Data.Name ) -end - -GMS.RegisterProcess( "MakeBuilding", PROCESS ) - -/* Smelt */ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Smelting " .. self.Data.Name, self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - for k, v in pairs( self.Data.Cost ) do - self.Owner:DecResource( k, v ) - end - - for k, v in pairs( self.Data.Res ) do - self.Owner:SendMessage( "Made " .. string.gsub( k, "_", " " ) .. " ( " .. v .. "x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:IncResource( k, v ) - - self.Owner:IncXP( "Smelting", math.Clamp( math.Round( ( v * 10 ) / self.Owner:GetSkill( "Smelting" ) ), 1, 1000 ) ) - end -end - -GMS.RegisterProcess( "Smelt", PROCESS ) - -/* Crush */ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Crushing " .. self.Data.Name, self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - for k, v in pairs( self.Data.Cost ) do - self.Owner:DecResource( k, v ) - end - - for k, v in pairs( self.Data.Res ) do - self.Owner:SendMessage( "Made " .. string.gsub( k, "_", " " ) .. " ( " .. v .. "x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:IncResource( k, v ) - end -end - -GMS.RegisterProcess( "Crush", PROCESS ) - -/* Processing */ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Processing " .. self.Data.Name, self.Time, self.Cancel ) -end - -function PROCESS:OnStop() - for k, v in pairs( self.Data.Cost ) do - self.Owner:DecResource( k, v ) - end - - for k, v in pairs( self.Data.Res ) do - self.Owner:IncXP( "Weapon_Crafting", math.Clamp( math.Round( 150 / self.Owner:GetSkill( "Weapon_Crafting" ) ), 1, 1000 ) ) - self.Owner:SendMessage( "Made " .. string.gsub( k, "_", " " ) .. " ( " .. v .. "x )", 3, Color( 10, 200, 10, 255 ) ) - self.Owner:IncResource( k, v ) - end -end - -GMS.RegisterProcess( "Processing", PROCESS ) diff --git a/ftp_gmstranded/gamemode/resources.lua b/ftp_gmstranded/gamemode/resources.lua deleted file mode 100644 index 780c3f5..0000000 --- a/ftp_gmstranded/gamemode/resources.lua +++ /dev/null @@ -1,68 +0,0 @@ - -/*------------------------ Models ------------------------*/ - -resource.AddFile( "models/weapons/v_fists.mdl" ) -resource.AddFile( "models/weapons/w_fists.mdl" ) -resource.AddFile( "models/weapons/v_shovel.mdl" ) -resource.AddFile( "models/weapons/w_shovel.mdl" ) -resource.AddFile( "models/weapons/v_copper_pickaxe.mdl" ) -resource.AddFile( "models/weapons/w_copper_pickaxe.mdl" ) -resource.AddFile( "models/weapons/v_iron_pickaxe.mdl" ) -resource.AddFile( "models/weapons/w_iron_pickaxe.mdl" ) -resource.AddFile( "models/weapons/v_stone_pickaxe.mdl" ) -resource.AddFile( "models/weapons/w_stone_pickaxe.mdl" ) -resource.AddFile( "models/weapons/v_copper_hatchet.mdl" ) -resource.AddFile( "models/weapons/v_iron_hatchet.mdl" ) -resource.AddFile( "models/weapons/v_stone_hatchet.mdl" ) -resource.AddFile( "models/weapons/w_copper_hatchet.mdl" ) -resource.AddFile( "models/weapons/w_iron_hatchet.mdl" ) -resource.AddFile( "models/weapons/w_stone_hatchet.mdl" ) - -resource.AddFile( "models/gm_forest/tree_oak1.mdl" ) - -/*------------------------ Materials ------------------------*/ - -resource.AddFile( "materials/models/weapons/shovel/shovel1.vmt" ) -resource.AddFile( "materials/models/weapons/shovel/shovel1.vtf" ) -resource.AddFile( "materials/models/weapons/shovel/shovel1_n.vtf" ) -resource.AddFile( "materials/models/weapons/shovel/shovel2.vmt" ) -resource.AddFile( "materials/models/weapons/shovel/shovel2.vtf" ) -resource.AddFile( "materials/models/weapons/shovel/shovel2_n.vtf" ) -resource.AddFile( "materials/models/weapons/shovel/shovel3.vmt" ) -resource.AddFile( "materials/models/weapons/shovel/shovel3.vtf" ) -resource.AddFile( "materials/models/weapons/shovel/shovel3_n.vtf" ) -resource.AddFile( "materials/models/weapons/pickaxe/copper/copper.vtf" ) -resource.AddFile( "materials/models/weapons/pickaxe/copper/copper_n.vtf" ) -resource.AddFile( "materials/models/weapons/pickaxe/copper/pickaxe01.vmt" ) -resource.AddFile( "materials/models/weapons/pickaxe/stone/pickaxe01.vmt" ) -resource.AddFile( "materials/models/weapons/pickaxe/stone/stone.vtf" ) -resource.AddFile( "materials/models/weapons/pickaxe/stone/stone_n.vtf" ) -resource.AddFile( "materials/models/weapons/pickaxe/iron/iron.vtf" ) -resource.AddFile( "materials/models/weapons/pickaxe/iron/iron_n.vtf" ) -resource.AddFile( "materials/models/weapons/pickaxe/iron/pickaxe01.vmt" ) -resource.AddFile( "materials/models/weapons/hatchet/copper/axe.vmt" ) -resource.AddFile( "materials/models/weapons/hatchet/copper/Copper.vtf" ) -resource.AddFile( "materials/models/weapons/hatchet/copper/Copper_n.vtf" ) -resource.AddFile( "materials/models/weapons/hatchet/stone/axe.vmt" ) -resource.AddFile( "materials/models/weapons/hatchet/stone/stone.vtf" ) -resource.AddFile( "materials/models/weapons/hatchet/stone/stone_n.vtf" ) -resource.AddFile( "materials/models/weapons/hatchet/iron/axe.vmt" ) -resource.AddFile( "materials/models/weapons/hatchet/iron/iron.vtf" ) -resource.AddFile( "materials/models/weapons/hatchet/iron/iron_n.vtf" ) -resource.AddFile( "materials/models/weapons/hands.vmt" ) -resource.AddFile( "materials/models/weapons/hands.vtf" ) -resource.AddFile( "materials/models/weapons/hands_normal.vtf" ) - -resource.AddFile( "materials/gm_forest/oak_brk.vmt" ) -resource.AddFile( "materials/gm_forest/brg_eik_brn2.vmt" ) -resource.AddFile( "materials/gm_forest/brg_eik_brn2.vtf" ) - -/*------------------------ Sounds ------------------------*/ - -resource.AddFile( "sound/citizen_beaten1.wav" ) -resource.AddFile( "sound/citizen_beaten4.wav" ) -resource.AddFile( "sound/citizen_beaten5.wav" ) -resource.AddFile( "sound/cough1.wav" ) -resource.AddFile( "sound/cough2.wav" ) -resource.AddFile( "sound/cough3.wav" ) -resource.AddFile( "sound/cough4.wav" ) diff --git a/ftp_gmstranded/gamemode/shared.lua b/ftp_gmstranded/gamemode/shared.lua deleted file mode 100644 index b8e7ac5..0000000 --- a/ftp_gmstranded/gamemode/shared.lua +++ /dev/null @@ -1,1029 +0,0 @@ - -/* - Authors! The Stranded Team! - jA_cOp, prop_dynamic, Chewgum, Wokkel, robotboy655 - - READ THIS: - If you want to add custom content or edit anything in gamemode - DO NOT. Please read customcontent.lua! - - ÏÐÎ×ÒÈ ÝÒÎ: - Åñëè òû ñîáèðàåøüñÿ òóò ÷òî ëèáî èçìåíÿòü - ÍÅ ÄÅËÀÉ ÝÒÎÃÎ. Ïðî÷òè ôàéë customcontent.lua! -*/ - -DeriveGamemode( "sandbox" ) - -GM.Name = "Garry's Mod Stranded" -GM.Author = "Stranded Team" -GM.Email = "robotboy655@gmail.com" -GM.Website = "" - -team.SetUp( 1, "The Stranded", Color( 200, 200, 0, 255 ) ) -team.SetUp( 2, "Survivalists", Color( 255, 255, 255, 255 ) ) -team.SetUp( 3, "Anonymous", Color( 0, 121, 145, 255 ) ) -team.SetUp( 4, "The Gummies", Color( 255, 23, 0, 255 ) ) -team.SetUp( 5, "The Dynamics", Color( 0, 72, 255, 255 ) ) -team.SetUp( 6, "Scavengers", Color( 8, 255, 0, 255 ) ) - -GMS = GMS or {} - -include( "spp/sh_spp.lua" ) -include( "time_weather.lua" ) - --- Shared includes -include( "unlocks.lua" ) -include( "combinations.lua" ) -include( "combinations2.lua" ) -include( "combirenbuy.lua" ) -include( "combirensell.lua" ) - -/* ---------------------------------------------------------------------------------------------------- - Utility functions ----------------------------------------------------------------------------------------------------- */ - - - -function string.Capitalize( str ) - local str = string.Explode( "_", str ) - for k, v in pairs( str ) do - str[ k ] = string.upper( string.sub( v, 1, 1 ) ) .. string.sub( v, 2 ) - end - - str = string.Implode( "_", str ) - return str -end - -function player.FindByName( str ) - if ( str == nil or str == "" ) then return false end - for id, ply in pairs( player.GetAll() ) do - if ( string.find( string.lower( ply:Name() ), string.lower( str ) ) != nil ) then - return ply - end - end - return false -end - -function GMS_IsAdminOnlyModel( mdl ) - if ( mdl == GMS.SmallRockModel ) then return true end - if ( table.HasValue( GMS.EdibleModels, mdl ) ) then return true end - if ( table.HasValue( GMS.RockModels, mdl ) ) then return true end - if ( table.HasValue( GMS.AdditionalRockModels, mdl ) ) then return true end - if ( table.HasValue( GMS.TreeModels, mdl ) ) then return true end - if ( table.HasValue( GMS.AdditionalTreeModels, mdl ) ) then return true end - return false -end - -function GMS.ClassIsNearby( pos, class, range ) - local nearby = false - for k, v in pairs( ents.FindInSphere( pos, range ) ) do - if ( v:GetClass() == class and ( pos - Vector( v:LocalToWorld( v:OBBCenter() ).x, v:LocalToWorld( v:OBBCenter() ).y, pos.z ) ):Length() <= range ) then - nearby = true - end - end - - return nearby -end - -function GMS.IsInWater( pos ) - local trace = {} - trace.start = pos - trace.endpos = pos + Vector( 0, 0, 1 ) - trace.mask = bit.bor( MASK_WATER, MASK_SOLID ) - - local tr = util.TraceLine( trace ) - return tr.Hit -end - -/* ---------------------------------------------------------------------------------------------------- - Player Functions ----------------------------------------------------------------------------------------------------- */ - -local PlayerMeta = FindMetaTable( "Player" ) - -function PlayerMeta:IsDeveloper() - if ( self:SteamID() == "STEAM_0:0:18313012" ) then return true end - return false -end - -/* ---------------------------------------------------------------------------------------------------- - Entity Functions ----------------------------------------------------------------------------------------------------- */ - -local EntityMeta = FindMetaTable( "Entity" ) - -function EntityMeta:IsTreeModel() - if ( !IsValid( self ) || !self.GetModel || !self:GetModel() ) then return false end - - for k, v in pairs( GMS.TreeModels ) do - if ( string.lower( v ) == string.lower( self:GetModel() ) or string.gsub( string.lower( v ), "/", "\\" ) == string.lower( self:GetModel() ) ) then return true end - end - - for k, v in pairs( GMS.AdditionalTreeModels ) do - if ( string.lower( v ) == string.lower( self:GetModel() ) or string.gsub( string.lower( v ), "/", "\\" ) == string.lower( self:GetModel() ) ) then return true end - end - - -- Experemental - if ( SERVER && string.find( self:GetModel(), "tree" ) && self:CreatedByMap() ) then return true end - - return false -end - -function EntityMeta:IsRockModel() - if ( !IsValid( self ) ) then return false end - - local mdl = string.lower( self:GetModel() ) - - if ( mdl == string.lower( GMS.SmallRockModel ) ) then return true end - - for k, v in pairs( GMS.RockModels ) do - if ( string.lower( v ) == mdl or string.gsub( string.lower( v ), "/", "\\" ) == mdl ) then return true end - end - - for k, v in pairs( GMS.AdditionalRockModels ) do - if ( string.lower( v ) == mdl or string.gsub( string.lower( v ), "/", "\\" ) == mdl ) then return true end - end - - -- Experemental - if ( SERVER && string.find( self:GetModel(), "rock" ) && self:CreatedByMap() ) then return true end - - return false -end - -function EntityMeta:IsBerryBushModel() - if ( !IsValid( self ) ) then return false end - - local mdl = "models/props/pi_shrub.mdl" - if ( mdl == self:GetModel() or string.gsub( mdl, "/", "\\" ) == self:GetModel() ) then return true end - - return false -end - -function EntityMeta:IsGrainModel() - if ( !IsValid( self ) ) then return false end - - local mdl = "models/props_foliage/cattails.mdl" - if ( mdl == self:GetModel() or string.gsub( mdl, "/", "\\" ) == self:GetModel() ) then return true end - - return false -end - -function EntityMeta:IsFoodModel() - if ( !IsValid( self ) ) then return false end - - for k, v in pairs( GMS.EdibleModels ) do - if ( string.lower( v ) == string.lower( self:GetModel() ) or string.gsub( string.lower( v ), "/", "\\" ) == string.lower( self:GetModel() ) ) then - return true - end - end - - return false -end - -function EntityMeta:IsProp() - if ( !IsValid( self ) ) then return false end - - local cls = self:GetClass() - if ( cls == "prop_physics" or cls == "prop_physics_multiplayer" or cls == "prop_dynamic" ) then return true end - - return false -end - -function EntityMeta:GetVolume() - local min, max = self:OBBMins(), self:OBBMaxs() - local vol = math.abs( max.x - min.x ) * math.abs( max.y - min.y ) * math.abs( max.z - min.z ) - return vol / ( 16 ^ 3 ) -end - -function EntityMeta:IsSleepingFurniture() - for _, v in ipairs( GMS.SleepingFurniture ) do - if ( string.lower( v ) == self:GetModel() or string.gsub( string.lower( v ), "/", "\\" ) == self:GetModel() ) then - return true - end - end - - return false -end - -function EntityMeta:IsPickupProhibitedModel() - if ( !IsValid( self ) ) then return end - return table.HasValue( GMS.PickupProhibitedClasses, self:GetClass() ) -end - -/* ---------------------------------------------------------------------------------------------------- - Shared Hooks ( for prediction ) ----------------------------------------------------------------------------------------------------- */ - -function GM:PlayerNoClip( pl, on ) - if ( pl:InVehicle() ) then return false end - if ( pl:IsDeveloper() || game.SinglePlayer() ) then return true end - return false -end - -function GM:PhysgunPickup( ply, ent ) - if ( !IsValid( ent ) ) then return self.BaseClass.PhysgunPickup( self, ply, ent ) end - if ( ent:IsRockModel() || ent:IsNPC() || ent:IsTreeModel() || ent:IsPlayer() || ent:IsFoodModel() || ent:IsPickupProhibitedModel() ) then return false end - - if ( !SPropProtection.PhysGravGunPickup( ply, ent ) ) then return false end - - return self.BaseClass.PhysgunPickup( self, ply, ent ) -end - -function GM:GravGunPunt( ply, ent ) - if ( !IsValid( ent ) ) then return self.BaseClass.GravGunPunt( self, ply, ent ) end - if ( ent:IsRockModel() || ent:IsNPC() || ent:IsTreeModel() || ent:IsPlayer() || ent:IsFoodModel() || ent:IsPickupProhibitedModel() || ent:GetClass() == "gms_buildsite" ) then return false end - - if ( !SPropProtection.PhysGravGunPickup( ply, ent ) ) then return false end - - return self.BaseClass.GravGunPunt( self, ply, ent ) -end - -function GM:GravGunPickupAllowed( ply, ent ) - if ( !IsValid( ent ) ) then return self.BaseClass.GravGunPickupAllowed( self, ply, ent ) end - if ( ent:IsRockModel() || ent:IsNPC() || ent:IsTreeModel() || ent:IsPlayer() || ent:IsFoodModel() || ent:IsPickupProhibitedModel() || ent:GetClass() == "gms_buildsite" ) then return false end - - if ( !SPropProtection.PhysGravGunPickup( ply, ent ) ) then return false end - - return self.BaseClass.GravGunPickupAllowed( self, ply, ent ) -end - -function GM:CanTool( ply, tr, mode ) - - if ( mode == "gms_rope" ) then - if ( SERVER && ply:GetResource( "Rope" ) < 1 ) then ply:SendMessage( "You need rope to use this tool.", 3, Color( 200, 0, 0, 255 ) ) return false end - if ( CLIENT && ( !Resources[ "Rope" ] || Resources[ "Rope" ] < 1 ) ) then return false end - end - - if ( mode == "weld" ) then - if ( SERVER && ply:GetResource( "Welder" ) < 1 ) then ply:SendMessage( "You need a Welder to use this tool.", 3, Color( 200, 0, 0, 255 ) ) return false end - if ( CLIENT && ( !Resources[ "Welder" ] || Resources[ "Welder" ] < 1 ) ) then return false end - end - - if ( table.HasValue( GMS.ProhibitedStools, mode ) && !ply:IsAdmin() ) then ply:SendMessage( "This tool is prohibited.", 3, Color( 200, 0, 0, 255 ) ) return false end - - local ent = tr.Entity - if ( !IsValid( ent ) && ent:GetClass() != "worldspawn" ) then return end - - if ( !SPropProtection.PhysGravGunPickup( ply, ent ) ) then return false end - - if ( ent:IsRockModel() || ent:IsNPC() || ent:IsTreeModel() || ent:IsPlayer() || ent:IsFoodModel() || ent:IsPickupProhibitedModel() || ent:GetClass() == "gms_buildsite" ) then return false end - - return true -end - -/* ---------------------------------------------------------------------------------------------------- - Config ----------------------------------------------------------------------------------------------------- */ - -GMS_SpawnLists = GMS_SpawnLists or {} - -GMS_SpawnLists[ "Wood - Tables / Desks" ] = { - "models/props_c17/FurnitureDrawer003a.mdl", - "models/props_c17/FurnitureDrawer002a.mdl", - "models/props_c17/FurnitureTable003a.mdl", - "models/props_c17/FurnitureDrawer001a.mdl", - "models/props_c17/FurnitureTable001a.mdl", - "models/props_c17/FurnitureTable002a.mdl", - "models/props_interiors/Furniture_Desk01a.mdl", - "models/props_interiors/Furniture_Vanity01a.mdl", - "models/props_wasteland/cafeteria_table001a.mdl" -} - -GMS_SpawnLists[ "Wood - Shelving / Storage" ] = { - "models/props_c17/FurnitureShelf001b.mdl", - "models/props_wasteland/prison_shelf002a.mdl", - "models/props_junk/wood_crate001a.mdl", - "models/props_junk/wood_crate001a_damaged.mdl", - "models/props_junk/wood_crate002a.mdl", - "models/props_wasteland/laundry_cart002.mdl", - "models/props_c17/FurnitureShelf001a.mdl", - "models/props_interiors/Furniture_shelf01a.mdl", - "models/props_c17/shelfunit01a.mdl", - "models/props_c17/FurnitureDresser001a.mdl" -} - -GMS_SpawnLists[ "Wood - Seating" ] = { - "models/props_c17/FurnitureChair001a.mdl", - "models/props_interiors/Furniture_chair01a.mdl", - "models/props_c17/playground_swingset_seat01a.mdl", - "models/props_c17/playground_teetertoter_seat.mdl", - "models/props_wasteland/cafeteria_bench001a.mdl", - "models/props_trainstation/BenchOutdoor01a.mdl", - "models/props_c17/bench01a.mdl", - "models/props_trainstation/bench_indoor001a.mdl" -} - -GMS_SpawnLists[ "Wood - Doors / Plating / Beams" ] = { - "models/props_debris/wood_board02a.mdl", - "models/props_debris/wood_board04a.mdl", - "models/props_debris/wood_board06a.mdl", - "models/props_debris/wood_board01a.mdl", - "models/props_debris/wood_board03a.mdl", - "models/props_debris/wood_board05a.mdl", - "models/props_debris/wood_board07a.mdl", - "models/props_junk/wood_pallet001a.mdl", - "models/props_wasteland/wood_fence02a.mdl", - "models/props_wasteland/wood_fence01a.mdl", - "models/props_c17/Frame002a.mdl", - "models/props_wasteland/barricade001a.mdl", - "models/props_wasteland/barricade002a.mdl", - "models/props_docks/channelmarker_gib01.mdl", - "models/props_docks/channelmarker_gib04.mdl", - "models/props_docks/channelmarker_gib03.mdl", - "models/props_docks/channelmarker_gib02.mdl", - "models/props_docks/dock01_pole01a_128.mdl", - "models/props_docks/dock02_pole02a_256.mdl", - "models/props_docks/dock01_pole01a_256.mdl", - "models/props_docks/dock02_pole02a.mdl", - "models/props_docks/dock03_pole01a_256.mdl", - "models/props_docks/dock03_pole01a.mdl" -} - -GMS_SpawnLists[ "Iron - Kitchen/Appliances" ] = { - "models/props_interiors/SinkKitchen01a.mdl", - "models/props_interiors/Radiator01a.mdl", - "models/props_c17/FurnitureWashingmachine001a.mdl", - "models/props_c17/FurnitureFridge001a.mdl", - "models/props_interiors/refrigerator01a.mdl", - "models/props_c17/FurnitureBoiler001a.mdl", - "models/props_c17/FurnitureFireplace001a.mdl", - "models/props_wasteland/kitchen_counter001d.mdl", - "models/props_wasteland/kitchen_counter001b.mdl", - "models/props_wasteland/kitchen_counter001a.mdl", - "models/props_wasteland/kitchen_counter001c.mdl", - "models/props_wasteland/kitchen_stove001a.mdl", - "models/props_wasteland/kitchen_stove002a.mdl", - "models/props_wasteland/kitchen_fridge001a.mdl", - "models/props_wasteland/laundry_dryer001.mdl", - "models/props_wasteland/laundry_dryer002.mdl", - "models/props_wasteland/laundry_washer003.mdl", - "models/props_wasteland/laundry_washer001a.mdl", - "models/props_wasteland/laundry_basket001.mdl", - "models/props_wasteland/laundry_basket002.mdl" -} - -GMS_SpawnLists[ "Iron - Shelving/Storage" ] = { - "models/props_c17/FurnitureShelf002a.mdl", - "models/props_lab/filecabinet02.mdl", - "models/props_wasteland/controlroom_filecabinet002a.mdl", - "models/props_wasteland/controlroom_storagecloset001a.mdl", - "models/props_wasteland/kitchen_shelf002a.mdl", - "models/props_wasteland/kitchen_shelf001a.mdl", - "models/props_c17/display_cooler01a.mdl" -} - -/*GMS_SpawnLists[ "Iron - Cargo/Tanks" ] = { - "models/props_wasteland/cargo_container01.mdl", - "models/props_wasteland/cargo_container01b.mdl", - "models/props_wasteland/cargo_container01c.mdl", - "models/props_wasteland/horizontalcoolingtank04.mdl", - "models/props_wasteland/coolingtank02.mdl", - "models/props_wasteland/coolingtank01.mdl", - "models/props_junk/TrashDumpster01a.mdl", - "models/props_junk/TrashDumpster02.mdl" -} - -GMS_SpawnLists[ "Iron - Lighting" ] = { - "models/props_c17/light_cagelight02_on.mdl", - "models/props_c17/light_cagelight01_on.mdl", - "models/props_wasteland/prison_lamp001c.mdl", - "models/props_wasteland/prison_lamp001a.mdl", - "models/props_wasteland/prison_lamp001b.mdl", - "models/props_c17/lamp_standard_off01.mdl", - "models/props_c17/lamp_bell_on.mdl", - "models/props_c17/light_decklight01_on.mdl", - "models/props_c17/light_floodlight02_off.mdl", - "models/props_wasteland/light_spotlight02_base.mdl", - "models/props_wasteland/light_spotlight02_lamp.mdl", - "models/props_wasteland/light_spotlight01_base.mdl", - "models/props_wasteland/light_spotlight01_lamp.mdl", - "models/props_trainstation/Column_Light001b.mdl", - "models/props_trainstation/Column_Light001a.mdl", - "models/props_trainstation/light_128wallMounted001a.mdl", - "models/props_c17/LampFixture01a.mdl", - "models/props_c17/lamppost03a_on.mdl", - "models/props_c17/Traffic_Light001a.mdl", - "models/props_trainstation/TrackLight01.mdl", - "models/props_trainstation/light_Signal002a.mdl", - "models/props_trainstation/light_Signal001a.mdl", - "models/props_trainstation/light_Signal001b.mdl" -}*/ - -GMS_SpawnLists[ "Iron - Containers" ] = { - "models/props_junk/garbage_metalcan001a.mdl", - "models/props_junk/garbage_metalcan002a.mdl", - "models/props_junk/PopCan01a.mdl", - "models/props_interiors/pot01a.mdl", - "models/props_c17/metalPot002a.mdl", - "models/props_interiors/pot02a.mdl", - "models/props_c17/metalPot001a.mdl", - "models/props_junk/metal_paintcan001a.mdl", - "models/props_junk/metalgascan.mdl", - "models/props_junk/MetalBucket01a.mdl", - "models/props_junk/MetalBucket02a.mdl", - "models/props_trainstation/trashcan_indoor001b.mdl", - "models/props_trainstation/trashcan_indoor001a.mdl", - "models/props_c17/oildrum001.mdl", - "models/props_c17/canister01a.mdl", - "models/props_c17/canister02a.mdl", - "models/props_c17/canister_propane01a.mdl" -} - -GMS_SpawnLists[ "Iron - Signs" ] = { - "models/props_c17/streetsign005d.mdl", - "models/props_c17/streetsign005c.mdl", - "models/props_c17/streetsign005b.mdl", - "models/props_c17/streetsign004f.mdl", - "models/props_c17/streetsign004e.mdl", - "models/props_c17/streetsign003b.mdl", - "models/props_c17/streetsign002b.mdl", - "models/props_c17/streetsign001c.mdl", - "models/props_trainstation/TrackSign01.mdl", - "models/props_trainstation/clock01.mdl", - "models/props_trainstation/trainstation_clock001.mdl" -} - -GMS_SpawnLists[ "Copper - Signs" ] = { - "models/props_trainstation/TrackSign02.mdl", - "models/props_trainstation/TrackSign03.mdl", - "models/props_trainstation/TrackSign10.mdl", - "models/props_trainstation/TrackSign09.mdl", - "models/props_trainstation/TrackSign08.mdl", - "models/props_trainstation/TrackSign07.mdl" -} - -GMS_SpawnLists[ "Iron - Rails" ] = { - "models/props_trainstation/handrail_64decoration001a.mdl", - "models/props_c17/Handrail04_short.mdl", - "models/props_c17/Handrail04_Medium.mdl", - "models/props_c17/Handrail04_corner.mdl", - "models/props_c17/Handrail04_long.mdl", - "models/props_c17/Handrail04_SingleRise.mdl", - "models/props_c17/Handrail04_DoubleRise.mdl" -} - -GMS_SpawnLists[ "Copper - Fencing" ] = { - "models/props_wasteland/interior_fence002a.mdl", - "models/props_wasteland/interior_fence002e.mdl", - "models/props_wasteland/interior_fence001g.mdl", - "models/props_wasteland/interior_fence002f.mdl", - "models/props_wasteland/interior_fence002c.mdl", - "models/props_wasteland/interior_fence002d.mdl", - "models/props_wasteland/interior_fence004b.mdl", - "models/props_wasteland/interior_fence004a.mdl", - "models/props_wasteland/exterior_fence002a.mdl", - "models/props_wasteland/exterior_fence003a.mdl", - "models/props_wasteland/exterior_fence003b.mdl", - "models/props_wasteland/exterior_fence002c.mdl", - "models/props_wasteland/exterior_fence002d.mdl", - "models/props_wasteland/exterior_fence001a.mdl", - "models/props_wasteland/exterior_fence002e.mdl" -} - -GMS_SpawnLists[ "Iron - Doors/Plating/Beams" ] = { - "models/props_c17/door02_double.mdl", - "models/props_c17/door01_left.mdl", - "models/props_borealis/borealis_door001a.mdl", - "models/props_interiors/refrigeratorDoor02a.mdl", - "models/props_interiors/refrigeratorDoor01a.mdl", - "models/props_building_details/Storefront_Template001a_Bars.mdl", - "models/props_c17/gate_door01a.mdl", - "models/props_c17/gate_door02a.mdl", - "models/props_junk/ravenholmsign.mdl", - "models/props_debris/metal_panel02a.mdl", - "models/props_debris/metal_panel01a.mdl", - "models/props_junk/TrashDumpster02b.mdl", - "models/props_lab/blastdoor001a.mdl", - "models/props_lab/blastdoor001b.mdl", - "models/props_lab/blastdoor001c.mdl", - "models/props_trainstation/trainstation_post001.mdl", - "models/props_c17/signpole001.mdl", - "models/props_junk/harpoon002a.mdl", - "models/props_c17/metalladder002b.mdl", - "models/props_c17/metalladder002.mdl", - "models/props_c17/metalladder003.mdl", - "models/props_c17/metalladder001.mdl", - "models/props_junk/iBeam01a.mdl", - "models/props_junk/iBeam01a_cluster01.mdl" -} - -GMS_SpawnLists[ "Iron - Vehicles" ] = { - "models/props_junk/Wheebarrow01a.mdl", - "models/props_junk/PushCart01a.mdl", - "models/props_wasteland/gaspump001a.mdl", - "models/props_wasteland/wheel01.mdl", - "models/props_wasteland/wheel01a.mdl", - "models/props_wasteland/wheel03b.mdl", - "models/props_wasteland/wheel02b.mdl", - "models/props_wasteland/wheel02a.mdl", - "models/props_wasteland/wheel03a.mdl", - "models/props_citizen_tech/windmill_blade002a.mdl", - "models/airboat.mdl", - "models/buggy.mdl", - "models/props_vehicles/car002a_physics.mdl", - "models/props_vehicles/car001b_hatchback.mdl", - "models/props_vehicles/car001a_hatchback.mdl", - "models/props_vehicles/car003a_physics.mdl", - "models/props_vehicles/car003b_physics.mdl", - "models/props_vehicles/car004a_physics.mdl", - "models/props_vehicles/car004b_physics.mdl", - "models/props_vehicles/car005a_physics.mdl", - "models/props_vehicles/car005b_physics.mdl", - "models/props_vehicles/van001a_physics.mdl", - "models/props_vehicles/truck003a.mdl", - "models/props_vehicles/truck002a_cab.mdl", - "models/props_vehicles/trailer002a.mdl", - "models/props_vehicles/truck001a.mdl", - "models/props_vehicles/generatortrailer01.mdl", - "models/props_vehicles/apc001.mdl", - "models/combine_apc_wheelcollision.mdl", - "models/props_vehicles/trailer001a.mdl", - "models/props_trainstation/train003.mdl", - "models/props_trainstation/train002.mdl", - "models/props_combine/combine_train02a.mdl", - "models/props_combine/CombineTrain01a.mdl", - "models/props_combine/combine_train02b.mdl", - "models/props_trainstation/train005.mdl" -} - -GMS_SpawnLists[ "Iron - Seating" ] = { - "models/props_c17/chair_stool01a.mdl", - "models/props_c17/chair02a.mdl", - "models/props_c17/chair_office01a.mdl", - "models/props_wasteland/controlroom_chair001a.mdl", - "models/props_c17/chair_kleiner03a.mdl", - "models/props_trainstation/traincar_seats001.mdl", - "models/props_c17/FurnitureBed001a.mdl", - "models/props_wasteland/prison_bedframe001b.mdl", - "models/props_c17/FurnitureBathtub001a.mdl", - "models/props_interiors/BathTub01a.mdl" -} - -GMS_SpawnLists[ "Iron - Misc/Buttons" ] = { - "models/props_c17/TrapPropeller_Lever.mdl", - "models/props_c17/TrapPropeller_Engine.mdl", - "models/props_c17/TrapPropeller_Blade.mdl", - "models/props_junk/sawblade001a.mdl", - "models/props_trainstation/payphone001a.mdl", - "models/props_wasteland/prison_throwswitchlever001.mdl", - "models/props_wasteland/prison_throwswitchbase001.mdl", - "models/props_wasteland/tram_lever01.mdl", - "models/props_wasteland/tram_leverbase01.mdl", - "models/props_wasteland/panel_leverHandle001a.mdl", - "models/props_wasteland/panel_leverBase001a.mdl", - "models/props_lab/tpplug.mdl", - "models/props_lab/tpplugholder_single.mdl", - "models/props_lab/tpplugholder.mdl", - "models/props_c17/cashregister01a.mdl" -} - -GMS_SpawnLists[ "Wood - PHX" ] = { - "models/props_phx/construct/wood/wood_boardx1.mdl", - "models/props_phx/construct/wood/wood_boardx2.mdl", - "models/props_phx/construct/wood/wood_boardx4.mdl", - "models/props_phx/construct/wood/wood_panel1x1.mdl", - "models/props_phx/construct/wood/wood_panel1x2.mdl", - "models/props_phx/construct/wood/wood_panel2x2.mdl", - "models/props_phx/construct/wood/wood_panel2x4.mdl", - "models/props_phx/construct/wood/wood_panel4x4.mdl", - "models/props_phx/construct/wood/wood_wire1x1.mdl", - "models/props_phx/construct/wood/wood_wire1x1x1.mdl", - "models/props_phx/construct/wood/wood_wire1x1x2.mdl", - "models/props_phx/construct/wood/wood_wire1x1x2b.mdl", - "models/props_phx/construct/wood/wood_wire1x2.mdl", - "models/props_phx/construct/wood/wood_wire1x2b.mdl", - "models/props_phx/construct/wood/wood_wire1x2x2b.mdl", - "models/props_phx/construct/wood/wood_wire2x2.mdl", - "models/props_phx/construct/wood/wood_wire2x2b.mdl", - "models/props_phx/construct/wood/wood_wire2x2x2b.mdl" -} - -GMS_SpawnLists[ "Iron - PHX" ] = { - "models/props_phx/construct/metal_plate1.mdl", - "models/props_phx/construct/metal_plate1x2.mdl", - "models/props_phx/construct/metal_plate2x2.mdl", - "models/props_phx/construct/metal_plate2x4.mdl", - "models/props_phx/construct/metal_plate4x4.mdl", - "models/props_phx/construct/metal_wire1x1.mdl", - "models/props_phx/construct/metal_wire1x1x1.mdl", - "models/props_phx/construct/metal_wire1x1x2.mdl", - "models/props_phx/construct/metal_wire1x1x2b.mdl", - "models/props_phx/construct/metal_wire1x2.mdl", - "models/props_phx/construct/metal_wire1x2b.mdl", - "models/props_phx/construct/metal_wire1x2x2b.mdl", - "models/props_phx/construct/metal_wire2x2.mdl", - "models/props_phx/construct/metal_wire2x2b.mdl", - "models/props_phx/construct/metal_wire2x2x2b.mdl" -} - -GMS.SleepingFurniture = { - "models/props_interiors/Furniture_Couch01a.mdl", - "models/props_c17/FurnitureCouch002a.mdl", - "models/props_c17/FurnitureCouch001a.mdl", - "models/props_c17/FurnitureBed001a.mdl", - "models/props_wasteland/prison_bedframe001b.mdl", - "models/props_trainstation/traincar_seats001.mdl" -} -GMS_SpawnLists[ "Mixed - Sleeping Furniture" ] = GMS.SleepingFurniture - -GMS.TreeModels = { - "models/props_foliage/oak_tree01.mdl", - "models/props_foliage/tree_deciduous_01a-lod.mdl", - "models/props_foliage/tree_deciduous_01a.mdl", - "models/props_foliage/tree_deciduous_02a.mdl", - "models/props_foliage/tree_deciduous_03a.mdl", - "models/props_foliage/tree_deciduous_03b.mdl", - "models/props_foliage/tree_poplar_01.mdl", - - "models/gm_forest/tree_oak1.mdl", -- These are in the content of the gamemode - "models/gm_forest/tree_orientalspruce1.mdl" -} - -// These models cannot be dynamically spawned. Because if someone doesn't have them. -GMS.AdditionalTreeModels = { - "models/props_foliage/tree_cliff_01a.mdl", -- Half-Life 2, We don't want these to be plantable, they are weird - "models/props_foliage/tree_cliff_02a.mdl", - - "models/props_foliage/tree_pine04.mdl", -- Episode 2 - "models/props_foliage/tree_pine05.mdl", - "models/props_foliage/tree_pine06.mdl", - "models/props_foliage/tree_dead01.mdl", - "models/props_foliage/tree_dead02.mdl", - "models/props_foliage/tree_dead03.mdl", - "models/props_foliage/tree_dead04.mdl", - "models/props_foliage/tree_dry01.mdl", - "models/props_foliage/tree_dry02.mdl", - "models/props_foliage/tree_pine_large.mdl", - - "models/props_foliage/tree_pine_01.mdl", -- Episode 1 - "models/props_foliage/tree_pine_02.mdl", - "models/props_foliage/tree_pine_03.mdl", - - "models/props/de_inferno/tree_small.mdl", -- CSS - "models/props/de_inferno/tree_large.mdl", - "models/props/cs_militia/tree_large_militia.mdl", - - "models/jtwoods/woods_spruce.mdl", -- Models from gms_paradise_islands_v1 / gm_forest - "models/gm_forest/trunk_a.mdl", - "models/gm_forest/tree_commonlinden_1.mdl", - "models/gm_forest/tree_alder.mdl", - "models/gm_forest/tree_birch1.mdl", - "models/gm_forest/tree_b.mdl", - "models/gm_forest/tree_g.mdl" -} - -GMS.EdibleModels = { - "models/props/cs_italy/orange.mdl", - "models/props_junk/watermelon01.mdl", - "models/props/cs_italy/bananna_bunch.mdl" -} - -GMS.RockModels = { - "models/props_wasteland/rockgranite02a.mdl", - "models/props_wasteland/rockgranite02b.mdl", - "models/props_wasteland/rockgranite02c.mdl", - "models/props_wasteland/rockgranite04b.mdl", - "models/props_wasteland/rockcliff_cluster01b.mdl", - "models/props_wasteland/rockcliff_cluster02a.mdl", - "models/props_wasteland/rockcliff_cluster02b.mdl", - "models/props_wasteland/rockcliff_cluster02c.mdl", - "models/props_wasteland/rockcliff_cluster03a.mdl", - "models/props_wasteland/rockcliff_cluster03b.mdl", - "models/props_wasteland/rockcliff_cluster03c.mdl", - "models/props_wasteland/rockcliff01b.mdl", - "models/props_wasteland/rockcliff01c.mdl", - "models/props_wasteland/rockcliff01e.mdl", - "models/props_wasteland/rockcliff01f.mdl", - "models/props_wasteland/rockcliff01g.mdl", - "models/props_wasteland/rockcliff01J.mdl", - "models/props_wasteland/rockcliff01k.mdl", - "models/props_wasteland/rockcliff05a.mdl", - "models/props_wasteland/rockcliff05b.mdl", - "models/props_wasteland/rockcliff05e.mdl", - "models/props_wasteland/rockcliff05f.mdl", - "models/props_wasteland/rockcliff06d.mdl", - "models/props_wasteland/rockcliff06i.mdl", - "models/props_wasteland/rockcliff07b.mdl" -} - -GMS.AdditionalRockModels = { - "models/props_wasteland/rockgranite01a.mdl", -- Half-Life 2 - "models/props_wasteland/rockgranite01b.mdl", - "models/props_wasteland/rockgranite01c.mdl", - "models/props_wasteland/rockgranite03a.mdl", - "models/props_wasteland/rockgranite03b.mdl", - "models/props_wasteland/rockgranite03c.mdl", - "models/props_wasteland/rockgranite04a.mdl", - "models/props_wasteland/rockgranite04c.mdl", - "models/props_canal/rock_riverbed01a.mdl", - "models/props_canal/rock_riverbed01b.mdl", - "models/props_canal/rock_riverbed01c.mdl", - "models/props_canal/rock_riverbed01d.mdl", - "models/props_canal/rock_riverbed02a.mdl", - "models/props_canal/rock_riverbed02b.mdl", - "models/props_canal/rock_riverbed02c.mdl", - "models/props_lab/bigrock.mdl", - - "models/props_mining/caverocks_cluster01.mdl", -- Episode 2 - "models/props_mining/caverocks_cluster02.mdl", - "models/Cliffs/rockcluster01.mdl", - "models/Cliffs/rockcluster02.mdl", - "models/Cliffs/rocks_large01.mdl", - "models/Cliffs/rocks_large01_veg.mdl", - "models/Cliffs/rocks_large02.mdl", - "models/Cliffs/rocks_large02_veg.mdl", - "models/cliffs/rocks_large03.mdl", - "models/cliffs/rocks_large03_veg.mdl", - "models/Cliffs/rocks_medium01.mdl", - "models/Cliffs/rocks_medium01_veg.mdl", - "models/Cliffs/rocks_xlarge01.mdl", - "models/Cliffs/rocks_xlarge01_veg.mdl", - "models/Cliffs/rocks_xlarge02.mdl", - "models/Cliffs/rocks_xlarge02_veg.mdl", - "models/Cliffs/rocks_xlarge03.mdl", - "models/Cliffs/rocks_xlarge03_veg.mdl", - - "models/props/de_inferno/de_inferno_boulder_03.mdl", -- CSS - "models/props_canal/rock_riverbed02b.mdl", - "models/props/cs_militia/boulder01.mdl", - "models/props/cs_militia/militiarock01.mdl", - "models/props/cs_militia/militiarock02.mdl", - "models/props/cs_militia/militiarock03.mdl", - "models/props/cs_militia/militiarock05.mdl", - "models/props_wasteland/rockcliff07e.mdl", - "models/props_wasteland/rockcliff_cluster01a.mdl" -} - -GMS.SmallRockModel = "models/props_junk/rock001a.mdl" - -GMS.MaterialResources = {} -GMS.MaterialResources[ MAT_CONCRETE ] = "Concrete" -GMS.MaterialResources[ MAT_METAL ] = "Iron" -GMS.MaterialResources[ MAT_DIRT ] = "Wood" -GMS.MaterialResources[ MAT_VENT ] = "Copper" -GMS.MaterialResources[ MAT_GRATE ] = "Copper" -GMS.MaterialResources[ MAT_TILE ] = "Stone" -GMS.MaterialResources[ MAT_SLOSH ] = "Wood" -GMS.MaterialResources[ MAT_WOOD ] = "Wood" -GMS.MaterialResources[ MAT_COMPUTER ] = "Copper" -GMS.MaterialResources[ MAT_GLASS ] = "Glass" -GMS.MaterialResources[ MAT_FLESH ] = "Wood" -GMS.MaterialResources[ MAT_BLOODYFLESH ] = "Wood" -GMS.MaterialResources[ MAT_CLIP ] = "Wood" -GMS.MaterialResources[ MAT_ANTLION ] = "Wood" -GMS.MaterialResources[ MAT_ALIENFLESH ] = "Wood" -GMS.MaterialResources[ MAT_FOLIAGE ] = "Wood" -GMS.MaterialResources[ MAT_SAND ] = "Sand" -GMS.MaterialResources[ MAT_PLASTIC ] = "Plastic" - -GMS.PickupProhibitedClasses = { - "gms_seed" -} - -GMS.SavedClasses = { - "prop_physics", - "prop_physics_override", - "prop_physics_multiplayer", - "prop_dynamic", - "gms_stoneworkbench", - "gms_copperworkbench", - "gms_ironworkbench", - "gms_techworkbench", - "gms_silverworkbench", - "gms_goldworkbench", - "gms_steelworkbench", - "gms_platinumworkbench", - "gms_stove", - "gms_buildsite", - "gms_fridge", - "gms_resourcedrop", - "gms_resourcepack", - "gms_stonefurnace", - "gms_copperfurnace", - "gms_ironfurnace", - "gms_techfurnace", - "gms_silverfurnace", - "gms_goldfurnace", - "gms_steelfurnace", - "gms_platinumfurnace", - "gms_antlionbarrow", - "gms_loot", - "gms_factory", - "gms_gunchunks", - "gms_pistolgunlab", - "gms_smggunlab", - "gms_hightechgunlab", - "gms_transmutator", - "gms_advancedtransmutator", - "gms_seed", - "gms_grindingstone", - "gms_waterfountain", - "gms_clock_big", - "gms_renbuyshop", - "gms_rensellshop", - "gms_obelisk", - "gms_mithrilfactory", - "gms_mithrilworkbench", - "gms_runealtar", - "gms_runicinfuser" -} - -GMS.StructureEntities = { - "gms_stoneworkbench", - "gms_stonefurnace", - "gms_copperworkbench", - "gms_copperfurnace", - "gms_ironworkbench", - "gms_ironfurnace", - "gms_techworkbench", - "gms_techfurnace", - "gms_silverworkbench", - "gms_silverfurnace", - "gms_goldworkbench", - "gms_goldfurnace", - "gms_steelworkbench", - "gms_steelfurnace", - "gms_platinumworkbench", - "gms_platinumfurnace", - "gms_pistolgunlab", - "gms_smggunlab", - "gms_hightechgunlab", - "gms_transmutator", - "gms_advancedtransmutator", - "gms_gunchunks", - "gms_stove", - "gms_fridge", - "gms_factory", - "gms_grindingstone", - "gms_waterfountain", - "gms_resourcepack", - "gms_buildsite", - "gms_renbuyshop", - "gms_rensellshop", - "gms_obelisk", - "gms_mithrilfactory", - "gms_mithrilworkbench", - "gms_runealtar", - "gms_runicinfuser" -} - -GMS.ProhibitedStools = { - "hydraulic", - "motor", - "muscle", - "nail", - "pulley", - "slider", - "balloon", - "rope", // We use gms_rope - "button", - "duplicator", - "dynamite", - "emitter", - "hoverball", - "ignite", - "keepupright", - "magnetise", - //"nocollide", - "physprop", - "spawner", - "thruster", - "turret", - "wheel", - "eyeposer", - "faceposer", - "finger", - "inflator", - "statue", - "trails", - "camera", - "paint", - "rtcamera", - "rb655_lightsaber" -} - -GMS.AllWeapons = { - "gms_stonepickaxe", - "gms_stonehatchet", - "gms_copperpickaxe", - "gms_wrench", - "gms_copperhatchet", - "gms_pickaxeofdjarex", - "gms_mithrilpickaxe", - "gms_chisel", - "gms_runeapickaxe", - "gms_runeepickaxe", - "gms_runefpickaxe", - "gms_runewpickaxe", - "gms_ironpickaxe", - "gms_ironhatchet", - "gms_techpickaxe", - "gms_techhatchet", - "gms_silverpickaxe", - "gms_silverhatchet", - "gms_goldpickaxe", - "gms_goldhatchet", - "gms_steelpickaxe", - "gms_steelhatchet", - "gms_platinumpickaxe", - "gms_platinumhatchet", - "gms_woodenfishingrod", - "gms_advancedfishingrod", - "gms_fryingpan", - "gms_shovel", - "gms_strainer", - "gms_sickle", - "gms_woodenspoon", - "gmod_tool", - "weapon_crowbar", - "weapon_stunstick", - "weapon_pistol", - "weapon_smg1", - "gms_bucket", - "gms_inventory" -} - -GMS.NonDropWeapons = { - "gms_fists", - "gmod_tool", - "gmod_camera", - "weapon_physgun", - "weapon_physcannon", - "pill_pigeon", - "gms_bucket", - "gms_inventory", -} - -/* ---------------------------------------------- - Console Variables ------------------------------------------------- */ - -if ( GMSCVars ) then return end -- Auto-Refresh protection - -GMSCVars = {} - -function CreateGMSCVar( name, def, flag ) - if ( SERVER ) then - - table.insert( GMSCVars, "gms_" .. name ) - CreateConVar( "gms_" .. name, def, flag ) - - cvars.AddChangeCallback( "gms_" .. name, function( cvar, old, new ) - - if ( math.floor( old ) == math.floor( new ) ) then return end - for id, pl in pairs( player.GetAll() ) do pl:ConCommand( "gms_" .. name .. " " .. math.floor( new ) ) end - - end ) - - else - - CreateConVar( "gms_" .. name, def ) - cvars.AddChangeCallback( "gms_" .. name, function( cvar, old, new ) - - if ( math.floor( old ) == math.floor( new ) ) then return end - timer.Destroy( "gms_update" .. name ) - timer.Create( "gms_update" .. name, 2, 1, function() RunConsoleCommand( "gms_update", name, math.floor( new ) ) end ) - - end ) - - end -end - -CreateGMSCVar( "FreeBuild", "0" ) -CreateGMSCVar( "FreeBuildSA", "0" ) -CreateGMSCVar( "AllTools", "0", FCVAR_ARCHIVE ) -CreateGMSCVar( "AutoSave", "1", FCVAR_ARCHIVE ) -CreateGMSCVar( "AutoSaveTime", "3", FCVAR_ARCHIVE ) -CreateGMSCVar( "ReproduceTrees", "3" ) -CreateGMSCVar( "MaxReproducedTrees", "50", FCVAR_ARCHIVE ) -CreateGMSCVar( "SpreadFire", "0" ) -CreateGMSCVar( "FadeRocks", "0" ) -//CreateGMSCVar( "CostsScale", "1" ) -//CreateGMSCVar( "alerts", "1" ) -CreateGMSCVar( "campfire", "1" ) -CreateGMSCVar( "PlantLimit", "25", FCVAR_ARCHIVE ) - -CreateGMSCVar( "PVPDamage", "0", FCVAR_ARCHIVE ) -CreateGMSCVar( "TeamColors", "1", FCVAR_ARCHIVE ) - --- Daynight -CreateGMSCVar( "daynight", "1" ) -CreateGMSCVar( "night_cleanup", "1" ) -CreateGMSCVar( "zombies", "1" ) - -if ( CLIENT ) then return end - -concommand.Add( "gms_update", function( ply, cmd, args ) - - if ( !ply:IsAdmin() ) then return end - - local cmd = args[ 1 ] - local val = args[ 2 ] - - if ( math.floor( GetConVarNumber( "gms_" .. cmd ) ) == math.floor( val ) ) then return end - - RunConsoleCommand( "gms_" .. cmd, math.floor( val ) ) - -end ) - -hook.Add( "PlayerInitialSpawn", "gms.sync_cvars", function( ply ) - for id, cvar in pairs( GMSCVars ) do ply:ConCommand( cvar .. " " .. math.floor( GetConVarNumber( cvar ) ) ) end -end ) diff --git a/ftp_gmstranded/gamemode/spp/cl_init.lua b/ftp_gmstranded/gamemode/spp/cl_init.lua deleted file mode 100644 index ca14f49..0000000 --- a/ftp_gmstranded/gamemode/spp/cl_init.lua +++ /dev/null @@ -1,101 +0,0 @@ - -function SPropProtection.PlayerIsPropOwner( ply, ent ) - if ( !IsValid( ent ) or ent:IsPlayer() ) then return false end - - if ( ent:GetNWString( "Owner" ) == ply:Nick() && ent:GetNWInt( "OwnerID" ) == ply:EntIndex() ) then - return true - end - - local HisTribe = GAMEMODE.FindTribeByID( ent:GetNWString( "TribeID" ) ) - - if ( !HisTribe ) then return false end - - if ( ent:GetNWString( "TribeID" ) == ply:Team() && HisTribe.pass == true ) then return true end - if ( ent:GetNWString( "TribeID" ) == ply:Team() && HisTribe.pass == true ) then return true end - - return false -end - -function SPropProtection.PlayerCanTouch( ply, ent ) - if ( GetConVarNumber( "spp_enabled" ) == 0 or ent:GetClass() == "worldspawn" ) then return true end - if ( ent:IsPlayer() or ent:IsNPC() ) then return false end - - /* Stranded Plants & Respacks*/ - local isResource = ent:GetClass() == "gms_resourcepack" or ent:GetClass() == "gms_resourcedrop" or ent:GetClass() == "gms_fridge" - local isPlant = ent:IsBerryBushModel() or ent:IsGrainModel() or ent:IsFoodModel() - if ( ( ent:GetNWString( "Owner" ) == "World" or GetConVarNumber( "spp_use" ) <= 0 ) && ( isResource or isPlant ) ) then - return true - end - - if ( ply:IsAdmin() && GetConVarNumber( "spp_admin" ) == 1 && ent:GetNWString( "Owner" ) != "World" ) then return true end - if ( ply:IsAdmin() && GetConVarNumber( "spp_admin_wp" ) == 1 && ent:GetNWString( "Owner" ) == "World" ) then return true end - - if ( SPropProtection.PlayerIsPropOwner( ply, ent ) ) then return true end - - -- Find the player - if ( !SPropProtection[ ply:SteamID() ] ) then return false end - for id, p in pairs( player.GetAll() ) do - if ( p:EntIndex() == ent:GetNWString( "OwnerID" ) ) then - if ( table.HasValue( SPropProtection[ ply:SteamID() ], p:SteamID() ) ) then return true end - end - end - - return false -end - -local UndoneStuff = {} -hook.Add( "HUDPaint", "spp.hudpaint", function() - if ( !IsValid( LocalPlayer() ) ) then return end - if ( #UndoneStuff > 0 ) then for id, s in pairs( UndoneStuff ) do table.insert( SPropProtection[ LocalPlayer():SteamID() ], s ) end end - local tr = LocalPlayer():GetEyeTrace() - - if ( !tr.HitNonWorld ) then return end - local ent = tr.Entity - - if ( !IsValid( ent ) || ent:IsPlayer() || ent:IsNPC() || LocalPlayer():InVehicle() ) then return end - - local OwnerName = ent:GetNWString( "Owner", "None" ) - local OwnerObj = ent:GetNWEntity( "OwnerObj" ) - if ( IsValid( OwnerObj ) ) then OwnerName = OwnerObj:Name() end - - local TribeOwner = false - local PropOwner = "Owner: " .. OwnerName - local PropOwnerTribe = "Owner tribe: " - - local HisTribe = GAMEMODE.FindTribeByID( ent:GetNWInt( "TribeID", 1 ) ) - if ( HisTribe && HisTribe.pass == true ) then TribeOwner = true PropOwnerTribe = PropOwnerTribe .. HisTribe.name end - - surface.SetFont( "DefaultBold" ) - local tw = surface.GetTextSize( PropOwner ) - local tw2 = surface.GetTextSize( PropOwnerTribe ) - - local w = math.max( ScrW() / 5, tw + 20, tw2 + 20 ) - local h = ScrH() / 24 - local x = ScrW() / 2 - w / 2 - local y = ScrH() - ScrH() / 16 - - if ( TribeOwner ) then h = ScrH() / 18 end - - surface.SetDrawColor( StrandedBackgroundColor ) - surface.DrawRect( x, y, w, h ) - - surface.SetDrawColor( StrandedBorderColor ) - surface.DrawOutlinedRect( x, y, w, h ) - - if ( TribeOwner ) then - draw.SimpleTextOutlined( PropOwner, "DefaultBold", x + w / 2, y + h / 4, StrandedTextColor, 1, 1, 0.5, StrandedTextShadowColor ) - draw.SimpleTextOutlined( PropOwnerTribe, "DefaultBold", x + w / 2, y + h / 1.5, StrandedTextColor, 1, 1, 0.5, StrandedTextShadowColor ) - else - draw.SimpleTextOutlined( PropOwner, "DefaultBold", x + w / 2, y + h / 2, StrandedTextColor, 1, 1, 0.5, StrandedTextShadowColor ) - end -end ) - -usermessage.Hook( "spp_addbuddy", function( um ) - if ( !IsValid( LocalPlayer() ) || !LocalPlayer().SteamID ) then table.insert( UndoneStuff, um:ReadString() ) return end - table.insert( SPropProtection[ LocalPlayer():SteamID() ], um:ReadString() ) -end ) - -usermessage.Hook( "spp_clearbuddy", function( um ) - if ( !IsValid( LocalPlayer() ) || !LocalPlayer().SteamID ) then UndoneStuff = {} return end - SPropProtection[ LocalPlayer():SteamID() ] = {} -end ) diff --git a/ftp_gmstranded/gamemode/spp/sh_cppi.lua b/ftp_gmstranded/gamemode/spp/sh_cppi.lua deleted file mode 100644 index 6bf923e..0000000 --- a/ftp_gmstranded/gamemode/spp/sh_cppi.lua +++ /dev/null @@ -1,88 +0,0 @@ - -function CPPI:GetName() - return "Simple Prop Protection" -end - -function CPPI:GetVersion() - return SPropProtection.Version -end - -function CPPI:GetInterfaceVersion() - return 1.1 -end - -function CPPI:GetNameFromUID( uid ) - return CPPI_NOTIMPLEMENTED -end - -local Player = FindMetaTable( "Player" ) -if ( !Player ) then print( "EXTREME ERROR 1" ) return end - -function Player:CPPIGetFriends() - if ( SERVER ) then - local Table = {} - for k, v in pairs( player.GetAll() ) do - if ( table.HasValue( SPropProtection[ self:SteamID() ], v:SteamID() ) ) then table.insert( Table, v ) end - end - return Table - else - return CPPI_NOTIMPLEMENTED - end -end - -local Entity = FindMetaTable( "Entity" ) -if ( !Entity ) then print( "EXTREME ERROR 2" ) return end - -function Entity:CPPIGetOwner() - local Player = self:GetNetworkedEntity( "OwnerObj", false ) - if ( SERVER ) then Player = SPropProtection[ "Props" ][ self:EntIndex() ][ 3 ] end - if ( !IsValid( Player ) ) then return nil, CPPI_NOTIMPLEMENTED end - local UID = CPPI_NOTIMPLEMENTED - if ( SERVER ) then UID = Player:UniqueID() end - return Player, UID -end - -if ( SERVER ) then - function Entity:CPPISetOwner( ply ) - if ( !IsValid( ply ) or !ply:IsPlayer() ) then return false end - return SPropProtection.PlayerMakePropOwner( ply, self ) - end - - function Entity:CPPISetOwnerUID( uid ) - if ( !uid ) then return false end - local ply = player.GetByUniqueID( tostring( uid ) ) - if ( !ply ) then return false end - return SPropProtection.PlayerMakePropOwner( ply, self ) - end - - function Entity:CPPICanTool( ply, toolmode ) - if ( !IsValid( ply ) or !ply:IsPlayer() or !toolmode ) then return false end - return SPropProtection.PlayerCanTouch( ply, self ) - end - - function Entity:CPPICanPhysgun( ply ) - if ( !IsValid( ply ) or !ply:IsPlayer() ) then return false end - if ( SPropProtection.PhysGravGunPickup( ply, self ) == false ) then return false end - if ( self:GetClass() == "gms_gravestone" ) then return false end - return true - end - - function Entity:CPPICanPickup( ply ) - if ( !IsValid( ply ) or !ply:IsPlayer() ) then return false end - if ( SPropProtection.PhysGravGunPickup( ply, self ) == false ) then return false end - return true - end - - function Entity:CPPICanPunt(ply) - if ( !IsValid( ply ) or !ply:IsPlayer() ) then return false end - if ( SPropProtection.PhysGravGunPickup( ply, self ) == false ) then return false end - return true - end -end - -hook.Add( "Initialize", "CPPIInitGM", function() - function GAMEMODE:CPPIAssignOwnership( ply, ent ) - end - function GAMEMODE:CPPIFriendsChanged( ply, ent ) - end -end ) diff --git a/ftp_gmstranded/gamemode/spp/sh_spp.lua b/ftp_gmstranded/gamemode/spp/sh_spp.lua deleted file mode 100644 index 8421192..0000000 --- a/ftp_gmstranded/gamemode/spp/sh_spp.lua +++ /dev/null @@ -1,97 +0,0 @@ - -AddCSLuaFile( "sh_cppi.lua" ) -AddCSLuaFile( "sh_spp.lua" ) -AddCSLuaFile( "cl_init.lua" ) - -SPropProtection = SPropProtection or {} -SPropProtection.Version = 2 - -CPPI = CPPI or {} -CPPI_NOTIMPLEMENTED = 26 -CPPI_DEFER = 16 - -include( "sh_cppi.lua" ) - -if ( SERVER ) then - include( "sv_init.lua" ) -else - include( "cl_init.lua" ) -end - -/* ---------------------------------------------- - Keep these shared, so client can predict ------------------------------------------------- */ - -function SPropProtection.PhysGravGunPickup( ply, ent ) - if ( !IsValid( ent ) && ent:GetClass() != "worldspawn") then return end - if ( ent:GetClass() == "gms_gravestone" and !ply:IsAdmin() ) then return end - if ( ent:GetNWString( "Owner" ) == "World" && ply:IsAdmin() && GetConVarNumber( "spp_admin_wp" ) == 1 ) then return true end - if ( SPropProtection.PlayerCanTouch( ply, ent ) ) then return true end -end -/*hook.Add( "GravGunPunt", "SPropProtection.GravGunPunt", PhysGravGunPickup ) -hook.Add( "GravGunPickupAllowed", "SPropProtection.GravGunPickupAllowed", PhysGravGunPickup ) -hook.Add( "PhysgunPickup", "SPropProtection.PhysgunPickup", PhysGravGunPickup ) -hook.Add( "CanTool", "SPropProtection.CanTool", PhysGravGunPickup )*/ - -/* ---------------------------------------------- - SPP Console Variables ------------------------------------------------- */ - -if ( SPPCVars ) then return end -- Auto-Refresh protection - -SPPCVars = {} - -function CreateSPPCVar( name, def ) - if ( SERVER ) then - - table.insert( SPPCVars, "spp_" .. name ) - CreateConVar( "spp_" .. name, def, FCVAR_ARCHIVE ) - - cvars.AddChangeCallback( "spp_" .. name, function( cvar, old, new ) - - if ( math.floor( old ) == math.floor( new ) ) then return end - for id, pl in pairs( player.GetAll() ) do pl:ConCommand( "spp_" .. name .. " " .. math.floor( new ) ) end - - end ) - - else - - CreateConVar( "spp_" .. name, def ) - cvars.AddChangeCallback( "spp_" .. name, function( cvar, old, new ) - - if ( math.floor( old ) == math.floor( new ) ) then return end - timer.Destroy( "spp_update" .. name ) - timer.Create("spp_update" .. name, 2, 1, function() RunConsoleCommand( "spp_update", name, math.floor( new ) ) end ) - - end ) - - end -end - -CreateSPPCVar( "enabled", "1" ) -CreateSPPCVar( "admin", "0" ) -CreateSPPCVar( "admin_wp", "0" ) -CreateSPPCVar( "use", "1" ) -CreateSPPCVar( "entdmg", "1" ) -CreateSPPCVar( "del_disconnected", "1" ) -CreateSPPCVar( "del_adminprops", "1" ) -CreateSPPCVar( "del_delay", "120" ) - -if ( CLIENT ) then return end - -concommand.Add( "spp_update", function( ply, cmd, args ) - - if ( !ply:IsAdmin() ) then return end - - local cmd = args[ 1 ] - local val = args[ 2 ] - - if ( math.floor( GetConVarNumber( "spp_" .. cmd ) ) == math.floor( val ) ) then return end - - RunConsoleCommand( "spp_" .. cmd, math.floor( val ) ) - -end ) - -hook.Add( "PlayerInitialSpawn", "spp.sync_cvars", function( ply ) - for id, cvar in pairs( SPPCVars ) do ply:ConCommand( cvar .. " " .. math.floor( GetConVarNumber( cvar ) ) ) end -end ) diff --git a/ftp_gmstranded/gamemode/spp/sv_init.lua b/ftp_gmstranded/gamemode/spp/sv_init.lua deleted file mode 100644 index a4df311..0000000 --- a/ftp_gmstranded/gamemode/spp/sv_init.lua +++ /dev/null @@ -1,369 +0,0 @@ - -SPropProtection[ "Props" ] = SPropProtection[ "Props" ] or {} - -if ( cleanup ) then - local Clean = cleanup.Add - function cleanup.Add( ply, Type, ent ) - if ( IsValid( ent ) && ply:IsPlayer() ) then SPropProtection.PlayerMakePropOwner( ply, ent ) end - Clean( ply, Type, ent ) - end -end - -local Meta = FindMetaTable("Player") -if ( Meta.AddCount ) then - local Backup = Meta.AddCount - function Meta:AddCount( Type, ent ) - SPropProtection.PlayerMakePropOwner( self, ent ) - Backup( self, Type, ent ) - end -end - -function SPropProtection.NofityAll( Text ) - for k, ply in pairs( player.GetAll() ) do - SPropProtection.Nofity( ply, Text ) - end -end - -function SPropProtection.Nofity( ply, Text ) - ply:SendLua("GAMEMODE:AddNotify(\"" .. Text .. "\", NOTIFY_GENERIC, 5); surface.PlaySound(\"ambient/water/drip" .. math.random(1, 4) .. ".wav\")") - ply:PrintMessage( HUD_PRINTCONSOLE, Text ) -end - -function SPropProtection.PlayerMakePropOwner( ply, ent ) - if ( !IsValid( ent ) or ent:IsPlayer() ) then return end - - if ( ply && type( ply ) == "table" ) then - SPropProtection[ "Props" ][ ent:EntIndex() ] = { ply.SteamID, ent } - ent:SetNWString( "Owner", ply.Nick ) - ent:SetNWInt( "OwnerID", ply.EntIndex ) - ent:SetNWInt( "TribeID", ply.Team ) - return true - end - - if ( !IsValid( ply ) or !ply:IsPlayer() ) then return end - - SPropProtection[ "Props" ][ ent:EntIndex() ] = { ply:SteamID(), ent } - ent:SetNWString( "Owner", ply:Nick() ) - ent:SetNWInt( "OwnerID", ply:EntIndex() ) - ent:SetNWInt( "TribeID", ply:Team() ) - gamemode.Call( "CPPIAssignOwnership", ply, ent ) - return true -end - -function SPropProtection.PlayerIsPropOwner( ply, ent ) - if ( !IsValid( ent ) or ent:IsPlayer() ) then return false end - if ( !SPropProtection[ "Props" ][ ent:EntIndex() ] ) then return false end - - if ( SPropProtection[ "Props" ][ ent:EntIndex() ][ 1 ] == ply:SteamID() && ent:GetNWString( "Owner" ) == ply:Nick() && ent:GetNWInt( "OwnerID" ) == ply:EntIndex() ) then - return true - else - return false - end -end - -function SPropProtection.IsBuddy( ply, ent ) - if ( SPropProtection.PlayerIsPropOwner( ply, ent ) ) then return true end - if ( ply:IsAdmin() && GetConVarNumber( "spp_admin" ) == 1 && ent:GetNWString( "Owner" ) != "World" ) then return true end - if ( ply:IsAdmin() && GetConVarNumber( "spp_admin_wp" ) == 1 && ent:GetNWString( "Owner" ) == "World" ) then return true end - if ( ply:Team() == ent:GetNWInt( "TribeID", 1 ) && GAMEMODE.FindTribeByID( ply:Team() ).password != false ) then return true end - if ( ent:IsPlayer() or ent:IsNPC() ) then return false end - if ( ent:GetNWString( "Owner" ) == "World" ) then return false end - - for k, v in pairs( player.GetAll() ) do - if ( IsValid( v ) && v != ply ) then - if ( !SPropProtection[ "Props" ][ ent:EntIndex() ] ) then continue end - if ( SPropProtection[ "Props" ][ ent:EntIndex() ][ 1 ] == v:SteamID() ) then - if ( !SPropProtection[ v:SteamID() ] ) then return false end - - if ( table.HasValue( SPropProtection[ v:SteamID() ], ply:SteamID() ) ) then - return true - else - return false - end - end - end - end -end - -function SPropProtection.PlayerCanTouch( ply, ent ) - if ( GetConVarNumber( "spp_enabled" ) == 0 or ent:GetClass() == "worldspawn" ) then return true end - if ( ent:IsPlayer() or ent:IsNPC() ) then return false end - - if ( ent:GetNWString( "Owner" ) == "Everyone" && !ent:IsPlayer() ) then - return true - end - - /* Stranded Plants & Respacks*/ - local isResource = ent:GetClass() == "gms_resourcepack" or ent:GetClass() == "gms_resourcedrop" or ent:GetClass() == "gms_fridge" - local isPlant = ent:IsBerryBushModel() or ent:IsGrainModel() or ent:IsFoodModel() - if ( ( ent:GetNWString( "Owner" ) == "World" or GetConVarNumber( "spp_use" ) <= 0 ) && ( isResource or isPlant ) ) then - return true - end - - if ( ( !ent:GetNWString( "Owner" ) or ent:GetNWString( "Owner" ) == "" ) && !ent:IsPlayer() ) then - SPropProtection.PlayerMakePropOwner( ply, ent ) - SPropProtection.Nofity( ply, "You now own this prop" ) - return true - end - - if ( ply:IsAdmin() && GetConVarNumber( "spp_admin" ) == 1 && ent:GetNWString( "Owner" ) != "World" ) then return true end - if ( ply:IsAdmin() && GetConVarNumber( "spp_admin_wp" ) == 1 && ent:GetNWString( "Owner" ) == "World" ) then return true end - if ( SPropProtection.IsBuddy( ply, ent ) ) then return true end - if ( SPropProtection[ "Props" ][ ent:EntIndex() ] != nil && SPropProtection[ "Props" ][ ent:EntIndex() ][ 1 ] == ply:SteamID() ) then - return true - end - - return false -end - -function SPropProtection.DRemove( SteamID, PlayerName ) - for k, v in pairs( SPropProtection[ "Props" ] ) do - if ( v[ 1 ] == SteamID and IsValid( v[ 2 ] ) ) then - v[ 2 ]:Remove() - SPropProtection[ "Props" ][ k ] = nil - end - end - SPropProtection.NofityAll( tostring( PlayerName ) .. "'s props have been cleaned up" ) -end - -/* Tribe PP */ - -SPropProtection.EmptifiedTribes = SPropProtection.EmptifiedTribes or {} -function SPropProtection.RemoveTribeProps( TribeID ) - for k, v in pairs( SPropProtection[ "Props" ] ) do - if ( IsValid(v[2]) and tonumber(v[2]:GetNWInt( "TribeID" ) ) == TribeID ) then - v[2]:Remove() - SPropProtection["Props"][k] = nil - end - end - SPropProtection.NofityAll( "Props of " .. GAMEMODE.FindTribeByID( TribeID ).name .. " have been cleaned up" ) - SPropProtection.EmptifiedTribes[ TribeID ] = true -end - -function SPropProtection.CheckForEmptyTribes() - for id, t in pairs( GAMEMODE.Tribes ) do - if ( team.NumPlayers( id ) == 0 && t.password != false && !timer.Exists( "SPropProtection.RemoveTribeProps: " .. id ) && !SPropProtection.EmptifiedTribes[ id ] ) then - timer.Create( "SPropProtection.RemoveTribeProps: " .. id, GetConVarNumber( "spp_del_delay" ), 1, function() SPropProtection.RemoveTribeProps( id ) end ) - elseif ( team.NumPlayers( id ) > 0 ) then - SPropProtection.EmptifiedTribes[ id ] = false - timer.Remove( "SPropProtection.RemoveTribeProps: " .. id ) - end - end -end - -function SPropProtection.TribePP( ply ) - for k, v in pairs( SPropProtection[ "Props" ] ) do - if ( v[ 1 ] == ply:SteamID() && IsValid( v[ 2 ] ) ) then - v[ 2 ]:SetNWInt( "TribeID", ply:Team() ) - - timer.Remove( "SPropProtection.RemoveTribeProps: " .. ply:Team() ) - SPropProtection.CheckForEmptyTribes() - end - end -end - -/* Hooks */ - -hook.Add( "PlayerInitialSpawn", "SPropProtection.PlayerInitialSpawn", function( ply ) - ply:SetNWString( "SPPSteamID", string.gsub( ply:SteamID(), ":", "_" ) ) - SPropProtection[ ply:SteamID() ] = {} - SPropProtection.LoadBuddies( ply ) - SPropProtection.TribePP( ply ) - - timer.Remove( "SPropProtection.DRemove: " .. ply:SteamID() ) -end ) - -hook.Add( "PlayerDisconnected", "SPropProtection.Disconnect", function( ply ) - if ( GetConVarNumber( "spp_del_disconnected" ) == 0 ) then return end - if ( ply:IsAdmin() && GetConVarNumber( "spp_del_adminprops" ) <= 0 ) then return end - if ( GAMEMODE.FindTribeByID( ply:Team() ).password == false ) then - local nick = ply:Nick() - local id = ply:SteamID() - timer.Create( "SPropProtection.DRemove: " .. ply:SteamID(), GetConVarNumber( "spp_del_delay" ), 1, function() SPropProtection.DRemove( id, nick ) end ) - end - SPropProtection.CheckForEmptyTribes() -end ) - -hook.Add( "EntityTakeDamage", "SPropProtection.EntityTakeDamage", function( ent, inflictor, attacker, amount, dmginfo ) - if ( !IsValid( ent ) || !IsValid( attacker ) ) then return end - if ( string.find( ent:GetClass(), "npc_" ) ) then return end - if ( GetConVarNumber( "spp_entdmg" ) == 0 ) then return end - if ( ent:IsPlayer() or !attacker:IsPlayer() ) then return end - if ( !SPropProtection.PlayerCanTouch( attacker, ent ) ) then - local total = ent:Health() + amount - if ( ent:GetMaxHealth() > total ) then ent:SetMaxHealth( total ) else ent:SetHealth( total ) end - end -end ) - -hook.Add( "PlayerUse", "SPropProtection.PlayerUse", function(ply, ent) - if ( ent:IsValid() && GetConVarNumber( "spp_use" ) >= 1 ) then - return SPropProtection.PlayerCanTouch( ply, ent ) - end -end ) - -hook.Add( "OnPhysgunReload", "SPropProtection.OnPhysgunReload", function( weapon, ply ) - local tr = ply:GetEyeTrace() - if ( !tr.HitNonWorld or !IsValid( tr.Entity ) or tr.Entity:IsPlayer() ) then return end - if ( !SPropProtection.PlayerCanTouch( ply, tr.Entity ) ) then return false end -end ) - -hook.Add( "EntityRemoved", "SPropProtection.EntityRemoved", function( ent ) - SPropProtection[ "Props" ][ ent:EntIndex() ] = nil -end ) - -hook.Add( "PlayerSpawnedSENT", "SPropProtection.PlayerSpawnedSENT", function( ply, ent ) - SPropProtection.PlayerMakePropOwner( ply, ent ) -end ) - -hook.Add( "PlayerSpawnedVehicle", "SPropProtection.PlayerSpawnedVehicle", function( ply, ent ) - SPropProtection.PlayerMakePropOwner( ply, ent ) -end ) - -hook.Add( "InitPostEntity", "spp_map_ents", function() - local WorldEnts = 0 - for k, v in pairs( ents.GetAll() ) do - if ( !v:IsPlayer() and !v:GetNWString( "Owner", false ) ) then - v:SetNetworkedString( "Owner", "World" ) - WorldEnts = WorldEnts + 1 - end - end - MsgC( Color( 64, 176, 255 ), "\n[ Simple Prop Protection ] " .. tostring( WorldEnts ) .. " props belong to world\n\n" ) -end ) - -/* Commands */ - -concommand.Add( "spp_cleanup_props_left", function( ply, cmd, args ) - if ( !ply:IsAdmin() ) then return end - for k1, v1 in pairs( SPropProtection[ "Props" ] ) do - local FoundUID = false - for k2, v2 in pairs( player.GetAll() ) do - if( v1[ 1 ] == v2:SteamID() ) then - FoundUID = true - end - end - if ( FoundUID == false and IsValid( v1[ 2 ] ) ) then - v1[ 2 ]:Remove() - SPropProtection[ "Props" ][ k1 ] = nil - end - end - SPropProtection.NofityAll("Disconnected players props have been cleaned up") -end ) - -concommand.Add( "spp_cleanup_props", function( ply, cmd, args ) - if ( !args[1] or args[1] == "" ) then - for k, v in pairs( SPropProtection["Props"] ) do - if (v[1] == ply:SteamID()) then - if (v[2]:IsValid()) then - v[2]:Remove() - SPropProtection["Props"][k] = nil - end - end - end - SPropProtection.Nofity(ply, "Your props have been cleaned up") - elseif ( ply:IsAdmin() ) then - for k, v in pairs(player.GetAll()) do - local NWSteamID = v:GetNWString( "SPPSteamID" ) - if ( args[1] == NWSteamID or args[2] == NWSteamID or string.find( string.Implode( " ", args ), NWSteamID ) != nil) then - for a, b in pairs( SPropProtection[ "Props" ] ) do - if ( b[1] == v:SteamID() && IsValid( b[ 2 ] ) ) then - b[2]:Remove() - SPropProtection[ "Props" ][ a ] = nil - end - end - SPropProtection.NofityAll( v:Nick() .. "'s props have been cleaned up" ) - end - end - end - ply:SetNWInt( "plants", 0 ) -end ) - -/* Buddies */ - -function SPropProtection.SyncBuddies( ply ) - for id, pl in pairs( player.GetAll() ) do - umsg.Start( "spp_clearbuddy", pl ) umsg.End() - if ( table.HasValue( SPropProtection[ ply:SteamID() ], pl:SteamID() ) ) then - umsg.Start( "spp_addbuddy", pl ) - umsg.String( ply:SteamID() ) - umsg.End() - end - end -end - -function SPropProtection.LoadBuddies( ply ) - local PData = ply:GetPData( "SPPBuddies", "" ) - if ( PData == "" ) then return end - for k, v in pairs( string.Explode( ";", PData ) ) do - local v = string.Trim( v ) - if ( v != "" ) then table.insert( SPropProtection[ ply:SteamID() ], v ) end - end - - SPropProtection.SyncBuddies( ply ) -end - -concommand.Add( "spp_apply_buddies", function( ply, cmd, args ) - if ( table.Count( player.GetAll() ) > 1 ) then - local ChangedFriends = false - for k, v in pairs( player.GetAll() ) do - local PlayersSteamID = v:SteamID() - local PData = ply:GetPData( "SPPBuddies", "" ) - if ( tonumber( ply:GetInfo( "spp_buddy_" .. v:GetNWString("SPPSteamID") ) ) == 1 ) then - if ( !table.HasValue( SPropProtection[ ply:SteamID() ], PlayersSteamID ) ) then - ChangedFriends = true - table.insert( SPropProtection[ ply:SteamID() ], PlayersSteamID ) - if ( PData == "" ) then - ply:SetPData( "SPPBuddies", PlayersSteamID .. ";") - else - ply:SetPData( "SPPBuddies", PData .. PlayersSteamID .. ";") - end - end - else - if ( table.HasValue( SPropProtection[ ply:SteamID() ], PlayersSteamID ) ) then - for k2, v2 in pairs( SPropProtection[ply:SteamID() ] ) do - if ( v2 == PlayersSteamID ) then - ChangedFriends = true - table.remove( SPropProtection[ ply:SteamID() ], k2 ) - ply:SetPData( "SPPBuddies", string.gsub( PData, PlayersSteamID .. ";", "" ) ) - end - end - end - end - end - - if ( ChangedFriends ) then - local Table = {} - for k, v in pairs( SPropProtection[ ply:SteamID() ] ) do - for k2, v2 in pairs( player.GetAll() ) do - if ( v == v2:SteamID() ) then - table.insert( Table, v2 ) - end - end - end - gamemode.Call( "CPPIFriendsChanged", ply, Table ) - end - end - - SPropProtection.SyncBuddies( ply ) - SPropProtection.Nofity( ply, "Your buddies have been updated" ) -end ) - -concommand.Add( "spp_clear_buddies", function( ply, cmd, args ) - local PData = ply:GetPData( "SPPBuddies", "" ) - if ( PData != "" ) then - for k, v in pairs( string.Explode( ";", PData ) ) do - local v = string.Trim( v ) - if ( v != "" ) then - ply:ConCommand( "spp_buddy_" .. string.gsub( v, ":", "_" ) .. " 0\n" ) - end - end - ply:SetPData( "SPPBuddies", "" ) - end - - for k, v in pairs( SPropProtection[ ply:SteamID() ] ) do - ply:ConCommand( "spp_buddy_" .. string.gsub( v, ":", "_" ) .. " 0\n" ) - end - SPropProtection[ ply:SteamID() ] = {} - - SPropProtection.SyncBuddies( ply ) - SPropProtection.Nofity( ply, "Your buddies have been cleared" ) -end ) diff --git a/ftp_gmstranded/gamemode/time_weather.lua b/ftp_gmstranded/gamemode/time_weather.lua deleted file mode 100644 index bc34fac..0000000 --- a/ftp_gmstranded/gamemode/time_weather.lua +++ /dev/null @@ -1,185 +0,0 @@ - -NightLight = string.byte( "a" ) -DayLight = string.byte( "m" ) - -NextPattern = NextPattern or DayLight -CurrentPattern = CurrentPattern or DayLight - -RiseTime = 300 -DayTime = 480 -SetTime = 960 -NightTime = 1200 - -StealTime = 0 -Time = Time or RiseTime + 1 - -IsNight = false - -if ( CLIENT ) then - timer.Simple( 5, function() - RunConsoleCommand( "pp_sunbeams", "0" ) - end ) - - hook.Add( "RenderScreenspaceEffects", "RenderSunbeams", function() - if ( !render.SupportsPixelShaders_2_0() ) then return end - local sun = util.GetSunInfo() - - if ( !sun ) then return end - if ( sun.obstruction == 0 ) then return end - - local sunpos = EyePos() + sun.direction * 4096 - local scrpos = sunpos:ToScreen() - - local dot = ( sun.direction:Dot( EyeVector() ) - 0.8 ) * 5 - if ( dot <= 0 ) then return end - - DrawSunbeams( 0.85, 1 * dot * sun.obstruction, 0.25, scrpos.x / ScrW(), scrpos.y / ScrH() ) - end ) - - timer.Create( "DayTime.TimerClient", 1, 0, function() - if ( GetConVarNumber( "gms_daynight" ) <= 0 ) then return end - - Time = Time + 1 - if ( Time > 1440 ) then Time = 0 end - end ) -elseif ( SERVER ) then - - RunConsoleCommand( "sv_skyname", "painted" ) - - local GMS_DayColorTop = Vector( 0.22, 0.51, 1.0 ) - local GMS_DayColorBottom = Vector( 0.92, 0.93, 0.99 ) - local GMS_DayColorDusk = Vector( 1.0, 0.2, 0.0 ) - local GMS_Clouds = "skybox/clouds" - local GMS_Stars = "skybox/starfield" - local GMS_StarFade = 1//0.5 - local GMS_StarScale = 1.75 - local GMS_StarSpeed = 0.03 - theSky = theSky or nil - - hook.Add( "InitPostEntity", "gms_create_skypaint", function() - if ( table.Count( ents.FindByClass( "env_skypaint" ) ) >= 1 ) then theSky = ents.FindByClass( "env_skypaint" )[ 1 ] return end - theSky = ents.Create( "env_skypaint" ) - theSky:Spawn() - end ) - - timer.Create( "DayTime.TimerServer", 1, 0, function() - if ( GetConVarNumber( "gms_daynight" ) <= 0 ) then return end - - Time = Time + 1 - if ( Time > 1440 ) then Time = 0 end - - //Time = CurTime() - math.floor( CurTime() / 1440 ) * 1440 - - for id, sun in pairs( ents.FindByClass( "env_sun" ) or {} ) do - sun:SetKeyValue( "pitch", math.NormalizeAngle( ( Time / 1440 * 360 ) + 90 ) ) - sun:Activate() - end - - local coef = 0 - if ( Time >= NightTime && Time < RiseTime ) then // Night - IsNight = true - coef = 0 - elseif ( Time >= RiseTime && Time < DayTime ) then // Sunrise - IsNight = false - coef = 1 - ( DayTime - Time ) / ( DayTime - RiseTime ) // Calculate progress - elseif ( Time >= DayTime && Time < SetTime ) then // Day - IsNight = false - coef = 1 - elseif ( Time >= SetTime && Time < NightTime ) then // Sunset - IsNight = false - coef = ( NightTime - Time ) / ( NightTime - SetTime ) // Calculate progress - end - - local dusk_coef = coef - if ( dusk_coef > 0.5 ) then - dusk_coef = 1 - dusk_coef - if ( IsValid( theSky ) ) then - if ( theSky:GetStarTexture() != GMS_Clouds ) then - theSky:SetStarTexture( GMS_Clouds ) - theSky:SetStarScale( GMS_StarScale ) - end - end - else - if ( IsValid( theSky ) ) then - if ( theSky:GetStarTexture() != GMS_Stars ) then - theSky:SetStarTexture( GMS_Stars ) - theSky:SetStarScale( 0.5 ) - end - end - end - - if ( IsValid( theSky ) ) then - theSky:SetTopColor( GMS_DayColorTop * coef ) - theSky:SetBottomColor( GMS_DayColorBottom * coef ) - theSky:SetStarFade( GMS_StarFade * ( 0.5 - dusk_coef ) ) - theSky:SetSunSize( 1 ) - - if ( IsNight ) then dusk_coef = 0 end - theSky:SetDuskColor( GMS_DayColorDusk * dusk_coef ) - end - - NextPattern = math.Clamp( NightLight + math.ceil( ( DayLight - NightLight ) * coef ), NightLight, DayLight ) - - if ( NextPattern != CurrentPattern ) then - for _, light in pairs( ents.FindByClass( "light_environment" ) or {} ) do - light:Fire( "FadeToPattern", string.char( NextPattern ) ) - light:Activate() - end - - //engine.LightStyle( 0, string.char( NextPattern - 1 ) ) - //for id, ply in pairs( player.GetAll() ) do ply:SendLua( "render.RedownloadAllLightmaps()" ) end - - CurrentPattern = NextPattern - end - - if ( Time == StealTime && GetConVarNumber( "gms_night_cleanup" ) >= 1 ) then - local drops = ents.FindByClass( "gms_resourcedrop" ) - local weaps = ents.FindByClass( "gms_resourcedrop" ) - local msg = false - - if ( #drops > 8 ) then for id, ent in pairs( drops ) do msg = true ent:Fadeout() end end - if ( #weaps > 4 ) then for id, ent in pairs( weaps ) do msg = true ent:Fadeout() end end - - if ( msg ) then - for id, ply in pairs( player.GetAll() ) do - ply:SendMessage( "Something happened outside...", 5, Color( 255, 10, 10, 255 ) ) - - timer.Simple( 10, function() - ply:SendMessage( "So they dont't get stolen at night.", 5, Color( 255, 150, 150, 255 ) ) - ply:SendMessage( "Remember to store your resources in resoucepack, ", 5, Color( 255, 150, 150, 255 ) ) - end ) - end - end - - for i = 0, math.random( 2, 6 ) do - local zombies = #ents.FindByClass( "npc_zombie" ) - local fzombies = #ents.FindByClass( "npc_fastzombie" ) - if ( zombies + fzombies > 14 ) then break end - local pos = Vector( math.random( -6000, 6000 ), math.random( -6000, 6000 ), 1800 ) - local tr = util.TraceLine( { - start = pos, endpos = pos - Vector( 0, 0, 9999 ) - } ) - - if ( tr.HitWorld ) then - local class = "npc_zombie" - if ( math.random( 0, 100 ) < 25 ) then class = "npc_fastzombie" end - local zombie = ents.Create( class ) - zombie:SetPos( tr.HitPos + Vector( 0, 0, 64 ) ) - zombie:SetHealth( 128 ) - zombie:SetNWString( "Owner", "World" ) - zombie:SetKeyValue( "spawnflags", "1280" ) - zombie:Spawn() - zombie:Fire( "Wake" ) - zombie:Activate() - - local ourEnemy = player.GetByID( math.random( 1, #player.GetAll() ) ) - if ( IsValid( ourEnemy ) ) then - zombie:SetEnemy( ourEnemy ) - zombie:SetLastPosition( ourEnemy:GetPos() ) - zombie:SetSchedule( SCHED_FORCED_GO ) - end - end - end - end - end ) -end diff --git a/ftp_gmstranded/gamemode/unlocks.lua b/ftp_gmstranded/gamemode/unlocks.lua deleted file mode 100644 index 25d2050..0000000 --- a/ftp_gmstranded/gamemode/unlocks.lua +++ /dev/null @@ -1,153 +0,0 @@ - -GMS.FeatureUnlocks = {} - -function GMS.RegisterUnlock( tbl ) - GMS.FeatureUnlocks[ string.Replace( tbl.Name, " ", "_" ) ] = tbl -end - ----------------------------------------------------------------------------------------------------- - -local UNLOCK = {} - -UNLOCK.Name = "Sprinting I" -UNLOCK.Description = "You can now hold down shift to sprint." - -UNLOCK.Req = {} -UNLOCK.Req[ "Survival" ] = 4 - -function UNLOCK.OnUnlock( ply ) - if ( !ply:HasUnlock( "Sprinting_II" ) ) then - if ( ply.CROW ) then ply.CROW.speeds.run = 250 ply.CROW.speeds.sprint = 400 return end - GAMEMODE:SetPlayerSpeed( ply, 250, 400 ) - end -end - -GMS.RegisterUnlock( UNLOCK ) - ----------------------------------------------------------------------------------------------------- - -local UNLOCK = {} - -UNLOCK.Name = "Sprinting II" -UNLOCK.Description = "Your movement speed has got permanent increase. Also, your sprint is now walk." - -UNLOCK.Req = {} -UNLOCK.Req[ "Survival" ] = 12 - -function UNLOCK.OnUnlock( ply ) - if ( ply.CROW ) then ply.CROW.speeds.run = 400 ply.CROW.speeds.sprint = 100 return end - GAMEMODE:SetPlayerSpeed( ply, 400, 100 ) -end - -GMS.RegisterUnlock( UNLOCK ) - ----------------------------------------------------------------------------------------------------- - -local UNLOCK = {} - -UNLOCK.Name = "Adept Survivalist" -UNLOCK.Description = "Your max health has been increased by 50%." - -UNLOCK.Req = {} -UNLOCK.Req[ "Survival" ] = 16 - -function UNLOCK.OnUnlock( ply ) - if ( ply:GetMaxHealth() < 150 ) then ply:SetMaxHealth( 150 ) end - ply:Heal( 50 ) -end - -GMS.RegisterUnlock( UNLOCK ) - ----------------------------------------------------------------------------------------------------- - -local UNLOCK = {} - -UNLOCK.Name = "Master Survivalist" -UNLOCK.Description = "Your max health has been increased by 33%." - -UNLOCK.Req = {} -UNLOCK.Req[ "Survival" ] = 32 - -function UNLOCK.OnUnlock( ply ) - ply:SetMaxHealth( 200 ) - ply:Heal( 50 ) -end - -GMS.RegisterUnlock( UNLOCK ) - ----------------------------------------------------------------------------------------------------- - -local UNLOCK = {} - -UNLOCK.Name = "Extreme Survivalist" -UNLOCK.Description = "You can now become a crow and fly around." - -UNLOCK.Req = {} -UNLOCK.Req[ "Survival" ] = 48 - -function UNLOCK.OnUnlock( ply ) - ply:Give( "pill_pigeon" ) -end - -GMS.RegisterUnlock( UNLOCK ) - ----------------------------------------------------------------------------------------------------- - -local UNLOCK = {} - -UNLOCK.Name = "Sprout Collecting" -UNLOCK.Description = "You can now press use on a tree to attempt to loosen a sprout.\nSprouts can be planted if you have the skill, and they will grow into trees." - -UNLOCK.Req = {} -UNLOCK.Req[ "Lumbering" ] = 5 -UNLOCK.Req[ "Harvesting" ] = 5 - -GMS.RegisterUnlock( UNLOCK ) - ----------------------------------------------------------------------------------------------------- - -local UNLOCK = {} - -UNLOCK.Name = "Grain Planting" -UNLOCK.Description = "You can now plant grain." - -UNLOCK.Req = {} -UNLOCK.Req[ "Planting" ] = 3 - -GMS.RegisterUnlock( UNLOCK ) - ----------------------------------------------------------------------------------------------------- - -local UNLOCK = {} - -UNLOCK.Name = "Sprout Planting" -UNLOCK.Description = "You can now plant sprouts, which will grow into trees." - -UNLOCK.Req = {} -UNLOCK.Req[ "Planting" ] = 5 - -GMS.RegisterUnlock( UNLOCK ) - ----------------------------------------------------------------------------------------------------- - -local UNLOCK = {} - -UNLOCK.Name = "Adept Farmer" -UNLOCK.Description = "Your melon, orange and banana vines can now carry up to 2 fruits instead of one." - -UNLOCK.Req = {} -UNLOCK.Req[ "Planting" ] = 12 - -GMS.RegisterUnlock( UNLOCK ) - ----------------------------------------------------------------------------------------------------- - -local UNLOCK = {} - -UNLOCK.Name = "Expert Farmer" -UNLOCK.Description = "Your melon, orange and banana vines can now carry up to 3 fruits instead of one." - -UNLOCK.Req = {} -UNLOCK.Req[ "Planting" ] = 24 - -GMS.RegisterUnlock( UNLOCK ) diff --git a/ftp_gmstranded/gms_changelog.txt b/ftp_gmstranded/gms_changelog.txt deleted file mode 100644 index 56c38a1..0000000 --- a/ftp_gmstranded/gms_changelog.txt +++ /dev/null @@ -1,18 +0,0 @@ - -Done: - -To-Do: - -* Make sure we don't get players inside NEWLY SPAWNED BUILDINGS/PROPS -* Tribal leader? - -* Change Assembling process? -* Rewrite CROW -* Add weather -* Improve daynight -* Remake UI, HUD -* Remake scoreboard? ( we need a way to mute players ) -* Fix antlion in darkness -* Add anti prop surfing? -* A weapon rack? -* Make zombies find players better? diff --git a/ftp_gmstranded/gmstranded.txt b/ftp_gmstranded/gmstranded.txt deleted file mode 100644 index b7f30fb..0000000 --- a/ftp_gmstranded/gmstranded.txt +++ /dev/null @@ -1,7 +0,0 @@ -"gmstranded" { - "base" "sandbox" - "title" "Garry's Mod Stranded" - "maps" "^gms_" - "menusystem" "1" - "workshopid" "133364818" -}
\ No newline at end of file diff --git a/ftp_gmstranded/icon24.png b/ftp_gmstranded/icon24.png Binary files differdeleted file mode 100644 index 1232179..0000000 --- a/ftp_gmstranded/icon24.png +++ /dev/null diff --git a/ftp_gmstranded/logo.png b/ftp_gmstranded/logo.png Binary files differdeleted file mode 100644 index 92553d3..0000000 --- a/ftp_gmstranded/logo.png +++ /dev/null |
