Search the Community
Showing results for tags 'mute player'.
-
Hi, i want to make a custom mute system, i tried a weeks ago. Can anybody give me "functions" what i need? i want to make like this: mute player for x y minutes with reason like /mute bignick 50 Test
-
Hello guys. I made a script, which is mute player for x minutes. The script is working, but not unmute the player after the timer. Here is the script: addCommandHandler("muteplayer", function(player, cmd, name, minutes, ...) if (tonumber(getElementData(player, "account:admin")) >= 2) then local message = table.concat({ ... }, " ") if name and minutes then if tonumber(minutes) then if tonumber(minutes) > 0 then local target = exports.serverExport:findPlayer(name, player) if target then if message and #message > 0 then outputChatBox("#DC143C[Mute]:#7CC576 "..getPlayerName(target).." #ffffff has been muted by #7CC576"..getPlayerName(player).."#ffffff. #7CC576("..minutes.." Minutes)", cRoot, 255, 0, 0, true) outputChatBox("#DC143C[Mute]:#7CC576 Reason:#ffffff "..tostring(message), cRoot, 255, 0, 0, true) setPlayerMuted(target, true) setPlayerMuted(target, true, false, true, player, message, minutes * 60) else outputChatBox("#DC143C[Mute]:#6CB8FD "..getPlayerName(target).."#ffffff has been muted by #6CB8FD"..getPlayerName(player).."#ffffff. #7CC576("..minutes.." Minutes)", cRoot, 255, 0, 0, true) setPlayerMuted(target, true) setPlayerMuted(target, true, false, true, player, nil, minutes * 60) -- if no reason end else outputChatBox("Player not found.", player, 255, 0, 0, true) end else end else outputChatBox("Only numbers", player, 255, 0, 0, true) end else outputChatBox("/" ..cmd .. " [Player] [Minutes] [Reason]", player, 220, 220, 0, true) end else outputChatBox("You dont have permission.", player, 255, 255, 255,true) end end ) Whats the problem? Thanks any help!