01.05.2015, 21:29
(
Последний раз редактировалось Nenzittow; 01.05.2015 в 22:08.
)
PHP код:
#include <a_samp>
public OnPlayerText(playerid, text[])
{
new Texto[144];
format(Texto, sizeof(Texto), "%s(%d): %s", Name(playerid), playerid, Texto);
if(strlen(Texto) < 72) // 1/2
{
SendClientMessageToAll(-1, Texto);
}
else if(strlen(Texto) > 72) // +1/2
{
new Linha[2][73];
strmid(Linha[0], Texto, 0, 72, 72);
SendClientMessageToAll(-1, Linha[0]);
strmid(Linha[1], Texto, 73, 144, 72);
SendClientMessageToAll(-1, Linha[1]);
strdel(Texto, 0, 144);
return false;
}
return true;
}
stock Name(playerid)
{
new Name[24];
GetPlayerName(playerid, Name, 24);
return Name;
}