Forum

> > CS2D > Scripts > missing letter
Forums overviewCS2D overview Scripts overviewLog in to reply

English missing letter

12 replies
To the start Previous 1 Next To the start

old missing letter

if
User Off Offline

Quote
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?

old Re: missing letter

SilentDash
User Off Offline

Quote
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?

old Re: missing letter

if
User Off Offline

Quote
I used gmsg because I can't type the © all the time.

old Re: missing letter

SilentDash
User Off Offline

Quote
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...

old Re: missing letter

if
User Off Offline

Quote
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 "©"
edited 1×, last 11.11.11 08:53:56 pm

old Re: missing letter

SilentDash
User Off Offline

Quote
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

old Re: missing letter

if
User Off Offline

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

old Re: missing letter

if
User Off Offline

Quote
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.

old Re: missing letter

if
User Off Offline

Quote
Thanks.Its fixed now.
edited 2×, last 11.11.11 09:42:16 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview