add sborka

This commit is contained in:
2026-03-31 10:27:04 +03:00
commit f5e5f56c84
2345 changed files with 382127 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
net.Receive("AnnounceMessage", function()
local msg = net.ReadString()
chat.AddText(Color(255, 0, 0), msg)
end)
local eventText = ""
local eventTime = 0
net.Receive("EventMessage", function()
eventText = net.ReadString()
eventTime = CurTime() + 5 -- show for 5 seconds
end)
function PLUGIN:HUDPaint()
if CurTime() < eventTime then
surface.SetFont("ixBigFont")
local w, h = surface.GetTextSize(eventText)
surface.SetTextColor(255, 255, 255)
surface.SetTextPos(ScrW() / 2 - w / 2, 50)
surface.DrawText(eventText)
end
end

View File

@@ -0,0 +1,6 @@
PLUGIN.name = "Event Announce"
PLUGIN.author = "Scripty"
PLUGIN.description = "/event /annonce"
ix.util.Include("sv_plugin.lua")
ix.util.Include("cl_plugin.lua")

View File

@@ -0,0 +1,21 @@
util.AddNetworkString("EventMessage")
util.AddNetworkString("AnnounceMessage")
function PLUGIN:PlayerSay(ply, text)
local userGroup = ply:GetUserGroup() or ""
if userGroup == "superadmin" or userGroup == "ivent" then
if string.StartWith(text, "/event ") then
local msg = string.sub(text, 8)
net.Start("EventMessage")
net.WriteString(msg)
net.Broadcast()
return ""
elseif string.StartWith(text, "/annonce ") then
local msg = string.sub(text, 10)
net.Start("AnnounceMessage")
net.WriteString(msg)
net.Broadcast()
return ""
end
end
end