08.11.2010, 14:42
hey how to make a new line when client message text is to long ? i mean in automatic if the message exceeds a length of 50 words automatically make new line
public OnPlayerText(playerid, text[])
{
if(strlen(text) > 50)
{
new overflow[59];
strmid(overflow,text,50,strlen(text));
strdel(text, 50,strlen(text));
new string[80], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s: %s", name, overflow);
SendPlayerMessageToAll(playerid,string);
}
return 1;
}