22.02.2014, 21:52
This chat system is supposed to split the string once the message is 50 characters long, and continue it on the next line. However, it splits the string then repeats the last few charaters. I will change the length to 100, but the line doesn't stop at 100, if you understand what im saying
pawn Код:
new string[150], string1[150], string2[150];
if(strlen(text) > 50)
{
format(string, sizeof(string), "%s says: %s", GetName(playerid), text);
strmid(string1, string, 53, 100);
format(string2, sizeof(string2), "... %s", string1);
ProxDetector(10, playerid, string, 0xE6E6E6AA, 0xC8C8C8AA, 0xAAAAAAAA, 0x8C8C8CAA, 0x6E6E6EAA);
ProxDetector(10, playerid, string2, 0xE6E6E6AA, 0xC8C8C8AA, 0xAAAAAAAA, 0x8C8C8CAA, 0x6E6E6EAA);
print(string);
print(string2);
}
else
{
format(string, sizeof(string), "%s says: %s", GetName(playerid), text);
ProxDetector(10, playerid, string, 0xE6E6E6AA, 0xC8C8C8AA, 0xAAAAAAAA, 0x8C8C8CAA, 0x6E6E6EAA);
print(string);
}