How to change colors in this code?
#1

Hey,

I need help with this code here . I dindt see any color codes there but ingame it is white how i change it ?

Quote:

new string[256], Namee[24];
GetPlayerName(playerid, Namee, sizeof(Namee));
if(APlayerData[playerid][PlayerLevel] >= 1)
{
format(string, sizeof(string), "Admin %s is on Duty", Namee);
SendClientMessageToAll(-1, string);
}

Thanks for helping
Reply
#2

Like this:
pawn Код:
// please don't use strings with 256 cells, it's just a waste of memory
format(string, sizeof(string), "Admin %s{FFFFFF} is on Duty", Namee); // place the color code in the brackets
Reply
#3

Код:
new string[256], Namee[24];
GetPlayerName(playerid, Namee, sizeof(Namee));
if(APlayerData[playerid][PlayerLevel] >= 1)
{
format(string, sizeof(string), "Admin %s is on Duty", Namee);
SendClientMessageToAll(-1, string);
}
Set your color instead of -1

example :
Yellow: 0xFFFF00FF

Код:
SendClientMessageToAll(0xFFFF00FF, string);
Edit: dominik523 sorry i didn't your reply when i was writing
but anyway we posted different ways
Reply
#4

Must be white because you don't use any color..
Reply
#5

Quote:
Originally Posted by M4D
Посмотреть сообщение
Код:
new string[256], Namee[24];
GetPlayerName(playerid, Namee, sizeof(Namee));
if(APlayerData[playerid][PlayerLevel] >= 1)
{
format(string, sizeof(string), "Admin %s is on Duty", Namee);
SendClientMessageToAll(-1, string);
}
Set your color instead of -1

example :
Yellow: 0xFFFF00FF

Код:
SendClientMessageToAll(0xFFFF00FF, string);
Edit: dominik523 sorry i didn't your reply when i was writing
but anyway we posted different ways
Thanks its working but i typed the color of red but it is still yellow . CAn you show me the red color please.
Reply
#6

RED 0xFF0000FF

for more colors, http://www.nthelp.com/colorcodes.htm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)