• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua " !mute someone " on help channel

Aly Joker

Designer / Developer
Joined
Aug 2, 2010
Messages
104
Reaction score
1
I want to active this "!mute someone" command in help channel so that I can mute spammers

Is there anybody to help?

THanks

Regards
 
there is 2 ways to do that first way is by channels
go to xml>channels

Lua:
muted="120" conditionId="2"
and add it to help channel---Note----- Don't forget to change the conditionid to 4
it will look like this
Lua:
<channel id="9" name="Help" level="8" muted="120" conditionId="4" conditionMessage="You Are Muted.">
OR By
http://otland.net/f16/script-mute-x-player-y-time-help-channel-100771/
or Test this script
don't forget to use condition id =4 or it won't WORK

Lua:
function onSay(cid, words, param, channel)
	if(param == '') then
		doPlayerSendTextMessage(cid, 21, "explaining the talkaction")
		return true
	end

	local t = string.explode(param, ",")
	player = getPlayerByName(t[1])
	local condition = createConditionObject(CONDITION_MUTED)
	
	if(not t[2] or t[2] == '') then
		doPlayerSendTextMessage(cid, 21, "explaining the talkaction")
	end
	
	if t[2] then
		time = tonumber(t[2]*1000) -- 10*1000 is 10 seconds.
		if(isPlayer(player) == TRUE and getPlayerGroupId(cid) > getPlayerGroupId(player) and getPlayerFlagValue(player, PLAYERFLAG_CANNOTBEMUTED) == false) then
			setConditionParam(condition, CONDITION_PARAM_TICKS, time)
                        setConditionParam(condition, CONDITION_PARAM_SUBID, 4)
			doAddCondition(player, condition)
			doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, "You have been muted by " .. getPlayerName(cid) .. " for " .. t[2] .. " seconds.")
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(player) .. " has been muted for " .. t[2] .. " seconds.")
		else
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " is not currently online or cannot be muted.")
		end
	end
	
	return true
end
 
Last edited:
it won't work, tested some time ago and all scripts don't work, you must mute condition_id, like it's done with trade channel in c++
 
Thanks guys, I will try both at once :D

Edit :

Tried both and nothing works

- - - Updated - - -

Bump

- - - Updated - - -

Nobody to help?
 
Back
Top