Forum

> > CS2D > Scripts > Namelist??
Forums overviewCS2D overview Scripts overviewLog in to reply

English Namelist??

1 reply
To the start Previous 1 Next To the start

old Namelist??

Suprise
BANNED Off Offline

Quote
Hi!

How can it do to be in a script is a list of name!
Section: Mute Player!
Pls help!

thanks in advance

old Re: Namelist??

Jynxxx
User Off Offline

Quote
Here you go. This works only by the console, so whoever has access to it can mute the player.
here are the instructions

1.Open console (you have to be admin)

2.If you want to mute somebody:
-Type: mute <ID-OF-PLAYER-YOU-WANT-TO-MUTE>

3.If you want to unmute:
-Type: unmute <ID-OF-PLAYER-YOU-WANT-TO-UNMUTE>


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
function InitArray(m,val)
array={}
	for i=1,m do
		array[i]=val
	end
return array
end


if(ppl==nil) then ppl={} end
if(ppl.muted) then ppl.muted={} end

ppl.muted=InitArray(32,0)


addhook("say","ppl.say")
function ppl.say(id,txt)
	if(ppl.muted[id]==1) then
		msg2(id,"©255000000You are muted@C")
		return 1
	end
end

addhook("parse","ppl.muteparse")
function ppl.muteparse(cmd)
	if(string.sub(cmd,1,4)=="mute") then
		local muteid=tonumber(string.sub(cmd,6,string.len(cmd)))
		ppl.muted[muteid]=1
		print("©255255255"..muteid.." is now muted!")
		msg2(muteid,"©255000000You got muted!@C")
		return 1
	end
	
	if(string.sub(cmd,1,6)=="unmute") then
		local muteid=tonumber(string.sub(cmd,8,string.len(cmd)))
		ppl.muted[muteid]=0
		print("©255255255"..muteid.." got unmuted!")
		msg2(muteid,"©000255000You got unmuted!@C")
		return 1
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview