DedicatedOT
New Member
How do you mute?
<talkaction filter="word" log="no" access="3" words="!mute" script="mute.lua"/>
--Adam 2008
--Goosio OT
--Original Credits
local condition = createConditionObject(CONDITION_MUTED)
setConditionParam(condition, CONDITION_PARAM_TICKS, 300*1000) -- 10*1000 is 10 seconds.
function onSay(cid, words, param)
player = getPlayerByName(param)
if getPlayerGroupId(cid) > 2 then
if player > 1 then
doAddCondition(player, condition)
else
doPlayerSendCancel(cid, "That player is not online.")
end
else
doPlayerSendCancel(cid, "You cannot execute this command.")
end
end
Doesn't work.
access="3"
Heh, the bad worksman always blame his tools.
local condition = createConditionObject(CONDITION_MUTED)
local minutes =
{
["1"] = {count = setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 60000)},
["3"] = {count = setConditionParam(condition, CONDITION_PARAM_TICKS, 3 * 60000)},
["5"] = {count = setConditionParam(condition, CONDITION_PARAM_TICKS, 5 * 60000)}
}
function onSay(cid, words, param)
local player = getPlayerByName(param)
if getPlayerGroupId(cid) > 2 then
if player == TRUE then
doAddCondition(player, condition, minutes[param].count)
else
doPlayerSendCancel(cid, "That person is not online.")
end
else
doPlayerSendCancel(cid, "You cannot execute this command.")
end
return TRUE
end
Crazy Idea, probably will not work.
Lua:local condition = createConditionObject(CONDITION_MUTED) local minutes = { ["1"] = {count = setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 60000)}, ["3"] = {count = setConditionParam(condition, CONDITION_PARAM_TICKS, 3 * 60000)}, ["5"] = {count = setConditionParam(condition, CONDITION_PARAM_TICKS, 5 * 60000)} } function onSay(cid, words, param) local player = getPlayerByName(param) if getPlayerGroupId(cid) > 2 then if player == TRUE then doAddCondition(player, condition, minutes[param].count) else doPlayerSendCancel(cid, "That person is not online.") end else doPlayerSendCancel(cid, "You cannot execute this command.") end return TRUE end
Cool Idea, I can't get it to work.
Reloaded talk actions, double, triple checked the script.
Ehh maybe it's just me
CLARIFICATION:
THESE ARE THE EXACT WORDS YOU SAY IN-GAME!
18:55 Red [1337]: !mute "Shawak
That will mute him for 5 minutes, as it is configured for 5 minutes in the LUA. Trying to be as blunt and clear as possible <_<
Red