09.09.2012, 19:05
How to do that if the text is larger than player X, continue text in new line? is it possible?
sorry my bad english.
sorry my bad english.
It's not automatic.. I don't actualy know how to do it but i know it's not automaticly, as i saw servers where if you write half line, it'll pass to the second one, while if i make a small string, text wont just show up, and if i make it big, it'll be gone in the screen, and bigger screens can see everything, small ones not.
|
public OnPlayerText(playerid, text[])
{
new pname[MAX_PLAYER_NAME], msg[256], partone[70], parttwo[70];
GetPlayerName(playerid, pname, sizeof(pname));
if(strlen(text) >= 64)
{
strmid(partone, text, 0, 64);
strmid(parttwo, text, 64, strlen(text));
format(msg, sizeof(msg), "%s[%i]:{FFFFFF} %s", pname, playerid, partone);
SendClientMessageToAll(GetPlayerColor(playerid), msg);
SendClientMessageToAll(-1, parttwo);
}
else
{
format(msg, sizeof(msg), "%s[%i]:{FFFFFF} %s", pname, playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid), msg);
}
return 0;
}