Forum

> > CS2D > Scripts > Who could tell me why this script isn't working?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Who could tell me why this script isn't working?

15 replies
To the start Previous 1 Next To the start

old Who could tell me why this script isn't working?

Xirot
User Off Offline

Quote
Well, I just wanna know why this script isn't working.
I checked the console it haves no errors.
More >


EDIT: Can you please tell me how I can add colors for each message?

old Re: Who could tell me why this script isn't working?

Xirot
User Off Offline

Quote
Okay, the code is fixed.
More >


How to make this message color red for example?
1
msg (player(killer,"name").." made double kill!")

old Re: Who could tell me why this script isn't working?

Mora
User Playing CS2D

Quote
@user Xirot: as @user Talented Doge: said, using \169rrrgggbbb:
1
msg ("\169255000000"..player(killer,"name").." made double kill!")
Also you can make the table of the colors:
1
2
3
4
5
colors = {
	"\169255255255",
	"\169000255000",
	"\169255000255",
}
and using them as:
1
msg(colors[1].." "..player(killer,"name").." made double kill!")
edited 1×, last 11.08.15 09:04:47 pm

old Re: Who could tell me why this script isn't working?

Mami Tomoe
User Off Offline

Quote
Or... do it the easy way for newbies like me... and use the © thingy.

example:
©255255255 is white
©000000000 is black

©255255255 i like milk ©000000000 and i need it now!
          will be white          will be black
easy

old Re: Who could tell me why this script isn't working?

Mora
User Playing CS2D

Quote
@user Mami Tomoe: not all ppls know that they're need to press alt+0169, and not all even smart a bit for take it from symbols table :d.
Anyway, © and \169 doing the same, but i need to press 4 keys instead of 5 and i may get it wrong. also it may lead to problems(maybe) with unicode(however it's called).
/anyway the problem already fixed in pm.

old Re: Who could tell me why this script isn't working?

Xirot
User Off Offline

Quote
A small bug?
More >

I don't know why doublekill,killingspree,triplekill colors have bug they appears like this
Quote
Player y255255255 : test1

Also when a player make triple,killingspree or more kills he goes back to level 0 which means when he stops killing and come back to fight and get more kills after a while he goes back to doublekill which is a bug.

Players should not make successive kills to get sounds..

old Re: Who could tell me why this script isn't working?

Ridho
User Off Offline

Quote
you can put this in the beginning of your script
color=string.char(169)
colo={"©255000000","©000255000","©000000255","©255255255"}

to find color code (RGB), you can use Color Schemer

use "colo", if your color choice is in the table
but if you want to use other color, use "color"

example:
msg2(id,""..colo[2].."You, "..color.."190190190"..player(id,"name").." "..colo[1].."killed "..colo[2]..""..player(victim,"name"))

output:
msg to a player, it says "You" with green color, then "your character name" with grey color, then "killed" with red color, and "victim name" with green color again

read carefully
I hope you understand
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview