This commit is contained in:
lifestorm
2024-08-04 23:54:45 +03:00
parent 8064ba84d8
commit 6a58f406b1
7522 changed files with 4011896 additions and 15 deletions

View File

@@ -0,0 +1,104 @@
--[[
| 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 = "Xen Crystal"
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/hunter/triangles/1x1x2carved025.mdl")
self:SetNoDraw(true)
self:DrawShadow(false)
self:PhysicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self:SetUseType(SIMPLE_USE)
self.health = 200
self.barricadeEnt = ents.Create("sent_vj_xen_crystal")
self.barricadeEnt:SetPos(self:GetPos())
self.barricadeEnt:SetAngles(self:GetAngles())
self.barricadeEnt:Spawn()
self.barricadeEnt:Activate()
self.barricadeEnt:SetNetVar("Persistent", true)
self.barricadeEnt:DeleteOnRemove( self )
self.barricadeEnt:EmitSound("vj_hlr/fx/alien_cycletone.wav", 200, 100, 5)
local physObj = self:GetPhysicsObject()
if (IsValid(physObj)) then
physObj:EnableMotion(false)
physObj:Sleep()
end
end
function ENT:Think()
for _, ent in pairs(ents.FindInSphere(self:GetPos(), 500)) do
if ent:IsPlayer() then
local character = ent:GetCharacter()
local faction = character:GetFaction()
if faction == FACTION_VORT then
ent:ChatNotify("Kristal garip bir enerji yayıyor, kendinizi yeniden canlanmış hissediyorsunuz...")
character:AddVortalEnergy(20)
if ent:Health() < ent:GetMaxHealth() then
ent:SetHealth(ent:Health() + 2)
end
ent:ScreenFade(SCREENFADE.IN, Color(50, 255, 0, 80), 1, 1)
else
ent:ChatNotify("Kristal garip bir enerji yayıyor...")
ent:ScreenFade(SCREENFADE.IN, Color(255, 255, 0, 100), 1, 1)
end
end
end
self:NextThink(CurTime() + 10)
return true
end
function ENT:OnTakeDamage(damage)
self.health = self.health - damage:GetDamage()
self:EmitSound("physics/glass/glass_bottle_break"..math.random(1, 2)..".wav")
if (self.health <= 0) and self.isDestroyed != true then
self:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
self.isDestroyed = true
for i, ply in ipairs(player.GetAll()) do
ply:ChatNotify("Kristal parçalanıyor ve yerden yükselen bir enerji dalgası hissediliyor...")
end
startGravityEvent()
self:Remove()
end
end
function ENT:OnRemove()
if IsValid(self.barricadeEnt) then
self.barricadeEnt:Remove()
end
self:StopSound("vj_hlr/fx/alien_cycletone.wav")
end
end

View File

@@ -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 = "Crystal 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_xencrystal"
SWEP.BarricadePlace = nil
SWEP.PreviewModel = "models/vj_hlr/hl1/crystal.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()
barricadeEnt:EmitSound("vj_hlr/fx/alien_cycletone.wav", 60, 100, 0.5)
if (self.Owner.previousWep) then
self.Owner:SelectWeapon(self.Owner.previousWep)
self.Owner.previousWep = nil
end
self:Remove()
end
end
end
end
function SWEP:SecondaryAttack()
if (SERVER) then
local char = self.Owner:GetCharacter()
local inventory = char:GetInventory()
inventory:Add("xen_crystal")
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

View File

@@ -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.uniqueID = "xen_crystal"
ITEM.name = "Xen Kristali"
ITEM.description = "Komşu XMZ'nin derinliklerinden gelen bir Xen Kristali, kayda değer bir parıltıya ve sessiz bir uğultuya sahip. Sağlam bir his veriyor; muhtemelen güçlü darbelere dayanabilecek kapasitede. Seni daha güçlü kılacak özel bir güce sahip."
ITEM.model = Model("models/vj_hlr/hl1/crystal.mdl")
ITEM.noBusiness = true
ITEM.width = 2
ITEM.height = 2
ITEM.functions.place = {
name = "Yerleştir",
tip = "Kristali Yerleştir",
icon = "icon16/brick_add.png",
OnRun = function(item)
local client = item.player
if (!client:Alive()) then return false end
client.previousWep = client:GetActiveWeapon():GetClass()
client:Give("weapon_crystal_placer")
client:SelectWeapon("weapon_crystal_placer")
return true
end,
OnCanRun = function(item)
return (!IsValid(item.entity))
end
}

View File

@@ -0,0 +1,23 @@
--[[
| 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/
--]]
PLUGIN.name = "EventManager"
PLUGIN.author = "Enistein"
PLUGIN.description = "Event related stuff."
ix.util.Include("sv_hooks.lua")
ix.command.Add("gravityevent", {
description = "Manuel olarak yerçekimi eventini başlatır.",
adminOnly = true,
OnRun = function()
startGravityEvent()
end
})

View File

@@ -0,0 +1,44 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
gravityEventStarted = false
function startGravityEvent()
if gravityEventStarted then return end
gravityEventStarted = true
print("Gravity event başlatıldı.")
util.ScreenShake(Vector(0, 0, 0), 5, 3, 10, 9999999, true)
net.Start("ixPlaySound")
net.WriteString("event/gravitystart.mp3")
net.WriteBool(true)
net.Send(player.GetAll())
timer.Simple(5, function()
ix.chat.Send(nil, "broadcast", "<:: Dikkat! Manyetik alan dalgalanması tespit edildi. Kapalı bir alana girmeniz şiddetle tavsiye edilir! ::>", false, nil, {speakerName = "Citadel"})
end)
timer.Simple(20, function()
RunConsoleCommand("sv_gravity", "-1")
util.ScreenShake(Vector(0, 0, 0), 6, 3, 15, 9999999, true)
ix.chat.Send(nil, "broadcast", "<:: Manyetik alan bozulması! Bastırıcı konuşlandırılıyor... ::>", false, nil, {speakerName = "Citadel"})
local players = player.GetAll()
for i = 1, #players do
local ply = players[i]
if ply:Alive() then
ply:ScreenFade(SCREENFADE.IN, Color(0, 5, 25, 200), 2, 0)
ply:SetPos(ply:GetPos() + Vector(0,0,5))
ply:SetVelocity(Vector(0,0,50))
end
end
end)
timer.Simple(35, function()
RunConsoleCommand("sv_gravity", "600")
ix.chat.Send(nil, "broadcast", "<:: Bastırıcı aktif. Sorunun kaynağı tespit edilemedi. ::>", false, nil, {speakerName = "Citadel"})
gravityEventStarted = false
end)
end