IgrexolonO
Wiek: 34 Na forum: 6810 dni Posty: 1386
Piwa : 1062
Kod: public OnPlayerText(playerid, text[])
{
#define MAX_CHAR 65
new line1[MAX_CHAR+1], string[128], __c = text[strlen(text) - 1];
if(strlen(text) > MAX_CHAR)
{
format(line1, sizeof(line1), text);
strdel(line1, MAX_CHAR, strlen(line1));
format(string, sizeof(string), "%s: %s...", PlayerName(playerid), line1);
SendClientMessageToAll(-1, string);
strdel(text, 0, MAX_CHAR);
format(string, sizeof(string), " ... %s%c", text, ((__c != '.' && __c != '!' && __c != '?')? '.': '\0'));
SendClientMessageToAll(-1, string);
}
else
{
format(string, sizeof(string), "%s: %c%s%c", PlayerName(playerid), toupper(text[0]), text[1], ((__c != '.' && __c != '!' && __c != '?')? '.': '\0'));
SendClientMessageToAll(-1, string);
}
return false;
}