Vice City: Multiplayer

VC:MP Discussion => Support => Topic started by: KAKAN on Nov 13, 2015, 09:59 AM

Title: A question on console
Post by: KAKAN on Nov 13, 2015, 09:59 AM
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^^
Title: Re: A question on console
Post by: . on Nov 13, 2015, 10:41 AM
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.
Title: Re: A question on console
Post by: KAKAN on Nov 13, 2015, 11:26 AM
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
Title: Re: A question on console
Post by: . 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?
Title: Re: A question on console
Post by: KAKAN on Nov 13, 2015, 11:52 AM
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?
Title: Re: A question on console
Post by: . on Nov 13, 2015, 11:58 AM
I'm just... WTF... Sorry but... Why?

@S.L.C slaps @maxorator because he didn't add this truly useful feature.
Title: Re: A question on console
Post by: EK.IceFlake on Nov 13, 2015, 01:07 PM
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.
Title: Re: A question on console
Post by: KAKAN on Nov 13, 2015, 01:21 PM
I don't get you.
How can I make the app?
The RGB codes nor the hex codes works with the print thing.
Title: Re: A question on console
Post by: Thijn on Nov 13, 2015, 07:25 PM
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.
Title: Re: A question on console
Post by: Stormeus on Nov 13, 2015, 10:38 PM
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.
Title: Re: A question on console
Post by: KAKAN on Nov 14, 2015, 05:02 AM
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.
Title: Re: A question on console
Post by: KAKAN on Nov 14, 2015, 12:53 PM
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?
Title: Re: A question on console
Post by: . on Nov 14, 2015, 12:56 PM
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.
Title: Re: A question on console
Post by: Thijn on Nov 14, 2015, 06:04 PM
Locked. Solutions have been given. Do what you want with it.