Forum

> > CS2D > Scripts > colour say error
Forums overviewCS2D overview Scripts overviewLog in to reply

English colour say error

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

old Re: colour say error

SilentDash
User Off Offline

Quote
user Primax7 has written
user SilentDash has written
1
2
3
4
5
6
7
8
9
10
11
admins={} -- put there your usgn number

addhook ("say","lol3")
function lol3(id,txt)
local tox=txt:sub(1,10)
	if player(id,"usgn")=="admin" then
	local fullstring = txt:sub(12)
	msg("©000255000"..player(id,"name")..": "..fullstring)
	return 1
	end
end
you can use this...


It not working


which error shows the console?

old Re: colour say error

EP
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
admin = {xxx,xx,x,xxx,xxx} -- Replace xx for your usgn. If you have more just separate them with a "," comma.


addhook("say","adminsay")
function adminsay(id,t)
for adm =1,#admin do
if player(id,"usgn")==admin[adm] then
msg("©255255255"..player(id,"name").." [Admin]: "..t)
return 1
end
end
end
I didn't understand something, do you want to know how to make a Copyright Symbol? If yes it's Alt+184 (184 in the numpad) ©

old Re: colour say error

Cure Pikachu
User Off Offline

Quote
user EP has written
I didn't understand something, do you want to know how to make a Copyright Symbol? If yes it's Alt+184 (184 in the numpad) ©

It's Alt+0169 (0169 on the numpad) on a standard US keyboard configuration.

old Re: colour say error

Primax7
User Off Offline

Quote
user SilentDash has written
user Primax7 has written
user SilentDash has written
1
2
3
4
5
6
7
8
9
10
11
admins={} -- put there your usgn number

addhook ("say","lol3")
function lol3(id,txt)
local tox=txt:sub(1,10)
	if player(id,"usgn")=="admin" then
	local fullstring = txt:sub(12)
	msg("©000255000"..player(id,"name")..": "..fullstring)
	return 1
	end
end
you can use this...



It not working


which error shows the console?


What is this for? no lua error but nothing

@user EP: The thing is i cant save © in my notepad

old Re: colour say error

Primax7
User Off Offline

Quote
user SilentDash has written
do you put your usgn id there
1
admins={}

like
1
admins={82036}
that must be there ...


Well i did it

admins={82036} -- put there your usgn number

addhook ("say","lol3")
function lol3(id,txt)
local tox=txt:sub(1,10)
if player(id,"usgn")=="admin" then
local fullstring = txt:sub(12)
msg("?000255000"..player(id,"name")..": "..fullstring)
return 1
end
end

When i talk is still the same

old Re: colour say error

The Camo
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function usgnsc(table,id)
	for _, usgnc in ipairs(table) do
		if player(id,"usgn") == usgnc then
		return true
		end
	end
return false
end
adminsc={82036} --You may add more admins here now without it checking only first usng in table as if its adminsc[1] all the times
addhook ("say","lol3")
function lol3(id,txt)
	if (usgnsc(adminsc,id))==true then
		if txt~="" then
			if player(id,"team")== 1 then
			local textc=string.sub(txt,1,string.len(txt))
			msg("©000255000"..player(id,"name")..": "..textc)
			return 1
			end
		end
	end
end

Try that

old Re: colour say error

Primax7
User Off Offline

Quote
user The Camo has written
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function usgnsc(table,id)
	for _, usgnc in ipairs(table) do
		if player(id,"usgn") == usgnc then
		return true
		end
	end
return false
end
adminsc={82036} --You may add more admins here now without it checking only first usng in table as if its adminsc[1] all the times
addhook ("say","lol3")
function lol3(id,txt)
	if (usgnsc(adminsc,id))==true then
		if txt~="" then
			if player(id,"team")== 1 then
			local textc=string.sub(txt,1,string.len(txt))
			msg("©000255000"..player(id,"name")..": "..textc)
			return 1
			end
		end
	end
end

Try that


Is still the same

I hope someone can do something like this

adminsay= admin
adminsayco=" "

this will works without ©
edited 1×, last 21.12.11 05:11:19 am

old Re: colour say error

The Camo
User Off Offline

Quote
Thats because it is changing your © into ?...
© is for colors, so without it, there will be no color just a plain yellow text.

old Re: colour say error

SilentDash
User Off Offline

Quote
user Primax7 has written
I hope someone can do something like this

adminsay= admin
adminsayco=" "

this will works without ©


That won't ... for the colours you need the ©
Only if you want it in the normal msg colour works it without ©
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview