How to change colors in this code? - 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: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to change colors in this code? (
/showthread.php?tid=563164)
How to change colors in this code? -
ultrAslan - 14.02.2015
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
Re: How to change colors in this code? -
dominik523 - 14.02.2015
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
Re: How to change colors in this code? -
M4D - 14.02.2015
Код:
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
Re: How to change colors in this code? -
bigboy81 - 14.02.2015
Must be white because you don't use any color..
Re: How to change colors in this code? -
ultrAslan - 14.02.2015
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.
Re: How to change colors in this code? -
Airman123 - 14.02.2015
RED 0xFF0000FF
for more colors,
http://www.nthelp.com/colorcodes.htm