Disable PM's for Muted Users

This commit is contained in:
PixeL 2017-10-30 23:25:50 -05:00
parent 10cb7bdf36
commit 98bb22486f
No known key found for this signature in database
GPG Key ID: 7D996B98EC0EC511

View File

@ -3,6 +3,11 @@ CATEGORY_NAME = "Chat"
------------------------------ Psay ------------------------------
function ulx.psay( calling_ply, target_ply, message )
if calling_ply:GetNWBool('ulx_muted', false) then
ULib.tsayError( calling_ply, "You are muted, and therefore cannot speak!", true )
return
end
ulx.fancyLog( { target_ply, calling_ply }, "#P to #P: " .. message, calling_ply, target_ply )
end
local psay = ulx.command( CATEGORY_NAME, "ulx psay", ulx.psay, "!p", true )