[Include] [INC] Co[S]mY's Color Functions 0.1 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] [INC] Co[S]mY's Color Functions 0.1 (
/showthread.php?tid=61520)
[INC] Co[S]mY's Color Functions 0.1 -
cosmy - 13.01.2009
Cosmy's Color Functions 0.1
Code:
/******************************************************************************/
/*
Type:
Stock function
Function:
color_MakeColor(colorname[], a, r, g, b);
Params:
colorname[] -> Is the color name
a -> The alpha color [must be between 0 and 255]
r -> The red color [must be between 0 and 255]
g -> The green color [must be between 0 and 255]
b -> The blue color [must be between 0 and 255]
Return:
Return 0 if the function has errors else return 1
Bugs:
I found an bug with "fwrite()" function... do not make a new line!!!
Example:
color_MakeColor("COLOR_RED", 255, 255, 0, 0);
*/
/******************************************************************************/
Code:
/******************************************************************************/
/*
Type:
Stock function
Function:
color_GetError();
Params:
Return:
Return the "color_MakeColor()" error (if have)
Bugs:
Example:
color_MakeColor("COLOR_RED", 256, 255, 0, 0);
new error[100];
error = color_GetError();
printf(error);
*/
/******************************************************************************/
pastebin:
http://pastebin.com/m3bfc2fd5
Re: [INC] Co[S]mY's Color Functions 0.1 -
On_Top_Non_Stop - 13.01.2009
#define COLOR_RED 0xAA3333AA
But seriously, am I missing something?
Re: [INC] Co[S]mY's Color Functions 0.1 -
cosmy - 14.01.2009
Quote:
Originally Posted by On_Top_Non_Stop
#define COLOR_RED 0xAA3333AA
But seriously, am I missing something?
|
no... but if you want make a color, you can use this function...
Re: [INC] Co[S]mY's Color Functions 0.1 -
The_Tough - 16.06.2009
You can easily do
#define COLOR_RED 0xFF0000AA and you are done.ex on SendClientMessage(playerid,COLOR_RED,"message");
Re: [INC] Co[S]mY's Color Functions 0.1 -
Weirdosport - 16.06.2009
I found an bug with "fwrite()" function... do not make a new line!!!
That isn't a bug foo', you need to use the new line symbol...
"hell bob\n"
And preferably use a \r aswell.
I can appreciate you put a lot of effort into it, but if you were just making a colour for a SCM it's unecessary. However, if players wanted to choose their own colours based on RGB values 0-255, it would be useful in a script.
Re: [INC] Co[S]mY's Color Functions 0.1 -
Karlip - 16.06.2009
Nice,but don't make pastebin links that you only make to last for an hour.
You can choose for how long you want it to stay up.