[Include] Msg (v1.0) - Chat lights colors and flexible formatting
#1

Hello!

Include MSG is used for easy formatting and thickening of the text.

In this include use SendClientMessage function normally and SendClientMessageToAll, except that we have the additional option of formatting and thickening of the text.

example:
Код:
	new c = 5;
	
	SendClientMessage(playerid, 0xFF0000, "* The value of the variable {b}c{/b} to {b}%d{/b}.", c);
	SendClientMessageToAll(0xFF0000, "*(All) The value of the variable {b}c{/b} to {b}%d{/b}.", c);
Include is primarily intended for people who do not like to do the tables and their format, and only then send.

Special thanks to bartekdvd who helped to download the appropriate bold for each color.

Download
Reply
#2

****** didnt have released something like this once time?

Good job man.
Reply
#3

I don't get a part of the code, would you mind to explain it to me?

pawn Код:
static colors[2][9], cdata[1];
   
cdata[0] = color;
   
cdata{0} = floatround(float(cdata{0}) - (float(cdata{0}) * 0.3));
cdata{1} = floatround(float(cdata{1}) - (float(cdata{1}) * 0.3));
cdata{2} = floatround(float(cdata{2}) - (float(cdata{2}) * 0.3));
You create cdata array that can only get an index of 0 and so you did:
pawn Код:
cdata[0] = color;
but then you used { } and indexes 0, 1, 2 and that's the part I don't get. You didn't use any char in the array (for using { }) and neither the size of the cdata was 3 so you could have those 3 indexes, so my question is: What does it do?

EDIT: After few tests, it seems that those three give the R G B values of the color before assigning the new ones.
Reply
#4

Using cdata{0}, cdata{1} I refer to the cells and not the entire byte array.
Reply
#5

****** released it a while ago.

https://sampforum.blast.hk/showthread.php?tid=399069

But good job.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)