Forum

> > CS2D > Scripts > Colour Remove (admin)
Forums overviewCS2D overview Scripts overviewLog in to reply

English Colour Remove (admin)

27 replies
Page
To the start Previous 1 2 Next To the start

old Re: Colour Remove (admin)

krabob
User Off Offline

Quote
Edit: Show me the error
Edit2: Found it myself...

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
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[id]== 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

Try this
edited 2×, last 29.04.12 03:09:37 pm

old Re: Colour Remove (admin)

Misho
User Off Offline

Quote
Now it shows me this:
IMG:https://i44.servimg.com/u/f44/16/84/64/23/xddddd10.jpg

And i'm using this script:
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
Admin = {69783}

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("©000000238"..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

Tell me whats wrong?
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview