Color Embedding
#1

I'm using color embedding for the first time and I'm curious how would I make a define that I could use instead of having to add the color define every time.

Instead of having to look up the definition for each color like {FFFFFF} for white and {FF0000} for red, I would like to use {WHITE_EMBED} and {RED_EMBED}.

I tried defining white as #define WHITE_EMBED "FFFFFF" and all that it does is send {WHITE_EMBED} as part of the client message.
Reply
#2

Try
pawn Code:
#define WHITE_EMBED {FFFFFF}
Reply
#3

Quote:
Originally Posted by Wesley221
View Post
Try
pawn Code:
#define WHITE_EMBED {FFFFFF}
I already tried that and it didn't work. Afterall, it wouldn't really make sense to have

{WHITE_EMBED} = {{FFFFFF}}.
Reply
#4

Mayube you are looking for this?

https://sampforum.blast.hk/showthread.php?tid=196360
Reply
#5

Quote:
Originally Posted by Zh3r0
View Post
Thanks, I'll try it.
Reply
#6

it needs to be like this
pawn Code:
#define WHITE_EMBED    "{FFFFFF}"
And you use it like this
pawn Code:
"WHITE_EMBED"
Reply
#7

Quote:
Originally Posted by [RVRP]Tyler
View Post
I already tried that and it didn't work. Afterall, it wouldn't really make sense to have

{WHITE_EMBED} = {{FFFFFF}}.
Theres no need to use { } 's, just type WHITE_EMBED, and youre done
Reply
#8

Sendclientmessage(playerid...., "default color"RED_EMBED"red color");
or something like that.
#define RED_EMBED {F81414}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)