Forum

> > CS2D > Scripts > missing letter
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch missing letter

12 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt missing letter

if
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function rp_int(id,txt)
	
	if stag[id] == 1 and rp_ct[id] == true then
		if txt ~="rank" then
			if rp_Adminlevel[id]== 3 then
				gmsg(""..admin_sayco3.."",player(id,"name").."("..admin_saylv3.."): "..txt)
			return 1
		end	
	end	
end

function gmsg(clr,txt)
	msg(string.char(169)..""..clr..""..txt)
end

When I say something, the first letter of my name misses.
e.g
f(Adm): hello

Which was meant to be
if(Adm): hello

What is wrong here?

alt Re: missing letter

SilentDash
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function rp_int(id,txt)
     
	if stag[id] == 1 and rp_ct[id] == true then
		if txt ~="rank" then
			if rp_Adminlevel[id]== 3 then
			msg(""..admin_sayco3.."",player(id,"name").."("..admin_saylv3.."): "..txt)
			return 1
		end     
	end     
end

function gmsg(clr,txt)
     msg(string.char(169)..""..clr..""..txt)
end
maybe this?

alt Re: missing letter

SilentDash
User Off Offline

Zitieren
yes but if you add it in the script you only must write it in the script but not in the chat?

example in the script

1
2
3
4
5
6
7
8
9
10
11
12
13
14
function rp_int(id,txt)
     
	if stag[id] == 1 and rp_ct[id] == true then
		if txt ~="rank" then
			if rp_Adminlevel[id]== 3 then
			msg("©255000000 "..admin_sayco3.."",player(id,"name").."("..admin_saylv3.."): "..txt)
			return 1
		end     
	end     
end

function gmsg(clr,txt)
     msg(string.char(169)..""..clr..""..txt)
end
That is red...

alt Re: missing letter

if
User Off Offline

Zitieren
I didn't understand you, the msg is part of the script.
""..admin_sayco3.."" is the colour code.

The encoding of lua scripts doesn't support "©"
1× editiert, zuletzt 11.11.11 20:53:56

alt Re: missing letter

SilentDash
User Off Offline

Zitieren
So i think it makes if an Admin say something like "Hi" then comes

...Playername...(Admin):(Text)

and you can make in the Script that it is red,green,blue,yellow,orange,...

Edit:hmm maybe ... i dont know

alt Re: missing letter

if
User Off Offline

Zitieren
The problem with the script wasn't the colour,its the name not displaying correctly.

alt Re: missing letter

if
User Off Offline

Zitieren
the gmsg is working fine in all the other places.

I tried it with
msg(string.char(169).."25500000",player(id,"name").."("..admin_saylv3.."): "..txt)
And the name didn't display right too.

alt Re: missing letter

if
User Off Offline

Zitieren
Thanks.Its fixed now.
2× editiert, zuletzt 11.11.11 21:42:16
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht