Colour Remove (admin)
27 replies28.04.12 09:53:15 am
Hey guys
I need some help with one script.
So i need one command:
!q and this command will remove the colour of the admin.
I hope you guys can help me.
I need some help with one script.
Code:
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Admin = {xxxxx}
addhook("say","adminsay")
function adminsay(id,txt)
for _, usgn in ipairs(Admin) do
if player(id,'usgn') == usgn then
msg("©255255255"..player(id,"name").." [Admin] : "..txt)
return 1
end
end
end
addhook("say","adminsay")
function adminsay(id,txt)
for _, usgn in ipairs(Admin) do
if player(id,'usgn') == usgn then
msg("©255255255"..player(id,"name").." [Admin] : "..txt)
return 1
end
end
end
So i need one command:
!q and this command will remove the colour of the admin.
I hope you guys can help me.
edited 1×, last 28.04.12 12:32:32 pm
well here you go
Code:
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
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
function Array(p,q)
local array = {}
for o = 1, p do
array[o] = q or false
end
return array
end
admincolor = 1
Admin = {18627}
addhook("say","adminsay")
function adminsay(id,txt)
for _, usgn in ipairs(Admin) do
if player(id,"usgn") == usgn then
if txt=="!q" then
admincolor = 0
msg2(id,"adminchat removed")
return 1
elseif txt=="!a" then
admincolor = 1
msg2(id,"adminchat activated")
return 1
elseif admincolor == 1 then
msg("©255255255"..player(id,"name").." [Admin] : "..txt)
return 1
end
end
end
end
local array = {}
for o = 1, p do
array[o] = q or false
end
return array
end
admincolor = 1
Admin = {18627}
addhook("say","adminsay")
function adminsay(id,txt)
for _, usgn in ipairs(Admin) do
if player(id,"usgn") == usgn then
if txt=="!q" then
admincolor = 0
msg2(id,"adminchat removed")
return 1
elseif txt=="!a" then
admincolor = 1
msg2(id,"adminchat activated")
return 1
elseif admincolor == 1 then
msg("©255255255"..player(id,"name").." [Admin] : "..txt)
return 1
end
end
end
end
Jynxxx has written:please dont insult my code there is nothing wrong with it.
You code is wong and is stupd!.t
Jynxxx has written:please dont insult my code
The code must be very upset right now.
Code:
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
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
Admin = {45813,xxxxx}
colors = 1
addhook("say","says")
function says(id,t)
for _, usgn in ipairs(Admin) do
if player(id,'usgn') == usgn then
if colors == 1 then
msg("©255255255"..player(id,"name").." [Admin] : "..t)
return 1
end
end
end
end
addhook("say","sayss")
function sayss(id,t)
if colors == 0 then
return false
end
end
addhook("say","ed")
function ed(id,txt)
for _, usgn in ipairs(Admin) do
if player(id,'usgn') == usgn then
if txt == "!enable" then
colors = 1
elseif txt == "!disable" then
colors = 0
end
return 1
end
end
end
colors = 1
addhook("say","says")
function says(id,t)
for _, usgn in ipairs(Admin) do
if player(id,'usgn') == usgn then
if colors == 1 then
msg("©255255255"..player(id,"name").." [Admin] : "..t)
return 1
end
end
end
end
addhook("say","sayss")
function sayss(id,t)
if colors == 0 then
return false
end
end
addhook("say","ed")
function ed(id,txt)
for _, usgn in ipairs(Admin) do
if player(id,'usgn') == usgn then
if txt == "!enable" then
colors = 1
elseif txt == "!disable" then
colors = 0
end
return 1
end
end
end
fixed
fine works
edited 1×, last 28.04.12 08:04:36 pm
Que se Realize, oque sempre sonhei, que se Torne verdade, oque Maginei, só então saberei..., que não errei, quanto a ti olhar, eu Amei (8)
Jynxxx has written:what was the problem and why do you have 3 different say hooks?
yeah
If you put it all together, would not work perfectly
but at least works
Is there a problem?
Que se Realize, oque sempre sonhei, que se Torne verdade, oque Maginei, só então saberei..., que não errei, quanto a ti olhar, eu Amei (8)
sheeL has written:If you put it all together, would not work perfectly
This is wrong. It would.
what was the problem with my script , mine is more cleaner and shorter what if he doesn't want the text !enable to show to everyone.
*edit*
the code really didnt need the array function
*edit*
the code really didnt need the array function
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
admincolor = 1
Admin = {18627}
addhook("say","adminsay")
function adminsay(id,txt)
for _, usgn in ipairs(Admin) do
if player(id,"usgn") == usgn then
if txt=="!q" then
admincolor = 0
msg2(id,"adminchat removed")
return 1
elseif txt=="!a" then
admincolor = 1
msg2(id,"adminchat activated")
return 1
elseif admincolor == 1 then
msg("©255255255"..player(id,"name").." [Admin] : "..txt)
return 1
end
end
end
end
Admin = {18627}
addhook("say","adminsay")
function adminsay(id,txt)
for _, usgn in ipairs(Admin) do
if player(id,"usgn") == usgn then
if txt=="!q" then
admincolor = 0
msg2(id,"adminchat removed")
return 1
elseif txt=="!a" then
admincolor = 1
msg2(id,"adminchat activated")
return 1
elseif admincolor == 1 then
msg("©255255255"..player(id,"name").." [Admin] : "..txt)
return 1
end
end
end
end
edited 1×, last 28.04.12 08:23:39 pm
Jynxxx has written:what was the problem with my script
Your code will turn everyone's text on and off, and not just your own.
_Y has written:
Jynxxx has written:what was the problem with my script
Your code will turn everyone's text on and off, and not just your own.
works =='
Que se Realize, oque sempre sonhei, que se Torne verdade, oque Maginei, só então saberei..., que não errei, quanto a ti olhar, eu Amei (8)
I got a feeling this should work
Code:
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
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
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
admincolor=initArray(32)
addhook("say","adminsay")
function adminsay(id,txt)
for _, usgn in ipairs(Admin) do
if player(id,'usgn') == usgn then
if admincolor == 1 then
msg("©255255255"..player(id,"name").." [Admin] : "..txt)
end
if txt=="!q" then
if admincolor[id]==1 then
admincolor[id]=0
msg2(id,"adminchat removed")
return 1
elseif admincolor[id]==0 then
admincolor[id]= 1
msg2(id,"adminchat activated")
return 1
end
end
end
end
end
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
admincolor=initArray(32)
addhook("say","adminsay")
function adminsay(id,txt)
for _, usgn in ipairs(Admin) do
if player(id,'usgn') == usgn then
if admincolor == 1 then
msg("©255255255"..player(id,"name").." [Admin] : "..txt)
end
if txt=="!q" then
if admincolor[id]==1 then
admincolor[id]=0
msg2(id,"adminchat removed")
return 1
elseif admincolor[id]==0 then
admincolor[id]= 1
msg2(id,"adminchat activated")
return 1
end
end
end
end
end
edited 1×, last 29.04.12 02:44:12 pm
-KratoS- has written:I got a feeling this should work
Code:
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
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
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
admincolor=initArray(32)
addhook("say","adminsay")
function adminsay(id,txt)
for _, usgn in ipairs(Admin) do
if player(id,'usgn') == usgn then
if admincolor == 1 then
msg("©255255255"..player(id,"name").." [Admin] : "..txt)
end
if txt=="!q" then
if admincolor[id]==1 then
admincolor[id]=0
msg2(id,"adminchat removed")
return 1
elseif admincolor[id]==0 then
admincolor[id]= 1
msg2(id,"adminchat activated")
return 1
end
end
end
end
end
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
admincolor=initArray(32)
addhook("say","adminsay")
function adminsay(id,txt)
for _, usgn in ipairs(Admin) do
if player(id,'usgn') == usgn then
if admincolor == 1 then
msg("©255255255"..player(id,"name").." [Admin] : "..txt)
end
if txt=="!q" then
if admincolor[id]==1 then
admincolor[id]=0
msg2(id,"adminchat removed")
return 1
elseif admincolor[id]==0 then
admincolor[id]= 1
msg2(id,"adminchat activated")
return 1
end
end
end
end
end
I agree with
_Y i need the admin table. 






1 
Colour Remove (admin)

Unlocking the games.