Forum

> > CS2D > Scripts > colour say error
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch colour say error

30 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Re: colour say error

SilentDash
User Off Offline

Zitieren
user Primax7 hat geschrieben
user SilentDash hat geschrieben
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?

alt Re: colour say error

EP
User Off Offline

Zitieren
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) ©

alt Re: colour say error

Cure Pikachu
User Off Offline

Zitieren
user EP hat geschrieben
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.

alt Re: colour say error

Primax7
User Off Offline

Zitieren
user SilentDash hat geschrieben
user Primax7 hat geschrieben
user SilentDash hat geschrieben
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

alt Re: colour say error

Primax7
User Off Offline

Zitieren
user SilentDash hat geschrieben
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

alt Re: colour say error

The Camo
User Off Offline

Zitieren
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

alt Re: colour say error

Primax7
User Off Offline

Zitieren
user The Camo hat geschrieben
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 ©
1× editiert, zuletzt 21.12.11 05:11:19

alt Re: colour say error

The Camo
User Off Offline

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

alt Re: colour say error

SilentDash
User Off Offline

Zitieren
user Primax7 hat geschrieben
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 ©
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht