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,74 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
PLUGIN.name = "Stealth"
PLUGIN.author = "Aspect™"
PLUGIN.description = "Adds several stealth-related features."
ix.util.Include("meta/sv_entity.lua")
ix.util.Include("cl_plugin.lua")
ix.util.Include("sv_hooks.lua")
ix.chat.Register("mev", {
format = "*** %s %s",
color = Color(128, 128, 128, 255),
CanHear = function(self, speaker, listener)
if (speaker:GetEyeTraceNoCursor().Entity == listener or speaker == listener) then
return true
else
local trace = {}
trace.mask = CONTENTS_SOLID + CONTENTS_MOVEABLE + CONTENTS_OPAQUE + CONTENTS_DEBRIS + CONTENTS_HITBOX + CONTENTS_MONSTER
trace.start = listener:LocalToWorld(listener:OBBCenter())
trace.endpos = speaker:GetShootPos()
trace.filter = {listener, speaker}
trace = util.TraceLine(trace)
if (trace.Fraction >= (0.75)) then
return true
end
end
return false
end,
prefix = {"/MeV"},
description = "@cmdMev",
indicator = "chatPerforming"
})
ix.chat.Register("sv", {
format = "*** %s motions \"%s\"",
color = Color(128, 128, 128, 255),
CanHear = function(self, speaker, listener)
if (speaker:GetEyeTraceNoCursor().Entity == listener or speaker == listener) then
return true
else
local trace = {}
trace.mask = CONTENTS_SOLID + CONTENTS_MOVEABLE + CONTENTS_OPAQUE + CONTENTS_DEBRIS + CONTENTS_HITBOX + CONTENTS_MONSTER
trace.start = listener:LocalToWorld(listener:OBBCenter())
trace.endpos = speaker:GetShootPos()
trace.filter = {listener, speaker}
trace = util.TraceLine(trace)
if (trace.Fraction >= (0.75)) then
return true
end
end
return false
end,
prefix = {"/SV"},
description = "@cmdSV",
indicator = "chatPerforming"
})