Forum

> > CS2D > Scripts > Requesting mute script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Requesting mute script

17 replies
To the start Previous 1 Next To the start

old Requesting mute script

dizziness
User Off Offline

Quote
Hello, everyone can you help me? How to make a mute script and the muted player the usgn will be saved in folder files

If you want help me more deep (I mean make me more easier to do the lua script, please write the cmd like this)
1
2
3
4
5
6
7
if cmd == "!mute" then
		    local pl = tonumber(p[2])
			if pl ~= nil then
				if player(pl,"exists") then
(I confused what i must write on this line lua script)
				end
			end
1
2
3
4
5
6
7
if cmd == "!unmute" then
		    local pl = tonumber(p[2])
			if pl ~= nil then
				if player(pl,"exists") then
(I confused what i must write on this line lua script)
				end
			end

I very appreciate for the who are helping me, thank you
edited 1×, last 20.06.11 05:40:40 pm

old Re: Requesting mute script

EngiN33R
Moderator Off Offline

Quote
Wait, do you want the player to be muted for you or for everyone? If for everyone, then:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ismuted={}
for id=1,32 do
ismuted[id]=false
end

addhook("say","muteply")
function muteply(id,t)
	if (t:sub(1,5)=="!mute") then
		local mid=tonumber(t:sub(6))
		ismuted[mid]=true
	end
	if (ismuted[id]) then
		return 1
	end
end

You'll modify it for your needs, I'm sure.

old Re: Requesting mute script

EnderCrypt
User Off Offline

Quote
no he meant so he could say !mute <id> or unmute
and usgn are saved on file
btw i alredy made 1, if it doesent work...

old Re: Requesting mute script

dizziness
User Off Offline

Quote
user EngiN33R has written
Wait, do you want the player to be muted for you or for everyone? If for everyone, then:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ismuted={}
for id=1,32 do
ismuted[id]=false
end

addhook("say","muteply")
function muteply(id,t)
	if (t:sub(1,5)=="!mute") then
		local mid=tonumber(t:sub(6))
		ismuted[mid]=true
	end
	if (ismuted[id]) then
		return 1
	end
end

You'll modify it for your needs, I'm sure.


I already have global mute but some player on my server saying it not useful or I can say it make my server more malformation. I can make global mute but I cannot make single mute with saved files -.-!

old Re: Requesting mute script

kalis
User Off Offline

Quote
You must add Array i think you have
1
2
3
4
5
6
7
function Array(size,value)
	local array = {}
	for i = 1, size do
		array[i]=value
	end
	return array
end
1
mute = Array(32,0)
here mute lua :
here command !mute <id>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
addhook("say","report_say")
function report_say(id,txt)
	local p = totable(txt)
	local cmd = tostring(p[1])
	if cmd == "!mute" or cmd == "@mute" then
		if rp_Adminlevel[id]>=2 then
			local get_spec = tonumber(p[2])		
			local time = tonumber(p[3])	
			if player(get_spec,"exists") and time ~= nil then
				mute[get_spec] = time * 60
				msg('©160160160'..player(id,'name')..' used @mute '..time..' minute '..player(get_spec,'name'))
			end
		end
	elseif cmd == "!unmute" or cmd == "@unmute" then
		if rp_Adminlevel[id]>=2 then
			local get_spec = tonumber(p[2])		
			if player(get_spec,"exists") then
				mute[get_spec] = 0
				msg('©160160160'..player(id,'name')..' used @unmute on '..player(get_spec,'name'))
			end
		return 1
		end
	end			
end

here is Block player , player cant chat
1
2
3
4
5
6
7
8
addhook("say","say")
function say(id,txt)
if time_mute[id]>= 1 then
	msg2(id,'©170255000 '..player(id,'name')..' Got Muted ')
	msg2(id,'©170255000 '..player(id,'name')..' can say after '..time_mute[id])
	return 1
end
end

here : Time Mute Work
1
2
3
4
5
6
7
8
9
10
11
addhook("second","second")
function second()
	for id = 1,32 do
		if time_mute[id] >= 1 then
			time_mute[id] = time_mute[id] -1
		end
		if time_mute[id] == 0 then
			time_mute[id] = 0
		end
	end
end
sorry i bad english but i think my lua work =.=
if have any error PM me

old Re: Requesting mute script

EngiN33R
Moderator Off Offline

Quote
heocon953 has written
here mute lua :
here command !mute <id>


Where did you take that part from? You clearly didn't write it yourself, you didn't even care to remove the undeclared
1
rp_Adminlevel
variable(s) from the code.

@OP
So you want the script to mute a player for only one player?

E.g. if there are three players - me, A and B, if I mute A then I won't be able to hear him while B will be?

If so, then you'll have to convert every message into msg2 addressed to all players on the server except the ones that have the player who wrote muted. return 1 is global.

old Re: Requesting mute script

Time
User Off Offline

Quote
More like an ignore system rather than mute, this is proof of what a misleading title can do..

old Re: Requesting mute script

dizziness
User Off Offline

Quote
user EngiN33R has written
heocon953 has written
here mute lua :
here command !mute <id>


Where did you take that part from? You clearly didn't write it yourself, you didn't even care to remove the undeclared
1
rp_Adminlevel
variable(s) from the code.

@OP
So you want the script to mute a player for only one player?

E.g. if there are three players - me, A and B, if I mute A then I won't be able to hear him while B will be?

If so, then you'll have to convert every message into msg2 addressed to all players on the server except the ones that have the player who wrote muted. return 1 is global.


Answear 1: I think kalis take that script from his tibia lua script and little edit
Answear 2: Yes, I want mute only 1 player each command action, I want everyone cannot hear the muted player, I think you (EngiN33R) is a proffesional scripter so can you make the mute lua script in this file ?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
function ParseAdminCommand(id,txt)
	local p = totable(txt)
	local cmd = tostring(p[1])
	if rp_Adminlevel[id]>=2 then
		if cmd =="!save" then
			if rp_Adminlevel[id]>=3 then
				for id = 1,32 do
					if player(id,"exists") then
						local UsgnID = UsgnIds[id]
						if UsgnID > 0 then
							SaveUserStat(id,UsgnID)
						end
					end
				end
				rp_msg2(id,"000255000","SAVE OK!")
			else
				admlevelmsg(id)
			end
		elseif cmd =="!money" then
			if rp_Adminlevel[id]>=3 then
				local pl = tonumber(p[2])
				local money = tonumber(p[3])
				if pl ~= nil and money ~= nil then
					if player(pl,"exists") then
						rp_money[pl]=rp_money[pl]+money
						rp_msg2(pl,"000255000",player(id,"name").." Gave you "..money.." of money!")
						rp_msg2(id,"000255000","You gave "..money.." to "..player(pl,"name"))
						updatehud(pl)
					end
				end
			else
				admlevelmsg(id)
			end
		elseif cmd == "!set" then
			if rp_Adminlevel[id]>=3 then
				local pl = tonumber(p[2])
				local item = tonumber(p[3])
				if (pl ~= nil) and (item~=nil) then
					if player(pl,"exists") then
						Addons[item].FLic[pl]=1
						rp_msg2(id,"000255000","You Give "..Addons[item].FName.." Add-ons to "..player(pl,"name"))
						rp_msg2(pl,"000255000","You have "..Addons[item].FName.." Add-ons now, F3!")
					end
				end
			else
				admlevelmsg(id)
			end
		elseif cmd == "!remove" then
			if rp_Adminlevel[id]>=3 then
				local pl = tonumber(p[2])
				if pl ~= nil then
					if player(pl,"exists") then
						InternalFreeImage(pl)
						SetAddons(pl,0)
						rp_msg2(id,"000255000","You Remove all the Add-ons belong to "..player(id,"name"))
						rp_msg2(pl,"000255000","You lose all the Add-ons belong to you")
					end
				end
			else
				admlevelmsg(id)
			end
		elseif cmd == "!ban" then
			if rp_Adminlevel[id]>=3 then
				local pl = tonumber(p[2])
				if pl ~= nil then
					if player(pl,"exists") then
						local ip = player(pl, "ip")
						local usgn = player(pl, "usgn")
						if ip then
							parse("banip "..ip)
						end
						if usgn then
							parse("banusgn "..usgn)
						end
					end
				end
			else
				admlevelmsg(id)
			end
		elseif cmd == "!vip" then
			if rp_Adminlevel[id]>=3 then
				local pl = tonumber(p[2])
				if pl ~= nil then
					if player(pl,"exists") then
						rp_license[pl]=2
						rp_msg2(id,"000255000","You Give VIP to "..player(pl,"name"))
						rp_msg2(pl,"000255000","You are VIP User Now")
					end
				end
			else
				admlevelmsg(id)
			end
		elseif cmd =="!arrest" then
			local pl = tonumber(p[2])
			local cell = tonumber(p[3])
			if pl ~= nil then
				if player(pl,"exists") then
					if cell == 1 then
						parse("setpos "..pl.." "..Config.AP[1][1].." "..Config.AP[1][2])
					elseif cell == 2 then
						parse("setpos "..pl.." "..Config.AP[2][1].." "..Config.AP[2][2])
					elseif cell == 3 then
						parse("setpos "..pl.." "..Config.AP[3][1].." "..Config.AP[3][2])
					end
					rp_arrest[pl]=true
				end
			end
		elseif cmd =="!free" then
			local pl = tonumber(p[2])
			if pl ~= nil then
				if player(pl,"exists") then
					rp_arrest[pl]=false
					parse("setpos "..pl.." "..Config.FP[1].." "..Config.FP[2])
				end
			end
		elseif cmd =="!bring" then
			local pl = tonumber(p[2])
			if pl ~= nil then
				if player(pl,"exists") then
					parse("setpos "..pl.." "..player(id,"x").." "..player(id,"y"))
				else
					rp_msg2(id,"255000000","This player does not exist!")
				end
			end
		elseif cmd == "!goto" then
			local pl = tonumber(p[2])
			if pl ~= nil then
				if player(pl,"exists") then
					parse("setpos "..id.." "..player(pl,"x").." "..player(pl,"y"))
				else
					rp_msg2(id,"255000000","This player does not exist!")
				end
			end
		elseif cmd == "!kick" then
			local pl = tonumber(p[2])
			if pl ~= nil then
				if player(pl,"exists") then
					parse("kick "..pl)
				end
			end
		elseif cmd == "!info" then
		    local pl = tonumber(p[2])
			if pl ~= nil then
				if player(pl,"exists") then
				    rp_msg2(id,"000255000","This player internet protocol "..player(pl,"ip"))
				    rp_msg2(id,"000255000","This player name "..player(pl,"name"))
					rp_msg2(id,"000255000","This player unreal software gaming network "..player(pl,"usgn"))
				end
			end
		else
			rp_msg2(id,"255000000","Unknown Command !")
		end
	else
		admlevelmsg(id)
	end
end

old Re: Requesting mute script

kalis
User Off Offline

Quote
user EngiN33R has written
heocon953 has written
here mute lua :
here command !mute <id>


Where did you take that part from? You clearly didn't write it yourself, you didn't even care to remove the undeclared
1
rp_Adminlevel
variable(s) from the code.

@OP
So you want the script to mute a player for only one player?

E.g. if there are three players - me, A and B, if I mute A then I won't be able to hear him while B will be?

If so, then you'll have to convert every message into msg2 addressed to all players on the server except the ones that have the player who wrote muted. return 1 is global.

little child use city life lua
1
rp_Adminlevel
already have in array
little child want only mute a player
city life lua have system mute(can mute all player )
@little chirld
yes i take it in my lua and it work !

here fixed lua :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
function ParseAdminCommand(id,txt)
	local p = totable(txt)
	local cmd = tostring(p[1])
	if rp_Adminlevel[id]>=2 then
		if cmd =="!save" then
			if rp_Adminlevel[id]>=3 then
				for id = 1,32 do
					if player(id,"exists") then
						local UsgnID = UsgnIds[id]
						if UsgnID > 0 then
							SaveUserStat(id,UsgnID)
						end
					end
				end
				rp_msg2(id,"000255000","SAVE OK!")
			else
				admlevelmsg(id)
			end           
		elseif cmd =="!money" then
			if rp_Adminlevel[id]>=3 then
				local pl = tonumber(p[2])
				local money = tonumber(p[3])
				if pl ~= nil and money ~= nil then
					if player(pl,"exists") then
						rp_money[pl]=rp_money[pl]+money
						rp_msg2(pl,"000255000",player(id,"name").." Gave you "..money.." of money!")
						rp_msg2(id,"000255000","You gave "..money.." to "..player(pl,"name"))
						updatehud(pl)
					end
				end
			else
				admlevelmsg(id)
			end
   		elseif cmd == "!mute" then
			if rp_Adminlevel[id]>=2 then
			local pl = tonumber(p[2])          
               		local time = tonumber(p[3])     
              			if player(pl,"exists") and time ~= nil then
                   			time_mute[pl] = time * 60
                    			msg('©160160160'..player(id,'name')..' used @mute '..time..' minute '..player(pl,'name'))
               			end
			else
				admlevelmsg(id)
			end
   		elseif cmd == "!unmute" then
			if rp_Adminlevel[id]>=2 then
               		local pl = tonumber(p[2])          
               			if player(pl,"exists") then
                    			time_mute[pl] = 0
                    			msg('©160160160'..player(id,'name')..' used @unmute on '..player(pl,'name'))
               			end
			else
				admlevelmsg(id)
			end
here say hook add in
addhook("say","rp_say")
function rp_say(id,txt)
1
2
3
4
5
if time_mute[id]>= 1 then
  		msg2(id,'©170255000 '..player(id,'name')..' Got Muted ')
		msg2(id,'©170255000 '..player(id,'name')..' can say after '..time_mute[id])
     		return 1
	end
second hook :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
addhook("second","rp_second")
function rp_second()
	for id = 1,32 do
          	if time_mute[id] >= 1 then
               		time_mute[id] = time_mute[id] -1
          	end
          	if time_mute[id] == 0 then
               		time_mute[id] = 0
          	end
		if player(id,"exists") then
			if player(id,"health")>0 then
				local usermoney = player(id,"money")
				if usermoney > Config.HoldMoney then
					rp_money[id]=rp_money[id]+(usermoney-Config.HoldMoney)
					parse("setmoney "..id.." "..Config.HoldMoney)
					updatehud(id)
				elseif usermoney == Config.HoldMoney then
					
				else
					if rp_money[id] > usermoney then
						rp_money[id]=rp_money[id]-(Config.HoldMoney-usermoney)
						parse("setmoney "..id.." "..Config.HoldMoney)
						updatehud(id)
					end
				end
			end
		end
	end

	local t = item(0,"table")
    for i=1,#t do
        local typeid = item(t[i],"type")
        if typeid == 61 or typeid == 62 then
             removeitem(t[i])
        end
    end
end
IT WORKED ! TeSTED good luck @ @
edited 1×, last 21.06.11 02:23:33 pm

old Re: Requesting mute script

dizziness
User Off Offline

Quote
user kalis has written
user EngiN33R has written
heocon953 has written
here mute lua :
here command !mute <id>


Where did you take that part from? You clearly didn't write it yourself, you didn't even care to remove the undeclared
1
rp_Adminlevel
variable(s) from the code.

@OP
So you want the script to mute a player for only one player?

E.g. if there are three players - me, A and B, if I mute A then I won't be able to hear him while B will be?

If so, then you'll have to convert every message into msg2 addressed to all players on the server except the ones that have the player who wrote muted. return 1 is global.

little child use city life lua
1
rp_Adminlevel
already have in array
little child want only mute a player
city life lua have system mute(can mute all player )
@little chirld
yes i take it in my lua and it work !

here fixed lua :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
function ParseAdminCommand(id,txt)
	local p = totable(txt)
	local cmd = tostring(p[1])
	if rp_Adminlevel[id]>=2 then
		if cmd =="!save" then
			if rp_Adminlevel[id]>=3 then
				for id = 1,32 do
					if player(id,"exists") then
						local UsgnID = UsgnIds[id]
						if UsgnID > 0 then
							SaveUserStat(id,UsgnID)
						end
					end
				end
				rp_msg2(id,"000255000","SAVE OK!")
			else
				admlevelmsg(id)
			end           
		elseif cmd =="!money" then
			if rp_Adminlevel[id]>=3 then
				local pl = tonumber(p[2])
				local money = tonumber(p[3])
				if pl ~= nil and money ~= nil then
					if player(pl,"exists") then
						rp_money[pl]=rp_money[pl]+money
						rp_msg2(pl,"000255000",player(id,"name").." Gave you "..money.." of money!")
						rp_msg2(id,"000255000","You gave "..money.." to "..player(pl,"name"))
						updatehud(pl)
					end
				end
			else
				admlevelmsg(id)
			end
   		elseif cmd == "!mute" then
			if rp_Adminlevel[id]>=2 then
			local pl = tonumber(p[2])          
               		local time = tonumber(p[3])     
              			if player(pl,"exists") and time ~= nil then
                   			time_mute[pl] = time * 60
                    			msg('©160160160'..player(id,'name')..' used @mute '..time..' minute '..player(pl,'name'))
               			end
			else
				admlevelmsg(id)
			end
   		elseif cmd == "!unmute" then
			if rp_Adminlevel[id]>=2 then
               		local pl = tonumber(p[2])          
               			if player(pl,"exists") then
                    			time_mute[pl] = 0
                    			msg('©160160160'..player(id,'name')..' used @unmute on '..player(pl,'name'))
               			end
			else
				admlevelmsg(id)
			end
here say hook add in
addhook("say","rp_say")
function rp_say(id,txt)
1
2
3
4
5
if time_mute[id]>= 1 then
  		msg2(id,'©170255000 '..player(id,'name')..' Got Muted ')
		msg2(id,'©170255000 '..player(id,'name')..' can say after '..time_mute[id])
     		return 1
	end
second hook :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
addhook("second","rp_second")
function rp_second()
	for id = 1,32 do
          	if time_mute[id] >= 1 then
               		time_mute[id] = time_mute[id] -1
          	end
          	if time_mute[id] == 0 then
               		time_mute[id] = 0
          	end
		if player(id,"exists") then
			if player(id,"health")>0 then
				local usermoney = player(id,"money")
				if usermoney > Config.HoldMoney then
					rp_money[id]=rp_money[id]+(usermoney-Config.HoldMoney)
					parse("setmoney "..id.." "..Config.HoldMoney)
					updatehud(id)
				elseif usermoney == Config.HoldMoney then
					
				else
					if rp_money[id] > usermoney then
						rp_money[id]=rp_money[id]-(Config.HoldMoney-usermoney)
						parse("setmoney "..id.." "..Config.HoldMoney)
						updatehud(id)
					end
				end
			end
		end
	end

	local t = item(0,"table")
    for i=1,#t do
        local typeid = item(t[i],"type")
        if typeid == 61 or typeid == 62 then
             removeitem(t[i])
        end
    end
end
IT WORKED ! TeSTED good luck @ @


why on me not work T_T

old Re: Requesting mute script

EngiN33R
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
muted={}
for i=1,32 do
muted[i]={}
for j=1,32 do
muted[i][j]=false
end
end

addhook("say","chatredone")
function chatredone(id,t)
	for _,sid in ipairs(player(0,"table")) do
		if (not muted[sid][id]) then
			msg2(sid,player(id,"name")..": "..t)
		end
	end
	if (t:sub(1,5)=="!mute") then
		local mid=tonumber(t:sub(6))
		muted[id][mid]=true
		msg2(id,"You have muted "..player(mid,"name"))
	end
	if (t:sub(1,7)=="!unmute") then
		local mid=tonumber(t:sub(8))
		muted[id][mid]=false
		msg2(id,"You have unmuted "..player(mid,"name"))
	end
end
Derp.

old Re: Requesting mute script

dizziness
User Off Offline

Quote
user EngiN33R has written
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
muted={}
for i=1,32 do
muted[i]={}
for j=1,32 do
muted[i][j]=false
end
end

addhook("say","chatredone")
function chatredone(id,t)
	for _,sid in ipairs(player(0,"table")) do
		if (not muted[sid][id]) then
			msg2(sid,player(id,"name")..": "..t)
		end
	end
	if (t:sub(1,5)=="!mute") then
		local mid=tonumber(t:sub(6))
		muted[id][mid]=true
		msg2(id,"You have muted "..player(mid,"name"))
	end
	if (t:sub(1,7)=="!unmute") then
		local mid=tonumber(t:sub(8))
		muted[id][mid]=false
		msg2(id,"You have unmuted "..player(mid,"name"))
	end
end
Derp.


Not working ~_~ I writing !mute 1 and the result I can still chat zZzz

old Re: Requesting mute script

dizziness
User Off Offline

Quote
user EngiN33R has written
You should try to mute another player and not yourself.


Hmm, but there is one bad from this lua script. When we type !mute <id> on our chat it show !mute <id> too I think better it not showed at the chat only show Succes or what like you have muted <name> and Everyone can use mute command. Can you make like this?

When we type !mute <id> or !unmute <id> the command not showed at the chat and the system personally speak to the who are doing that mute action
When we do the command he cannot talk so when he talk the system say You have muted by admin
And that command only can use by admin
1
if rp_Adminlevel[id]>=1 then

old Re: Requesting mute script

EngiN33R
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
muted={}
for i=1,32 do
muted[i]={}
for j=1,32 do
muted[i][j]=false
end
end

addhook("say","chatredone")
function chatredone(id,t)
	if (rp_Adminlevel[id]>=1) then
     for _,sid in ipairs(player(0,"table")) do
          if (not muted[sid][id]) then
               msg2(sid,player(id,"name")..": "..t)
          end
     end
     if (t:sub(1,5)=="!mute") then
          local mid=tonumber(t:sub(6))
          muted[id][mid]=true
          msg2(id,"You have muted "..player(mid,"name"))
     end
     if (t:sub(1,7)=="!unmute") then
          local mid=tonumber(t:sub(8))
          muted[id][mid]=false
          msg2(id,"You have unmuted "..player(mid,"name"))
     end
	end
	return 1
end

And I thought this command is for everyone so that they could mute any player and not see his messages? So you DO want a global mute script after all? God damn it, I don't even understand what do you want.

old Re: Requesting mute script

dizziness
User Off Offline

Quote
user EngiN33R has written
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
muted={}
for i=1,32 do
muted[i]={}
for j=1,32 do
muted[i][j]=false
end
end

addhook("say","chatredone")
function chatredone(id,t)
	if (rp_Adminlevel[id]>=1) then
     for _,sid in ipairs(player(0,"table")) do
          if (not muted[sid][id]) then
               msg2(sid,player(id,"name")..": "..t)
          end
     end
     if (t:sub(1,5)=="!mute") then
          local mid=tonumber(t:sub(6))
          muted[id][mid]=true
          msg2(id,"You have muted "..player(mid,"name"))
     end
     if (t:sub(1,7)=="!unmute") then
          local mid=tonumber(t:sub(8))
          muted[id][mid]=false
          msg2(id,"You have unmuted "..player(mid,"name"))
     end
	end
	return 1
end

And I thought this command is for everyone so that they could mute any player and not see his messages? So you DO want a global mute script after all? God damn it, I don't even understand what do you want.


What ever but thank you for every your help
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview