mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 13:53:45 +03:00
Upload
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
local AddCSLuaFile = AddCSLuaFile
|
||||
local IsValid = IsValid
|
||||
local ents = ents
|
||||
local Vector = Vector
|
||||
local timer = timer
|
||||
|
||||
AddCSLuaFile()
|
||||
|
||||
ENT.Type = "anim"
|
||||
ENT.PrintName = "Combine Barricade"
|
||||
ENT.Category = "HL2 RP"
|
||||
ENT.Spawnable = true
|
||||
ENT.AdminOnly = true
|
||||
ENT.RenderGroup = RENDERGROUP_BOTH
|
||||
ENT.PhysgunDisable = true
|
||||
|
||||
if (SERVER) then
|
||||
function ENT:Initialize()
|
||||
self:SetModel("models/props_combine/combine_barricade_short01a.mdl")
|
||||
|
||||
self:SetSolid(SOLID_VPHYSICS)
|
||||
self:SetMoveType(MOVETYPE_VPHYSICS)
|
||||
self:SetUseType(SIMPLE_USE)
|
||||
self:PhysicsInit(SOLID_VPHYSICS)
|
||||
self.health = 400
|
||||
|
||||
local physObj = self:GetPhysicsObject()
|
||||
|
||||
if (IsValid(physObj)) then
|
||||
physObj:EnableMotion(false)
|
||||
physObj:Sleep()
|
||||
end
|
||||
|
||||
--self:FreezeBarricade()
|
||||
end
|
||||
--[[
|
||||
function ENT:FreezeBarricade()
|
||||
timer.Create("Freeze", 3, 0, function()
|
||||
local physObj = self:GetPhysicsObject()
|
||||
|
||||
if (IsValid(physObj)) then
|
||||
physObj:EnableMotion(false)
|
||||
physObj:Sleep()
|
||||
end
|
||||
end)
|
||||
end--]]
|
||||
|
||||
function ENT:OnTakeDamage(damage)
|
||||
self.health = self.health - damage:GetDamage()
|
||||
-- self:SetHealth(self.health - damage:GetDamage())
|
||||
|
||||
if (!IsValid(self.spark)) then
|
||||
self.spark = ents.Create("env_spark")
|
||||
end
|
||||
if (!IsValid(self.explosion)) then
|
||||
self.explosion = ents.Create("npc_grenade_frag")
|
||||
end
|
||||
|
||||
if (self.health <= 0) then
|
||||
self.spark:SetPos(self:GetPos() + Vector(0, 10, 0))
|
||||
self.spark:Fire("SparkOnce")
|
||||
self.explosion:SetPos(self.spark:GetPos())
|
||||
self.explosion:Fire("Timer", 0.01)
|
||||
self.explosion:Fire("SetTimer", 0.01)
|
||||
timer.Remove("PrintTimer" .. self:EntIndex())
|
||||
self:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
function ENT:OnRemove()
|
||||
if (IsValid(self.spark) or IsValid(self.explosion)) then
|
||||
timer.Simple(5, function()
|
||||
if (IsValid(self.spark)) then self.spark:Remove() end
|
||||
if (IsValid(self.explosion)) then self.explosion:Remove() end
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,46 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
local AddCSLuaFile = AddCSLuaFile
|
||||
local IsValid = IsValid
|
||||
local ents = ents
|
||||
local Vector = Vector
|
||||
local timer = timer
|
||||
|
||||
AddCSLuaFile()
|
||||
|
||||
ENT.Type = "anim"
|
||||
ENT.PrintName = "Sandbag"
|
||||
ENT.Category = "HL2 RP"
|
||||
ENT.Spawnable = true
|
||||
ENT.AdminOnly = true
|
||||
ENT.RenderGroup = RENDERGROUP_BOTH
|
||||
ENT.PhysgunDisable = true
|
||||
|
||||
if (SERVER) then
|
||||
function ENT:Initialize()
|
||||
self:SetModel("models/mosi/fallout4/props/fortifications/sandbag01.mdl")
|
||||
self:SetSolid(SOLID_VPHYSICS)
|
||||
self:SetMoveType(MOVETYPE_VPHYSICS)
|
||||
self:SetUseType(SIMPLE_USE)
|
||||
self:PhysicsInit(SOLID_VPHYSICS)
|
||||
|
||||
local physObj = self:GetPhysicsObject()
|
||||
|
||||
if (IsValid(physObj)) then
|
||||
physObj:EnableMotion(false)
|
||||
physObj:Sleep()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function ENT:OnRemove()
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,229 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
local AddCSLuaFile = AddCSLuaFile
|
||||
local Model = Model
|
||||
local Sound = Sound
|
||||
local IsValid = IsValid
|
||||
local ents = ents
|
||||
local Angle = Angle
|
||||
local pairs = pairs
|
||||
local game = game
|
||||
local math = math
|
||||
local LocalPlayer = LocalPlayer
|
||||
local draw = draw
|
||||
local ScrW = ScrW
|
||||
local ScrH = ScrH
|
||||
local Color = Color
|
||||
|
||||
AddCSLuaFile()
|
||||
|
||||
SWEP.PrintName = "Barricade Placer"
|
||||
SWEP.Author = "JohnyReaper"
|
||||
SWEP.Purpose = ""
|
||||
SWEP.Category = "HL2 RP"
|
||||
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 1
|
||||
|
||||
SWEP.ViewModel = Model("")
|
||||
SWEP.WorldModel = Model("")
|
||||
SWEP.ViewModelFOV = 70
|
||||
SWEP.UseHands = false
|
||||
SWEP.HoldType = "normal"
|
||||
|
||||
SWEP.Ent = "ix_combinebarricade"
|
||||
SWEP.BarricadePlace = nil
|
||||
SWEP.PreviewModel = "models/props_combine/combine_barricade_short01a.mdl"
|
||||
|
||||
SWEP.Spawnable = true
|
||||
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.DefaultClip = -1
|
||||
SWEP.Primary.Automatic = false
|
||||
SWEP.Primary.Ammo = "none"
|
||||
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.DefaultClip = -1
|
||||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.Ammo = "none"
|
||||
|
||||
SWEP.DrawAmmo = false
|
||||
|
||||
SWEP.IsAlwaysLowered = true
|
||||
SWEP.FireWhenLowered = true
|
||||
|
||||
local SwingSound = Sound("WeaponFrag.Throw")
|
||||
|
||||
function SWEP:Initialize()
|
||||
self:SetWeaponHoldType(self.HoldType)
|
||||
if CLIENT then
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Deploy()
|
||||
if CLIENT then
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:GhostProp()
|
||||
if (IsValid(self.ghostProp)) then self.ghostProp:Remove() end
|
||||
self.ghostProp = ents.CreateClientProp()
|
||||
self.ghostProp:SetModel(self.PreviewModel)
|
||||
-- self.ghostProp:SetMaterial("models/wireframe")
|
||||
self.ghostProp:Spawn()
|
||||
self.ghostProp:Activate()
|
||||
self.ghostProp:SetParent(self.Owner)
|
||||
self.ghostProp:SetRenderMode(RENDERMODE_TRANSALPHA)
|
||||
end
|
||||
|
||||
|
||||
function SWEP:CalcViewModelView(vm, oldPos, oldAng, pos, ang)
|
||||
local oldPos = vm:GetPos()
|
||||
local oldAng = vm:GetAngles()
|
||||
|
||||
local newPos = pos + ang:Up() * 5 + ang:Forward() * -12
|
||||
return newPos, ang
|
||||
end
|
||||
|
||||
function SWEP:CheckCollisionBox()
|
||||
local hitVector = self.Owner:GetPos() + Angle(0, self.Owner:GetAngles().y, 0):Forward() * 55
|
||||
|
||||
local check = true
|
||||
|
||||
for k, v in pairs(ents.FindInSphere(hitVector, 15)) do
|
||||
|
||||
if (check) then
|
||||
check = false
|
||||
end
|
||||
end
|
||||
|
||||
return check
|
||||
end
|
||||
|
||||
function SWEP:PrimaryAttack()
|
||||
local tr = self.Owner:GetEyeTrace()
|
||||
if (game.SinglePlayer()) then self:CallOnClient("PrimaryAttack") end
|
||||
|
||||
if (SERVER) then
|
||||
self.Owner:SetAnimation(PLAYER_ATTACK1)
|
||||
end
|
||||
|
||||
if (tr.HitWorld) then
|
||||
if (!self.BarricadePlace) then
|
||||
self.BarricadePlace = self.Owner:GetPos() + Angle(0, self.Owner:GetAngles().y, 0):Forward() * 65 + Angle(0, self.Owner:GetAngles().y, 0):Right() * -10 + Angle(0, self.Owner:GetAngles().y, 0):Up() * 30
|
||||
self.testowyang = Angle(0, self.Owner:GetAngles().y + 330, 0):SnapTo("y", 1)
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
if (self.BarricadePlace) then
|
||||
local angles = self.testowyang
|
||||
angles.p = 0
|
||||
angles.r = 0
|
||||
angles:RotateAroundAxis(angles:Up(), 360)
|
||||
|
||||
local barricadeEnt = ents.Create(self.Ent)
|
||||
barricadeEnt:SetPos(self.BarricadePlace)
|
||||
barricadeEnt:SetAngles(angles)
|
||||
barricadeEnt:Spawn()
|
||||
barricadeEnt:Activate()
|
||||
|
||||
if (self.Owner.previousWep) then
|
||||
self.Owner:SelectWeapon(self.Owner.previousWep)
|
||||
self.Owner.previousWep = nil
|
||||
end
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
self.Owner:EmitSound("physics/metal/metal_canister_impact_soft"..math.random(1,3)..".wav", 60, 100, 0.5)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:SecondaryAttack()
|
||||
if (SERVER) then
|
||||
local char = self.Owner:GetCharacter()
|
||||
local inventory = char:GetInventory()
|
||||
|
||||
inventory:Add("barricade_placer")
|
||||
|
||||
if (self.Owner.previousWep) then
|
||||
self.Owner:SelectWeapon(self.Owner.previousWep)
|
||||
self.Owner.previousWep = nil
|
||||
end
|
||||
self:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:DrawHUD()
|
||||
local ply = LocalPlayer()
|
||||
if (!ply:Alive()) then return end
|
||||
|
||||
draw.SimpleTextOutlined("Press LMB to place", "DermaLarge", ScrW() / 2, ScrH()-230, Color(250,250,250), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(25, 25, 25, 250))
|
||||
draw.SimpleTextOutlined("Press RMB to exit", "DermaLarge", ScrW() / 2, ScrH()-200, Color(250,250,250), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(25, 25, 25, 250))
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Think()
|
||||
local tr = self.Owner:GetEyeTrace()
|
||||
|
||||
if (CLIENT) then
|
||||
|
||||
if (IsValid(self.ghostProp)) then
|
||||
local pozz = self.BarricadePlace
|
||||
local angg = self.testowyang
|
||||
|
||||
self.ghostProp:SetPos(self.Owner:GetPos() + Angle(0, self.Owner:GetAngles().y, 0):Forward() * 65 + Angle(0, self.Owner:GetAngles().y, 0):Right() * -10 + Angle(0, self.Owner:GetAngles().y, 0):Up() * 30 )
|
||||
self.ghostProp:SetAngles(Angle(0, self.Owner:GetAngles().y + 330, 0):SnapTo("y", 1))
|
||||
|
||||
else
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function SWEP:PreDrawViewModel()
|
||||
if (CLIENT) then
|
||||
if (!IsValid(self.ghostProp)) then
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Holster()
|
||||
if (CLIENT) then
|
||||
if (IsValid(self.ghostProp)) then
|
||||
self.ghostProp:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function SWEP:OnDrop()
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function SWEP:OnRemove()
|
||||
if (CLIENT) then
|
||||
if (IsValid(self.ghostProp)) then
|
||||
self.ghostProp:Remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,229 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
local AddCSLuaFile = AddCSLuaFile
|
||||
local Model = Model
|
||||
local Sound = Sound
|
||||
local IsValid = IsValid
|
||||
local ents = ents
|
||||
local Angle = Angle
|
||||
local pairs = pairs
|
||||
local game = game
|
||||
local math = math
|
||||
local LocalPlayer = LocalPlayer
|
||||
local draw = draw
|
||||
local ScrW = ScrW
|
||||
local ScrH = ScrH
|
||||
local Color = Color
|
||||
|
||||
AddCSLuaFile()
|
||||
|
||||
SWEP.PrintName = "Garden Placer"
|
||||
SWEP.Author = "made by JohnyReaper edited by "
|
||||
SWEP.Purpose = ""
|
||||
SWEP.Category = "HL2 RP"
|
||||
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 1
|
||||
|
||||
SWEP.ViewModel = Model("")
|
||||
SWEP.WorldModel = Model("")
|
||||
SWEP.ViewModelFOV = 70
|
||||
SWEP.UseHands = false
|
||||
SWEP.HoldType = "normal"
|
||||
|
||||
SWEP.Ent = "wn_crop"
|
||||
SWEP.BarricadePlace = nil
|
||||
SWEP.PreviewModel = "models/wn7new/advcrates/n7_planter_wood.mdl"
|
||||
|
||||
SWEP.Spawnable = true
|
||||
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.DefaultClip = -1
|
||||
SWEP.Primary.Automatic = false
|
||||
SWEP.Primary.Ammo = "none"
|
||||
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.DefaultClip = -1
|
||||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.Ammo = "none"
|
||||
|
||||
SWEP.DrawAmmo = false
|
||||
|
||||
SWEP.IsAlwaysLowered = true
|
||||
SWEP.FireWhenLowered = true
|
||||
|
||||
local SwingSound = Sound("WeaponFrag.Throw")
|
||||
|
||||
function SWEP:Initialize()
|
||||
self:SetWeaponHoldType(self.HoldType)
|
||||
if CLIENT then
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Deploy()
|
||||
if CLIENT then
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:GhostProp()
|
||||
if (IsValid(self.ghostProp)) then self.ghostProp:Remove() end
|
||||
self.ghostProp = ents.CreateClientProp()
|
||||
self.ghostProp:SetModel(self.PreviewModel)
|
||||
-- self.ghostProp:SetMaterial("models/wireframe")
|
||||
self.ghostProp:Spawn()
|
||||
self.ghostProp:Activate()
|
||||
self.ghostProp:SetParent(self.Owner)
|
||||
self.ghostProp:SetRenderMode(RENDERMODE_TRANSALPHA)
|
||||
end
|
||||
|
||||
|
||||
function SWEP:CalcViewModelView(vm, oldPos, oldAng, pos, ang)
|
||||
local oldPos = vm:GetPos()
|
||||
local oldAng = vm:GetAngles()
|
||||
|
||||
local newPos = pos + ang:Up() * 5 + ang:Forward() * -12
|
||||
return newPos, ang
|
||||
end
|
||||
|
||||
function SWEP:CheckCollisionBox()
|
||||
local hitVector = self.Owner:GetPos() + Angle(0, self.Owner:GetAngles().y, 0):Forward() * 55
|
||||
|
||||
local check = true
|
||||
|
||||
for k, v in pairs(ents.FindInSphere(hitVector, 15)) do
|
||||
|
||||
if (check) then
|
||||
check = false
|
||||
end
|
||||
end
|
||||
|
||||
return check
|
||||
end
|
||||
|
||||
function SWEP:PrimaryAttack()
|
||||
local tr = self.Owner:GetEyeTrace()
|
||||
if (game.SinglePlayer()) then self:CallOnClient("PrimaryAttack") end
|
||||
|
||||
if (SERVER) then
|
||||
self.Owner:SetAnimation(PLAYER_ATTACK1)
|
||||
end
|
||||
|
||||
if (tr.HitWorld) then
|
||||
if (!self.BarricadePlace) then
|
||||
self.BarricadePlace = self.Owner:GetPos() + Angle(0, self.Owner:GetAngles().y, 0):Forward() * 65 + Angle(0, self.Owner:GetAngles().y, 0):Right() * -10 + Angle(0, self.Owner:GetAngles().y, 0):Up()
|
||||
self.testowyang = Angle(0, self.Owner:GetAngles().y + 330, 0):SnapTo("y", 1)
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
if (self.BarricadePlace) then
|
||||
local angles = self.testowyang
|
||||
angles.p = 0
|
||||
angles.r = 0
|
||||
angles:RotateAroundAxis(angles:Up(), 360)
|
||||
|
||||
local barricadeEnt = ents.Create(self.Ent)
|
||||
barricadeEnt:SetPos(self.BarricadePlace)
|
||||
barricadeEnt:SetAngles(angles)
|
||||
barricadeEnt:Spawn()
|
||||
barricadeEnt:Activate()
|
||||
|
||||
if (self.Owner.previousWep) then
|
||||
self.Owner:SelectWeapon(self.Owner.previousWep)
|
||||
self.Owner.previousWep = nil
|
||||
end
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
self.Owner:EmitSound("physics/metal/metal_canister_impact_soft"..math.random(1,3)..".wav", 60, 100, 0.5)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:SecondaryAttack()
|
||||
if (SERVER) then
|
||||
local char = self.Owner:GetCharacter()
|
||||
local inventory = char:GetInventory()
|
||||
|
||||
inventory:Add("planter_placer")
|
||||
|
||||
if (self.Owner.previousWep) then
|
||||
self.Owner:SelectWeapon(self.Owner.previousWep)
|
||||
self.Owner.previousWep = nil
|
||||
end
|
||||
self:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:DrawHUD()
|
||||
local ply = LocalPlayer()
|
||||
if (!ply:Alive()) then return end
|
||||
|
||||
draw.SimpleTextOutlined("Press LMB to place", "DermaLarge", ScrW() / 2, ScrH()-230, Color(250,250,250), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(25, 25, 25, 250))
|
||||
draw.SimpleTextOutlined("Press RMB to exit", "DermaLarge", ScrW() / 2, ScrH()-200, Color(250,250,250), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(25, 25, 25, 250))
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Think()
|
||||
local tr = self.Owner:GetEyeTrace()
|
||||
|
||||
if (CLIENT) then
|
||||
|
||||
if (IsValid(self.ghostProp)) then
|
||||
local pozz = self.BarricadePlace
|
||||
local angg = self.testowyang
|
||||
|
||||
self.ghostProp:SetPos(self.Owner:GetPos() + Angle(0, self.Owner:GetAngles().y, 0):Forward() * 65 + Angle(0, self.Owner:GetAngles().y, 0):Right() * -10 + Angle(0, self.Owner:GetAngles().y, 0):Up() * 30 )
|
||||
self.ghostProp:SetAngles(Angle(0, self.Owner:GetAngles().y + 330, 0):SnapTo("y", 1))
|
||||
|
||||
else
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function SWEP:PreDrawViewModel()
|
||||
if (CLIENT) then
|
||||
if (!IsValid(self.ghostProp)) then
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Holster()
|
||||
if (CLIENT) then
|
||||
if (IsValid(self.ghostProp)) then
|
||||
self.ghostProp:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function SWEP:OnDrop()
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function SWEP:OnRemove()
|
||||
if (CLIENT) then
|
||||
if (IsValid(self.ghostProp)) then
|
||||
self.ghostProp:Remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,229 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
local AddCSLuaFile = AddCSLuaFile
|
||||
local Model = Model
|
||||
local Sound = Sound
|
||||
local IsValid = IsValid
|
||||
local ents = ents
|
||||
local Angle = Angle
|
||||
local pairs = pairs
|
||||
local game = game
|
||||
local math = math
|
||||
local LocalPlayer = LocalPlayer
|
||||
local draw = draw
|
||||
local ScrW = ScrW
|
||||
local ScrH = ScrH
|
||||
local Color = Color
|
||||
|
||||
AddCSLuaFile()
|
||||
|
||||
SWEP.PrintName = "Barricade Placer"
|
||||
SWEP.Author = "JohnyReaper"
|
||||
SWEP.Purpose = ""
|
||||
SWEP.Category = "HL2 RP"
|
||||
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 1
|
||||
|
||||
SWEP.ViewModel = Model("")
|
||||
SWEP.WorldModel = Model("")
|
||||
SWEP.ViewModelFOV = 70
|
||||
SWEP.UseHands = false
|
||||
SWEP.HoldType = "normal"
|
||||
|
||||
SWEP.Ent = "ix_sandbag"
|
||||
SWEP.BarricadePlace = nil
|
||||
SWEP.PreviewModel = "models/mosi/fallout4/props/fortifications/sandbag01.mdl"
|
||||
|
||||
SWEP.Spawnable = true
|
||||
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.DefaultClip = -1
|
||||
SWEP.Primary.Automatic = false
|
||||
SWEP.Primary.Ammo = "none"
|
||||
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.DefaultClip = -1
|
||||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.Ammo = "none"
|
||||
|
||||
SWEP.DrawAmmo = false
|
||||
|
||||
SWEP.IsAlwaysLowered = true
|
||||
SWEP.FireWhenLowered = true
|
||||
|
||||
local SwingSound = Sound("WeaponFrag.Throw")
|
||||
|
||||
function SWEP:Initialize()
|
||||
self:SetWeaponHoldType(self.HoldType)
|
||||
if CLIENT then
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Deploy()
|
||||
if CLIENT then
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:GhostProp()
|
||||
if (IsValid(self.ghostProp)) then self.ghostProp:Remove() end
|
||||
self.ghostProp = ents.CreateClientProp()
|
||||
self.ghostProp:SetModel(self.PreviewModel)
|
||||
-- self.ghostProp:SetMaterial("models/wireframe")
|
||||
self.ghostProp:Spawn()
|
||||
self.ghostProp:Activate()
|
||||
self.ghostProp:SetParent(self.Owner)
|
||||
self.ghostProp:SetRenderMode(RENDERMODE_TRANSALPHA)
|
||||
end
|
||||
|
||||
|
||||
function SWEP:CalcViewModelView(vm, oldPos, oldAng, pos, ang)
|
||||
local oldPos = vm:GetPos()
|
||||
local oldAng = vm:GetAngles()
|
||||
|
||||
local newPos = pos + ang:Up() * 5 + ang:Forward() * -12
|
||||
return newPos, ang
|
||||
end
|
||||
|
||||
function SWEP:CheckCollisionBox()
|
||||
local hitVector = self.Owner:GetPos() + Angle(0, self.Owner:GetAngles().y, 0):Forward() * 55
|
||||
|
||||
local check = true
|
||||
|
||||
for k, v in pairs(ents.FindInSphere(hitVector, 15)) do
|
||||
|
||||
if (check) then
|
||||
check = false
|
||||
end
|
||||
end
|
||||
|
||||
return check
|
||||
end
|
||||
|
||||
function SWEP:PrimaryAttack()
|
||||
local tr = self.Owner:GetEyeTrace()
|
||||
if (game.SinglePlayer()) then self:CallOnClient("PrimaryAttack") end
|
||||
|
||||
if (SERVER) then
|
||||
self.Owner:SetAnimation(PLAYER_ATTACK1)
|
||||
end
|
||||
|
||||
if (tr.HitWorld) then
|
||||
if (!self.BarricadePlace) then
|
||||
self.BarricadePlace = self.Owner:GetPos() + Angle(0, self.Owner:GetAngles().y, 0):Forward() * 65 + Angle(0, self.Owner:GetAngles().y, 0):Right() * -10 + Angle(0, self.Owner:GetAngles().y, 0):Up()
|
||||
self.testowyang = Angle(0, self.Owner:GetAngles().y + 360, 0):SnapTo("y", 1)
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
if (self.BarricadePlace) then
|
||||
local angles = self.testowyang
|
||||
angles.p = 0
|
||||
angles.r = 0
|
||||
angles:RotateAroundAxis(angles:Up(), 360)
|
||||
|
||||
local barricadeEnt = ents.Create(self.Ent)
|
||||
barricadeEnt:SetPos(self.BarricadePlace)
|
||||
barricadeEnt:SetAngles(angles)
|
||||
barricadeEnt:Spawn()
|
||||
barricadeEnt:Activate()
|
||||
|
||||
if (self.Owner.previousWep) then
|
||||
self.Owner:SelectWeapon(self.Owner.previousWep)
|
||||
self.Owner.previousWep = nil
|
||||
end
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
self.Owner:EmitSound("physics/metal/metal_canister_impact_soft"..math.random(1,3)..".wav", 60, 100, 0.5)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:SecondaryAttack()
|
||||
if (SERVER) then
|
||||
local char = self.Owner:GetCharacter()
|
||||
local inventory = char:GetInventory()
|
||||
|
||||
inventory:Add("sandbag_placer")
|
||||
|
||||
if (self.Owner.previousWep) then
|
||||
self.Owner:SelectWeapon(self.Owner.previousWep)
|
||||
self.Owner.previousWep = nil
|
||||
end
|
||||
self:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:DrawHUD()
|
||||
local ply = LocalPlayer()
|
||||
if (!ply:Alive()) then return end
|
||||
|
||||
draw.SimpleTextOutlined("Press LMB to place", "DermaLarge", ScrW() / 2, ScrH()-230, Color(250,250,250), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(25, 25, 25, 250))
|
||||
draw.SimpleTextOutlined("Press RMB to exit", "DermaLarge", ScrW() / 2, ScrH()-200, Color(250,250,250), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(25, 25, 25, 250))
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Think()
|
||||
local tr = self.Owner:GetEyeTrace()
|
||||
|
||||
if (CLIENT) then
|
||||
|
||||
if (IsValid(self.ghostProp)) then
|
||||
local pozz = self.BarricadePlace
|
||||
local angg = self.testowyang
|
||||
|
||||
self.ghostProp:SetPos(self.Owner:GetPos() + Angle(0, self.Owner:GetAngles().y, 0):Forward() * 65 + Angle(0, self.Owner:GetAngles().y, 0):Right() * -10 )
|
||||
self.ghostProp:SetAngles(Angle(0, self.Owner:GetAngles().y + 360, 0):SnapTo("y", 1))
|
||||
|
||||
else
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function SWEP:PreDrawViewModel()
|
||||
if (CLIENT) then
|
||||
if (!IsValid(self.ghostProp)) then
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Holster()
|
||||
if (CLIENT) then
|
||||
if (IsValid(self.ghostProp)) then
|
||||
self.ghostProp:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function SWEP:OnDrop()
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function SWEP:OnRemove()
|
||||
if (CLIENT) then
|
||||
if (IsValid(self.ghostProp)) then
|
||||
self.ghostProp:Remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,224 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
local AddCSLuaFile = AddCSLuaFile
|
||||
local Model = Model
|
||||
local Sound = Sound
|
||||
local IsValid = IsValid
|
||||
local ents = ents
|
||||
local Angle = Angle
|
||||
local pairs = pairs
|
||||
local game = game
|
||||
local math = math
|
||||
local LocalPlayer = LocalPlayer
|
||||
local draw = draw
|
||||
local ScrW = ScrW
|
||||
local ScrH = ScrH
|
||||
local Color = Color
|
||||
|
||||
AddCSLuaFile()
|
||||
|
||||
SWEP.PrintName = "Turret Placer"
|
||||
SWEP.Author = "JohnyReaper"
|
||||
SWEP.Purpose = ""
|
||||
SWEP.Category = "HL2 RP"
|
||||
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 1
|
||||
|
||||
SWEP.ViewModel = Model("")
|
||||
SWEP.WorldModel = Model("")
|
||||
SWEP.ViewModelFOV = 70
|
||||
SWEP.UseHands = false
|
||||
SWEP.HoldType = "normal"
|
||||
|
||||
SWEP.Ent = "npc_turret_floor"
|
||||
SWEP.TurretPlace = nil
|
||||
SWEP.PreviewModel = "models/combine_turrets/floor_turret.mdl"
|
||||
|
||||
SWEP.Spawnable = true
|
||||
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.DefaultClip = -1
|
||||
SWEP.Primary.Automatic = false
|
||||
SWEP.Primary.Ammo = "none"
|
||||
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.DefaultClip = -1
|
||||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.Ammo = "none"
|
||||
|
||||
SWEP.DrawAmmo = false
|
||||
|
||||
SWEP.IsAlwaysLowered = true
|
||||
SWEP.FireWhenLowered = true
|
||||
|
||||
local SwingSound = Sound("WeaponFrag.Throw")
|
||||
|
||||
function SWEP:Initialize()
|
||||
self:SetWeaponHoldType(self.HoldType)
|
||||
if CLIENT then
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Deploy()
|
||||
if CLIENT then
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:GhostProp()
|
||||
if (IsValid(self.ghostProp)) then self.ghostProp:Remove() end
|
||||
self.ghostProp = ents.CreateClientProp()
|
||||
self.ghostProp:SetModel(self.PreviewModel)
|
||||
-- self.ghostProp:SetMaterial("models/wireframe")
|
||||
self.ghostProp:Spawn()
|
||||
self.ghostProp:Activate()
|
||||
self.ghostProp:SetParent(self.Owner)
|
||||
self.ghostProp:SetRenderMode(RENDERMODE_TRANSALPHA)
|
||||
end
|
||||
|
||||
|
||||
function SWEP:CalcViewModelView(vm, oldPos, oldAng, pos, ang)
|
||||
local oldPos = vm:GetPos()
|
||||
local oldAng = vm:GetAngles()
|
||||
|
||||
local newPos = pos + ang:Up() * 5 + ang:Forward() * -12
|
||||
return newPos, ang
|
||||
end
|
||||
|
||||
function SWEP:CheckCollisionBox()
|
||||
local hitVector = self.Owner:GetPos() + Angle(0, self.Owner:GetAngles().y, 0):Forward() * 55
|
||||
|
||||
local check = true
|
||||
|
||||
for k, v in pairs(ents.FindInSphere(hitVector, 15)) do
|
||||
|
||||
if (check) then
|
||||
check = false
|
||||
end
|
||||
end
|
||||
|
||||
return check
|
||||
end
|
||||
|
||||
function SWEP:PrimaryAttack()
|
||||
local tr = self.Owner:GetEyeTrace()
|
||||
if (game.SinglePlayer()) then self:CallOnClient("PrimaryAttack") end
|
||||
|
||||
if (SERVER) then
|
||||
self.Owner:SetAnimation(PLAYER_ATTACK1)
|
||||
end
|
||||
|
||||
if (tr.HitWorld) then
|
||||
if (!self.TurretPlace) then
|
||||
self.TurretPlace = self.Owner:GetPos() + Angle(0, self.Owner:GetAngles().y, 0):Forward() * 65 + Angle(0, self.Owner:GetAngles().y, 0):Right() * -10 + Angle(0, self.Owner:GetAngles().y, 0):Up() * 5
|
||||
self.testowyang = Angle(0, self.Owner:GetAngles().y + 360, 0):SnapTo("y", 1)
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
if (self.TurretPlace) then
|
||||
local angles = self.testowyang
|
||||
angles.p = 0
|
||||
angles.r = 0
|
||||
angles:RotateAroundAxis(angles:Up(), 360)
|
||||
|
||||
local turretent = ents.Create(self.Ent)
|
||||
turretent:SetPos(self.TurretPlace)
|
||||
turretent:SetAngles(angles)
|
||||
turretent:Spawn()
|
||||
turretent:Activate()
|
||||
|
||||
if (self.Owner.previousWep) then
|
||||
self.Owner:SelectWeapon(self.Owner.previousWep)
|
||||
self.Owner.previousWep = nil
|
||||
end
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
self.Owner:EmitSound("physics/metal/metal_canister_impact_soft"..math.random(1,3)..".wav", 60, 100, 0.5)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:SecondaryAttack()
|
||||
if (SERVER) then
|
||||
if (self.Owner.previousWep) then
|
||||
self.Owner:SelectWeapon(self.Owner.previousWep)
|
||||
self.Owner.previousWep = nil
|
||||
end
|
||||
self:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:DrawHUD()
|
||||
local ply = LocalPlayer()
|
||||
if (!ply:Alive()) then return end
|
||||
|
||||
draw.SimpleTextOutlined("Press LMB to place", "DermaLarge", ScrW() / 2, ScrH()-230, Color(250,250,250), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(25, 25, 25, 250))
|
||||
draw.SimpleTextOutlined("Press RMB to exit", "DermaLarge", ScrW() / 2, ScrH()-200, Color(250,250,250), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(25, 25, 25, 250))
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Think()
|
||||
local tr = self.Owner:GetEyeTrace()
|
||||
|
||||
if (CLIENT) then
|
||||
|
||||
if (IsValid(self.ghostProp)) then
|
||||
local pozz = self.TurretPlace
|
||||
local angg = self.testowyang
|
||||
|
||||
self.ghostProp:SetPos(self.Owner:GetPos() + Angle(0, self.Owner:GetAngles().y, 0):Forward() * 65 + Angle(0, self.Owner:GetAngles().y, 0):Right() * -10 + Angle(0, self.Owner:GetAngles().y, 0):Up() * 7 )
|
||||
self.ghostProp:SetAngles(Angle(0, self.Owner:GetAngles().y + 360, 0):SnapTo("y", 1))
|
||||
|
||||
else
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function SWEP:PreDrawViewModel()
|
||||
if (CLIENT) then
|
||||
if (!IsValid(self.ghostProp)) then
|
||||
self:GhostProp()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Holster()
|
||||
if (CLIENT) then
|
||||
if (IsValid(self.ghostProp)) then
|
||||
self.ghostProp:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function SWEP:OnDrop()
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function SWEP:OnRemove()
|
||||
if (CLIENT) then
|
||||
if (IsValid(self.ghostProp)) then
|
||||
self.ghostProp:Remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,38 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Zestaw do rozstawiania barykad"
|
||||
ITEM.description = "Zestaw służący do rozstawiania barykad."
|
||||
ITEM.model = Model("models/props_combine/combine_barricade_short01a.mdl")
|
||||
ITEM.noBusiness = true
|
||||
ITEM.width = 2
|
||||
ITEM.height = 2
|
||||
|
||||
ITEM.functions.place = {
|
||||
name = "Rozstaw",
|
||||
tip = "Rozstaw barykadę",
|
||||
icon = "icon16/brick_add.png",
|
||||
OnRun = function(item)
|
||||
local client = item.player
|
||||
|
||||
if (!client:Alive()) then return false end
|
||||
client:EmitSound("physics/cardboard/cardboard_box_break3.wav")
|
||||
|
||||
client.previousWep = client:GetActiveWeapon():GetClass()
|
||||
client:Give("weapon_barricade_placer")
|
||||
client:SelectWeapon("weapon_barricade_placer")
|
||||
|
||||
return true
|
||||
end,
|
||||
OnCanRun = function(item)
|
||||
return (!IsValid(item.entity))
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Manhack"
|
||||
ITEM.model = "models/manhack.mdl"
|
||||
ITEM.width = 2
|
||||
ITEM.height = 2
|
||||
ITEM.description = "Manhak Kombinatu."
|
||||
ITEM.weaponCategory = "deployable"
|
||||
|
||||
ITEM.functions.Deploy = {
|
||||
OnRun = function(item)
|
||||
local grd = ents.Create("npc_manhack")
|
||||
local client = item.player
|
||||
|
||||
local data = {}
|
||||
data.start = client:GetShootPos()
|
||||
data.endpos = data.start + client:GetAimVector()*96
|
||||
data.filter = client
|
||||
local trace = util.TraceLine(data)
|
||||
|
||||
if client:Team() == FACTION_CP or client:Team() == FACTION_OTA then
|
||||
if (trace.HitPos) then
|
||||
grd:SetPos(trace.HitPos + trace.HitNormal * 10)
|
||||
grd:Spawn()
|
||||
end
|
||||
else
|
||||
client:Notify("Nie jesteś jednostką Kombinatu!")
|
||||
end
|
||||
|
||||
for k, v in pairs(player.GetAll()) do
|
||||
if v:Team() == FACTION_CP or v:Team() == FACTION_OTA then
|
||||
grd:AddEntityRelationship(v, D_LI, 99)
|
||||
else
|
||||
grd:AddEntityRelationship(v, D_HT, 99)
|
||||
end
|
||||
end
|
||||
|
||||
local phys = grd:GetPhysicsObject()
|
||||
|
||||
if (item.entConfigure) then
|
||||
item:entConfigure(grd)
|
||||
end
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Sadzarka"
|
||||
ITEM.description = "Rozkładana sadzarka, a jaka przenośna!"
|
||||
ITEM.model = Model("models/wn7new/advcrates/n7_planter_wood.mdl")
|
||||
ITEM.noBusiness = true
|
||||
ITEM.category = "Farming"
|
||||
ITEM.width = 4
|
||||
ITEM.height = 2
|
||||
ITEM.outlineColor = Color(255, 0, 0, 100)
|
||||
|
||||
ITEM.functions.place = {
|
||||
name = "Rozstaw",
|
||||
tip = "Rozstaw sadzarkę",
|
||||
icon = "icon16/brick_add.png",
|
||||
OnRun = function(item)
|
||||
local client = item.player
|
||||
|
||||
if (!client:Alive()) then return false end
|
||||
client:EmitSound("physics/cardboard/cardboard_box_break3.wav")
|
||||
|
||||
client.previousWep = client:GetActiveWeapon():GetClass()
|
||||
client:Give("weapon_planter_placer")
|
||||
client:SelectWeapon("weapon_planter_placer")
|
||||
|
||||
return true
|
||||
end,
|
||||
OnCanRun = function(item)
|
||||
return (!IsValid(item.entity))
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Worki z piaskiem"
|
||||
ITEM.description = "Kilka zapakowanych worków z piaskiem, które można ustawić jeden na drugim, aby zapewnić prowizoryczną obronę. Całkiem przydatne."
|
||||
ITEM.model = Model("models/mosi/fallout4/props/fortifications/sandbag01.mdl")
|
||||
ITEM.noBusiness = true
|
||||
ITEM.category = "misc"
|
||||
ITEM.width = 4
|
||||
ITEM.height = 2
|
||||
ITEM.outlineColor = Color(255, 0, 0, 100)
|
||||
|
||||
ITEM.functions.place = {
|
||||
name = "Rozstaw",
|
||||
tip = "Rozstaw worki z piaskiem",
|
||||
icon = "icon16/brick_add.png",
|
||||
OnRun = function(item)
|
||||
local client = item.player
|
||||
|
||||
if (!client:Alive()) then return false end
|
||||
client:EmitSound("physics/cardboard/cardboard_box_break3.wav")
|
||||
|
||||
client.previousWep = client:GetActiveWeapon():GetClass()
|
||||
client:Give("weapon_sandbag_placer")
|
||||
client:SelectWeapon("weapon_sandbag_placer")
|
||||
|
||||
return true
|
||||
end,
|
||||
OnCanRun = function(item)
|
||||
return (!IsValid(item.entity))
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Zestaw do rozstawiania wieżyczek"
|
||||
ITEM.description = "Zestaw służący do rozstawiania wieżyczek kombinatu."
|
||||
ITEM.model = Model("models/combine_turrets/floor_turret.mdl")
|
||||
ITEM.noBusiness = true
|
||||
ITEM.width = 2
|
||||
ITEM.height = 3
|
||||
|
||||
ITEM.functions.place = {
|
||||
name = "Rozstaw",
|
||||
tip = "Rozstaw wieżyczkę",
|
||||
icon = "icon16/brick_add.png",
|
||||
OnRun = function(item)
|
||||
local client = item.player
|
||||
|
||||
if (!client:Alive()) then return false end
|
||||
client:EmitSound("physics/cardboard/cardboard_box_break3.wav")
|
||||
|
||||
client.previousWep = client:GetActiveWeapon():GetClass()
|
||||
client:Give("weapon_turret_placer")
|
||||
client:SelectWeapon("weapon_turret_placer")
|
||||
|
||||
return true
|
||||
end,
|
||||
OnCanRun = function(item)
|
||||
return (!IsValid(item.entity))
|
||||
end
|
||||
}
|
||||
15
gamemodes/ixhl2rp/plugins/combinedeployables/sh_plugin.lua
Normal file
15
gamemodes/ixhl2rp/plugins/combinedeployables/sh_plugin.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
local PLUGIN = PLUGIN
|
||||
|
||||
PLUGIN.name = "Combine Deployables"
|
||||
PLUGIN.author = "JohnyReaper"
|
||||
PLUGIN.description = "Deployables for the Combine factions! (For Willard Networks)"
|
||||
Reference in New Issue
Block a user