[Include] [INC] IST Color Handler - color up your script! - 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] IST Color Handler - color up your script! (
/showthread.php?tid=143589)
[INC] IST Color Handler - color up your script! -
N1trO - 23.04.2010
IST Color Handler
Color up your script!
IST Color Handler is a library created by me (IST N1trO) for the world SA:MP community.
this library belongs to
IST (Israel SA:MP Team) and ISTPE Only!
- Info
- What does it do?
- Converts RGB Format to HEX
- Changes a color in the source color (like only changing the R in the color or the B or the G...)
- Gets a color in the source color (like getting the R in the color or the B or the G...)
- Functions
Код:
CreateColor(R,G,B); // returns a color from the R,G and B
/*Example:*/ SendClientMessage(playerid,CreateColor(255,0,0),"Red!");
SetColor(var,val,color) // changes the color value in the var
/*Example:*/ SendClientMessage(playerid,SetColor(COLOR_RED,255,COLOR_B),"Puerple!");
GetColor(var,val,color) // gets the color value in the var
/*Example:*/ printf("R: %d | G: %d | B: %d",GetColor(COLOR_RED,COLOR_R),GetColor(COLOR_RED,COLOR_G),GetColor(COLOR_RED,COLOR_B));
- Donwload
please email me about any bug discovered (my email:
1rockout1@gmail.com).
Greets,
N1trO.
Re: [INC] IST Color Handler - color up your script! -
Amit_B - 23.04.2010
Great release :P
recommended.
Re: [INC] IST Color Handler - color up your script! -
Kurence - 23.04.2010
Quote:
Originally Posted by Amit B
Great release :P
recommended.
|
You are from Israel too so i assume that you are from IST
Re: [INC] IST Color Handler - color up your script! -
N1trO - 23.04.2010
well, yea... he is kinda the leader :P
Re: [INC] IST Color Handler - color up your script! -
BlueRey - 23.04.2010
Nice one IST
Re: [INC] IST Color Handler - color up your script! -
Joe Staff - 23.04.2010
Do you make up for the fact (in your math) that any numbers above 0x7FFFFFFF is actually a negative number? (below 0)
pawn Код:
new Color1=0xFF000000
new Color2;
if(Color1>0x7FFFFFFF)
{
Color2=Color1-0x7FFFFFFF;
Color1=0x7FFFFFFF;
}
Color1+Color2 would equal 0xFF000000
Re: [INC] IST Color Handler - color up your script! -
alf - 23.04.2010
GOOD JOB.
יפה מאוד עומר.
Re: [INC] IST Color Handler - color up your script! -
N1trO - 24.04.2010
Quote:
Originally Posted by Joe Staff
Do you make up for the fact (in your math) that any numbers above 0x7FFFFFFF is actually a negative number? (below 0)
pawn Код:
new Color1=0xFF000000 new Color2; if(Color1>0x7FFFFFFF) { Color2=Color1-0x7FFFFFFF; Color1=0x7FFFFFFF; }
Color1+Color2 would equal 0xFF000000
|
my script currently (v0.0.1) does not handles the A in the ARGB... so the highest value it can reach is 0xFFFFFF