Line 69:
1
if muted[id]>0 then
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("minute","mutesec") function mutesec() for id=1,32 do if muted[id]>0 then muted[id]=muted[id]-1 end end end
Hello guys I have a mute script it works like this
!mute <id> <minute> when the times up this error appears Please helpme. I want to a msg like " You are unmuted now!"
Here is the codes for this message but doesnt work
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
addhook("join","OnPlayer") addhook("leave","OnPlayer") function OnPlayer(id) muted[id] = 0 end function unp(v) v = tonumber(v) -- debug msg2(v,"You are UnMuted !") muted[v] = 0 end
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
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
function Split(stringl) local c = {} for word in string.gmatch(stringl, '[^%s]+') do table.insert(c, word) end return c end muted = {} admins = {50998} addhook("minute","mutesec") function mutesec() for id=1,32 do if muted[id]>0 then muted[id]=muted[id]-1 end end end function isAdmin(id) for _, usgn in ipairs(admins) do if player(id,'usgn')== usgn then return true end end return false end addhook("say","adminsay") function adminsay(id,txt) for i=1,#admins do if (player(id,"usgn")==admins[i]) then local id = tonumber(id) -- debug local i = Split(txt) local param = tonumber(i[2]) local mintime = tonumber(i[3]) if isAdmin(id) then if i[1] == "!mute" then if mintime == nil and muted[param] == 0 then muted[param] = 10000 msg("©200000000"..player(param,"name").." Muted forever") return 1 elseif mintime == nil and muted[param] > 0 then muted[param] = 0 msg("©200000000"..player(param,"name").." Unmuted") return 1 elseif mintime > 0 and muted[param] == 0 then msg("©200000000"..player(param,"name").." muted for "..mintime.." minutes") muted[param] = mintime return 1 else muted[param] = 0 msg("©200000000"..player(param,"name").." Unmuted") return 1 end end end end end 		 if muted[id] == 10000 then 		 msg2(id,"©255000000You muted forever") 		 return 1 elseif muted[id] > 0 then msg2(id,"©255000000You muted you cant write for"..muted[id].." minutes!") return 1 else for _, usgn in ipairs(admins) do if player(id,'usgn') == usgn then msg("©255000060"..player(id,"name").." : "..txt) return 1 end end end addhook("join","OnPlayer") addhook("leave","OnPlayer") function OnPlayer(id) muted[id] = 0 end function unp(v) v = tonumber(v) -- debug msg2(v,"You are UnMuted !") muted[v] = 0 end