A question on console

Started by KAKAN, Nov 13, 2015, 09:59 AM

Previous topic - Next topic

KAKAN

Is there any way to print with colours in console? Like we do with server. If yes, then how?
Can we disable the join/part messages appearing in the console? If yes, then how?
I need the answers to those questions^^
oh no

.

SetJoinMessages(false);
SetDeathMessages(false);

As for the first one... I'm not even sure what you mean. I think what kind of console you mean but not sure.
.

KAKAN

Quote from: S.L.C on Nov 13, 2015, 10:41 AMSetJoinMessages(false);
SetDeathMessages(false);

As for the first one... I'm not even sure what you mean. I think what kind of console you mean but not sure.
I mean, when someone joins the server, the shows in the server console
player has joined the serverI need colours with the print function
oh no

.

Quote from: KAKAN on Nov 13, 2015, 11:26 AMI need colours with the print function

I thought so. But what's the point really?
.

KAKAN

Quote from: S.L.C on Nov 13, 2015, 11:38 AM
Quote from: KAKAN on Nov 13, 2015, 11:26 AMI need colours with the print function

I thought so. But what's the point really?
Actually I want to remove the join/part messages and add my own messages with colours, hope you got it.
If color is not possible, then tell me, removing join/part messages from server window/console is possible or not?
oh no

.

#5
I'm just... WTF... Sorry but... Why?

@S.L.C slaps @maxorator because he didn't add this truly useful feature.
.

EK.IceFlake

You can do that by making an app such as multicolor that accepts arguments something like multicolor.exe %red%red%green%blue?%purple%yikes then if you're on windows
system("multicolor.exe %red%" + player.Name + " %white%joined...");
linux
system("./multicolor %red%" + player.Name + " %white%joined...");
but you cant disable.

KAKAN

I don't get you.
How can I make the app?
The RGB codes nor the hex codes works with the print thing.
oh no

Thijn

Why on earth would you even look at the console? Why would you waste time on implementing something as retarded as colored messages in your console. WHY?!
No, join messages on the console cannot be suppressed. But why would it?

Seriously, if you want to spent a few hours of your time doing anything you say you might as well start making PacMan for the console so you have something to do while staring at your beautiful colorful console.

I was going to lock this, but I'm curious as to why you want to do this. I just can't understand.

Stormeus

On Linux/Unix you should be able to color the console using print("\x001b[3Xmy color text"), where X is a color code from the color table here:
https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

Replacing 3X with 4X changes the background color of the text. You can also use \x001b[0m to reset the console back to standard colors. This is all untested, though.

On Windows you're fucked because Microsoft still refuses to support ANSI escape codes.

Join/part messages currently cannot be suppressed in the console.

KAKAN

Oke.
Thijn, my bot gets disconnected many a times, I just wanted to see the time when the player joins and leaves.
But it was quite confusing to see, because of the white color spammed everywhere in the console.
oh no

KAKAN

Quote from: LazyOneOn Windows you're fucked because Microsoft still refuses to support ANSI escape codes.
Then how did you print the [MODULE] thing in green and the [SCRIPT] thing in blue?
oh no

.

Quote from: KAKAN on Nov 14, 2015, 12:53 PMThen how did you print the [MODULE] thing in green and the [SCRIPT] thing in blue?

There are some things that you don't understand and trying to explain them to you is suicide.
.

Thijn

Locked. Solutions have been given. Do what you want with it.