I've done most of it but can't figure out some parts.
In the code below I numbered the parts where I do not know what to write with "----#1 or #2"
At #1, I wanna do whenever someone in the clan says something his msg is sent to everyone else in the clan that is present in the server.
At #2, I wanna do that a msg to everyone in the clan gets a msg that clanchat is either turned on or off.
Also, if I have done anything else which is wrong then tell me the mistake + its solutions as well :).
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
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
Clan = {xxxxx,xxxxx,xxxxxx,xxxxxx,xxxxx} Admin = {xxxxx,xxxxx,} function initArray(m) 	local array = {} 	for i = 1, m do 		array[i]=0 	end 	return array end clanchat=initArray(32) addhook("say","chat") function chat(id,txt) for _, usgn in ipairs(Admin) do if player(id,'usgn') == usgn then if clanchat[id]==1 then ---------------------- #1 end end end end addhook("serveraction","admaction") function admaction(id,act) for _, usgn in ipairs(Admin) do if player(id,'usgn') == usgn then if act==1 then if clanchat[id]==1 then ------------------------------------- #2 clanchat[id]=0 elseif clanchat[id]==0 then ------------------------------------- #2 clanchat[id]=1 end end end end end
Help will be appreciated.