TalkAction Mute script.

WibbenZ

Global Moderator
Staff member
Global Moderator
Joined
Oct 16, 2008
Messages
6,210
Best answers
224
Reaction score
1,168
Location
Sweden
Well its no hard but on a ot I play sometimes guys some and like

Join us osfjsof.servegame.com FAST free cash..


If you dont like it dont post :p

Lua:
function onSay(cid, words, param, channel)
	       local config = {
	    local pid = 40000  
            local u = 2040			
}
		if getPlayerGroupId(cid, <= 3) then
	doMutePlayer(cid, config.pid)
			doCreatureSay(cid,getPlayerName(cid), getPlayerPosition(cid))
		doPlayerGiveItem(cid,..u..,1)
					     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have muted getPlayerTarget(cid), Thanks for helping getPlayerName(cid,)")
	doSendMagicEffect(getPlayerPosition(cid)(itemEx.uid), CONST_ME_MAGIC_BLUE)
			end
    else
        doPlayerSendCancel(cid, "You must hit a target!")
			doSendMagicEffect(getPlayerPosition(cid)(itemEx.uid), CONST_ME_POFF)
    end
    return TRUE
end

lets a player with group id 3+ mute a play for 40000 sec
only becouse they are boring xD

and it will say You must hit a target if he dosent find a player.

Thanks for helping wibbenz......

rep++
/wibbenz
 

Grehy

Killroy
Joined
Nov 21, 2008
Messages
2,628
Best answers
0
Reaction score
30
Location
United States
o.0

if getPlayerGroupId(cid, <= 3) then

not needed? why not set configurable time? theres already a script released here for this soooo
 

Hermes

dziwki kola gramy w lola
Joined
Nov 17, 2007
Messages
1,867
Best answers
0
Reaction score
12
Location
Poland
Your script won't even work. I have people that are releasing sh*t. And not tested sh*t.
Code:
function onSay(cid, words, param, channel)
	if param == "" then
		doPlayerSendCancel(cid, "Command requires param!")
		return true
	end
	local c = {}
	c.time = 20
	c.player = getPlayerNameByWildcard(param)
	
	doMutePlayer(c.player, c.time)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have muted " .. c.player)
	return true
end
 

Cykotitan

Experienced G'
Joined
Nov 4, 2008
Messages
16,894
Best answers
4
Reaction score
817
Your script won't even work. I have people that are releasing sh*t. And not tested sh*t.
Code:
function onSay(cid, words, param, channel)
	if param == "" then
		doPlayerSendCancel(cid, "Command requires param!")
		return true
	end
	local c = {}
	c.time = 20
	c.player = getPlayerNameByWildcard(param)
	
	doMutePlayer(c.player, c.time)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have muted " .. c.player)
	return true
end
doMutePlayer doesn't work.
 

Hermes

dziwki kola gramy w lola
Joined
Nov 17, 2007
Messages
1,867
Best answers
0
Reaction score
12
Location
Poland
Hm, it's included in docs.
 

Cykotitan

Experienced G'
Joined
Nov 4, 2008
Messages
16,894
Best answers
4
Reaction score
817
Code:
function doMutePlayer(cid, time)
[B][COLOR="Red"]	local condition = createConditionObject(CONDITION_MUTED)
	setConditionParam(condition, CONDITION_PARAM_TICKS, time * 1000)[/COLOR][/B]
	return doAddCondition(cid, condition)
end
Can't do this inside functions.
 

hepy

New Member
Joined
Aug 15, 2007
Messages
217
Best answers
0
Reaction score
1
can you make it that if i use /mute player, he gets muted until i use /desmute player?
thanks
 
OP
WibbenZ

WibbenZ

Global Moderator
Staff member
Global Moderator
Joined
Oct 16, 2008
Messages
6,210
Best answers
224
Reaction score
1,168
Location
Sweden
getPlayerNameByWildcard(param)
 
Top