This commit is contained in:
lifestorm
2024-08-04 22:55:00 +03:00
parent 0e770b2b49
commit 94063e4369
7342 changed files with 1718932 additions and 14 deletions

View File

@@ -0,0 +1,39 @@
--[[
| 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/
--]]
--
-- Make command notifying only for ranks you select.
-- permission is command_notify. (by default admin+ has it)
-- You can NOT use this with 'command_hide_admin_name.lua'
--
if SAM_LOADED then return end
sam.permissions.add("command_notify", nil, "admin")
if SERVER then
local get_players = function()
local players = {}
for _, v in ipairs(player.GetAll()) do
if v:HasPermission("command_notify") then
table.insert(players, v)
end
end
return players
end
sam.player.old_send_message = sam.player.old_send_message or sam.player.send_message
function sam.player.send_message(ply, msg, tbl)
if ply == nil and debug.traceback():find("lua/sam/command/", 1, true) then
sam.player.old_send_message(get_players(), msg, tbl)
else
sam.player.old_send_message(ply, msg, tbl)
end
end
end