SA-MP Forums Archive
[Help] Admin Chat help. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] Admin Chat help. (/showthread.php?tid=148474)



[Help] Admin Chat help. - johnnyc - 17.05.2010

Hey, i have the admin chat like this
*Admin Firstname_Lastname: Hello there
so me and a friend try to make it like this
*Admin Firstname_Lastname: Hello there. (( to make the chat white ))

but what i get now is like this :

*Admin Firstname_Lastname:
Hello there.

How can i make them at the same line?
pawn Код:
//-------------------------[AChat(lvl1)]------------------------------------------
if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_PURPLE, "USAGE: (/a)dmin [admin chat]");
return 1;
}
format(string, sizeof(string), "*Admin %s:", sendername) || format(string, sizeof(string), " %s ",result);
if (PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pRealAdmin] == 1)
{
SendAdminMessage(COLOR_GREEN, string);
SendAdminMessage(COLOR_WHITE, result);
}
printf("Admin %s: %s", sendername, result);
return 1;
}



Re: [Help] Admin Chat help. - Zimon95 - 17.05.2010

I think it's impossible to make a string with 2 different colours. (Exept for GameTexts and TextDraws)