public OnPlayerText(playerid, text[])
{
if(IsPlayerAdmin(playerid))
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "[Admin]%s: %s", pName, text);
SendClientMessageToAll(-1,String);
return 0;
}
return 1;
}
public OnPlayerText(playerid, text[])
{
if(IsPlayerAdmin(playerid))
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{FF0000}[Admin] {%06x}%s(%d): {FFFFFF}%s", (GetPlayerColor(playerid) >>> 8), pName, playerid, text);
SendClientMessageToAll(-1,String);
return 0;
}
return 1;
}
Like This (?) :-
pawn Код:
|
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x00FF00C8
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x3A47DEFF
#define COLOR_TAN 0xBDB76BAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_INDIGO 0x1E90FFAA
#define COLOR_BLACK 0x00000000
#define COLOR_DARKGREY 0x696969FF
public OnPlayerText(playerid, text[])
{
if(IsPlayerAdmin(playerid))
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), ""COLOR_RED"[Admin] %s: "COLOR_BLACK"%s", pName, text);
SendClientMessageToAll(-1,String);
return 0;
}
return 1;
}
public OnPlayerText(playerid, text[])
{
if(IsPlayerAdmin(playerid))
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "[Admin] %s: %s", pName, text);
SendClientMessageToAll(0xFF0000FF,String); //-1 to replace with hexdecimal color code, here now its red.. try it
return 0;
}
return 1;
}
Like This (?) :-
pawn Код:
|
public OnPlayerText(playerid, text[])
{
if(IsPlayerAdmin(playerid))
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "[Admin]%s: %s", pName, text);
SendClientMessageToAll(0xFF0000AA,String); //<--the 0xFF0000AA(red) was a -1.
return 0;
}
return 1;
}
public OnPlayerText(playerid, text[])
{
if(IsPlayerAdmin(playerid))
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "[Admin] %s: {FFFFFF}%s", pName, text);
SendClientMessageToAll(0xFF0000FF,String);
return 0;
}
return 1;
}
#define COLOR_RED 0xFF0000AA
#define COL_RED "{FF0000}"
public OnPlayerText(playerid, text[])
{
new string[50];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, 24);
format(string,sizeof(string),"My name is "#COL_RED"%s",pName);
SendClientMessageToAll(-1, string);
Just replace this -1 with some other hexadecimal color code!
This is a sample of red! Try this.. Is this what you were asking? pawn Код:
|