Update mute.lua

This commit is contained in:
[MEF] мехроб 2024-11-22 18:27:50 +03:00 committed by GitHub
parent 62e4ffb1ba
commit b6144d6632
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
--@name mute
--@author NiKoT1n
--@author cool_bro
--@shared
--[[
Blocks player messages (for yourself only)
@ -16,7 +16,7 @@ if SERVER then
local players
local name
local finded
hook.add("PlayerSay","tp",function(ply,text)
hook.add("PlayerSay","mute",function(ply,text)
if ply == owner() and string.explode(" ",text)[1] == "mute" then
players = find.allPlayers()
name = string.explode(" ",text)[2]
@ -30,6 +30,7 @@ local finded
net.send(ply)
end
end
print(player:getName().." muted")
return ""
end
if ply == owner() and string.explode(" ",text)[1] == "unmute" then
@ -45,6 +46,7 @@ if ply == owner() and string.explode(" ",text)[1] == "unmute" then
net.send(ply)
end
end
print(player:getName().." unmuted")
return ""
end
end)