у меня адон стоит на репорты, хочу сделать чат на @@ , я там нашел файлик, там где чат админский поставил две собачки перестало писать в чат админский просит через команду !aesey шо делать
смысл тогда от adm-chat, если есть тот-же sh reports, где тоже есть чат, вроде…,
короче, так надо вводить, ибо на SAM стоит тупо приставка “!” или “/”, поэтому тупо вставь вместо
command.new(“asay”) вот это, и не забудь про самую нижнюю строчку, про то, если чел ввел эту команду
command.new("@@")
:SetPermission("@@", "user")
:AddArg("text", {hint = "message"})
:GetRestArgs()
:Help("asay_help")
:OnExecute(function(ply, message)
if reports_enabled.value and not ply:HasPermission("see_admin_chat") then
local success, time = sam.player.report(ply, message)
if success == false then
ply:sam_send_message("You need to wait {S Red} seconds.", {
S = time
})
else
ply:sam_send_message("to_admins", {
A = ply, V = message
})
end
return
end
local targets = {ply}
local players = player.GetHumans()
for i = 1, #players do
local v = players[i]
if v:HasPermission("see_admin_chat") and v ~= ply then
table.insert(targets, v)
end
end
sam.player.send_message(targets, "to_admins", {
A = ply, V = message
})
end)
:End()
if SERVER then
sam.hook_last("PlayerSay", "SAM.Chat.Asay", function(ply, text)
if text:sub(1, 1) == "@" then
ply:Say("@@ " .. text:sub(2))
return ""
end
end)
end
end
вводишь через “!”
garrysmod\addons\sam-153\lua\sam\modules\chat.lua
поэтому лучше оставить asay, ну прикинь, чел пишет “!@@ хелп” чтобы написать в адм-чат