Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- <talkaction words="/mute" separator=" " script="mute.lua" />
- ]]
- local config = {
- whitelist = {
- 'rotanev', 'nonseq'
- },
- time = 1, -- tempo em minutos
- }
- local muted = Condition(CONDITION_MUTED)
- muted:setParameter(CONDITION_PARAM_TICKS, config.time * 60 * 1000)
- function onSay(player, words, param)
- local found = false
- for _, name in ipairs(config.whitelist) do
- if player:getName():lower() == name:lower() then
- found = true
- break
- end
- end
- if not found then
- return false
- end
- local target = Player(param)
- if not target then
- player:sendTextMessage(MESSAGE_STATUS_WARNING, "Player not found.")
- else
- target:addCondition(muted)
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement