17.05.2010, 13:34
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?
*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;
}