Quote:
Originally Posted by GTLS
If you want the brackets to appear as same color as other text and only the emote inside the brackets to be different color, then just adjust the position of color inside strreplace.
|
I use this code and i have a problem.
Код:
text[0] = toupper(text[0]);
new str[170];
strreplace (text, "<", "{FF0000} <");
strreplace (text, ">", ">");
if(CharacterInfo[playerid][pAdminDuty])
{
new name[64];
switch(CharacterInfo[playerid][pAdmin])
{
case 1:
format(name, sizeof(name), "{E6E6E6}%s ({FF9900}Support{E6E6E6})", CharacterInfo[playerid][pGlobalNick]);
case 2,3,4:
format(name, sizeof(name), "{E6E6E6}%s ({8B00B0}GameMaster{E6E6E6})", CharacterInfo[playerid][pGlobalNick]);
case 5,6:
format(name, sizeof(name), "{E6E6E6}%s ({B00000}Administrator{E6E6E6})", CharacterInfo[playerid][pGlobalNick]);
}
format(str, sizeof(str), "%s: %s", name, text);
SendWrappedMessageToPlayerRange(playerid, COLOR_FADE1, COLOR_FADE1, COLOR_FADE1, COLOR_FADE1, COLOR_FADE1, str, 10);
}
else
{
if(!(CharacterInfo[playerid][pTog] & TOG_SAY))
ApplyAnimation(playerid, "PED", "IDLE_chat", 1.0, 0, 0, 0, 0, 0);
format(str, sizeof(str), "%s say: %s", PlayerName2(playerid), text);
SetPlayerChatBubble(playerid, text, 0xDADADAFF, 10.0, 4000);
SendWrappedMessageToPlayerRange(playerid, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5, str, 10);
}
Warning:
Код:
roleplay.pwn(952) : warning 224: indeterminate array size in "sizeof" expression (symbol "maxlength")
roleplay.pwn(953) : warning 224: indeterminate array size in "sizeof" expression (symbol "maxlength")