SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 16/01/2009, 03:23 PM   #11
Y_Less
Spam Machine
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 14,516
Reputation: 2927
Default Re: [REL] Console Colored Text 0.1

Quote:
Originally Posted by ssǝן‾ʎ
This looks cool but the dl limit has been reached. Could you upload it somewhere else like one of the custom SA:MP hosts:

http://www.zezombia.com/mirrors/
http://www.uploadffs.com/
http://up.mavehost.de/
Can you please sort that?
Y_Less is offline   Reply With Quote
Old 16/01/2009, 03:25 PM   #12
cosmy
Big Clucker
 
Join Date: Nov 2007
Posts: 160
Reputation: 21
Default Re: [REL] Console Colored Text 0.1

Quote:
Originally Posted by ssǝן‾ʎ

Edit: Does this support both Windows and Linux?
nope. support only windows
cosmy is offline   Reply With Quote
Old 16/01/2009, 07:17 PM   #13
Nimphious
Huge Clucker
 
Join Date: Dec 2008
Posts: 383
Reputation: 2
Default Re: [REL] Console Colored Text 0.1

Don't triple post.

Also i thought this would colour all text, but i have to write text for it
Nimphious is offline   Reply With Quote
Old 16/01/2009, 07:34 PM   #14
yom
High-roller
 
Join Date: Jul 2006
Posts: 2,005
Reputation: 6
Default Re: [REL] Console Colored Text 0.1

Ohh, you should say in first post that we can do this also, for setting text and background colors:
Code:
SetConsoleTextColor(CONSOLE_WHITE | BACKGROUND_BLUE);
Or maybe make some other #define like
Code:
#define WHITE_AND_BLUE  (CONSOLE_WHITE | BACKGROUND_BLUE)

EDIT: Even default cmd color codes are working!
Code:
SetConsoleTextColor(0x1F);
That is still white text on blue background!

Color attributes are specified by two hex digits.
The first corresponds to the background color, the second to the foreground (text) color.
Each digit can be any of the following values:
Code:
0 = Black	 	
1 = Blue
2 = Green	
3 = Aqua
4 = Red
5 = Purple
6 = Yellow
7 = White
8 = Gray
9 = Light Blue
A = Light Green
B = Light Aqua
C = Light Red
D = Light Purple
E = Light Yellow
F = Bright White


Now is missing a function GetDefaultConsoleColors() in your plugin! (because it has bug actually, when console's default color isn't black/white). Can't wait

Last thing, can you please make it so we can choose where the background color will start and end (on the x axis). So this can maybe allow multiple colors in a single line. Because actually it starts at 0 (and ends at end of string, which make me think it's probably possible to set where it will start and where it will end too)
yom is offline   Reply With Quote
Old 17/01/2009, 01:27 PM   #15
cosmy
Big Clucker
 
Join Date: Nov 2007
Posts: 160
Reputation: 21
Default Re: [REL] Console Colored Text 0.1

Quote:
Originally Posted by 0rb
Ohh, you should say in first post that we can do this also, for setting text and background colors:
Code:
SetConsoleTextColor(CONSOLE_WHITE | BACKGROUND_BLUE);
Or maybe make some other #define like
Code:
#define WHITE_AND_BLUE  (CONSOLE_WHITE | BACKGROUND_BLUE)

EDIT: Even default cmd color codes are working!
Code:
SetConsoleTextColor(0x1F);
That is still white text on blue background!

Color attributes are specified by two hex digits.
The first corresponds to the background color, the second to the foreground (text) color.
Each digit can be any of the following values:
Code:
0 = Black	 	
1 = Blue
2 = Green	
3 = Aqua
4 = Red
5 = Purple
6 = Yellow
7 = White
8 = Gray
9 = Light Blue
A = Light Green
B = Light Aqua
C = Light Red
D = Light Purple
E = Light Yellow
F = Bright White


Now is missing a function GetDefaultConsoleColors() in your plugin! (because it has bug actually, when console's default color isn't black/white). Can't wait

Last thing, can you please make it so we can choose where the background color will start and end (on the x axis). So this can maybe allow multiple colors in a single line. Because actually it starts at 0 (and ends at end of string, which make me think it's probably possible to set where it will start and where it will end too)
Quote:
Because actually it starts at 0 (and ends at end of string, which make me think it's probably possible to set where it will start and where it will end too)
the function "logprintf" do a new line... i can't do this feature

Quote:
Now is missing a function GetDefaultConsoleColors() in your plugin! (because it has bug actually, when console's default color isn't black/white). Can't wait
you can use "0x0000 | 0x0007" for default color.
cosmy is offline   Reply With Quote
Old 17/01/2009, 01:57 PM   #16
yom
High-roller
 
Join Date: Jul 2006
Posts: 2,005
Reputation: 6
Default Re: [REL] Console Colored Text 0.1

Quote:
Originally Posted by cosmy
you can use "0x0000 | 0x0007" for default color.
But that ISN'T my default color! My default color is blue/white not black/white.
yom is offline   Reply With Quote
Old 17/01/2009, 03:37 PM   #17
cosmy
Big Clucker
 
Join Date: Nov 2007
Posts: 160
Reputation: 21
Default Re: [REL] Console Colored Text 0.1

Quote:
Originally Posted by 0rb
Quote:
Originally Posted by cosmy
you can use "0x0000 | 0x0007" for default color.
But that ISN'T my default color! My default color is blue/white not black/white.
:O what os you have?
cosmy is offline   Reply With Quote
Old 17/01/2009, 03:47 PM   #18
TrueCoppa
Huge Clucker
 
Join Date: Jul 2008
Posts: 313
Reputation: 3
Default Re: [REL] Console Colored Text 0.1

Quote:
Originally Posted by cosmy
Quote:
Originally Posted by 0rb
Quote:
Originally Posted by cosmy
you can use "0x0000 | 0x0007" for default color.
But that ISN'T my default color! My default color is blue/white not black/white.
:O what os you have?
The only things you can run an SAMP server is linux / windows.
The default console colours on every MS os is White on Black. And I'm assuming it's the same for linux.
TrueCoppa is offline   Reply With Quote
Old 17/01/2009, 04:03 PM   #19
yom
High-roller
 
Join Date: Jul 2006
Posts: 2,005
Reputation: 6
Default Re: [REL] Console Colored Text 0.1

Well i have XP, but i changed the default colors, now my default colors are blue background/white text, for every console window.

I think that it is possible to script a GetDefaultConsoleColors() (not in Pawn, obviously).
Of course i can also make my own define for my own default colors: #define MY_DEFAULT_COLORS 0x1F

Still, really nice work, looked the source, so simple

yom is offline   Reply With Quote
Old 17/01/2009, 04:07 PM   #20
cosmy
Big Clucker
 
Join Date: Nov 2007
Posts: 160
Reputation: 21
Default Re: [REL] Console Colored Text 0.2 (New version)

Released new version. Added GetConsoleTextColor();
cosmy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS] Text -> Haystacks! [Version 1.2 Released! Now Saving!] Pghpunkid Filterscripts 52 19/05/2016 10:54 PM
[FilterScript] [FS] Colored Money [0.2X] lavamike Filterscripts 38 22/07/2013 04:59 PM
[FilterScript] [FS] Colored Health Bar (v 4.0) OKStyle Релизы/Releases 9 21/09/2010 02:58 PM
How to input text into player console? Haron Help Archive 2 24/02/2010 08:29 PM
Colored Text FlatMaN Help Archive 6 15/01/2010 04:01 PM


All times are GMT. The time now is 03:42 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.