31.10.2010, 15:27
What about this:
pawn Код:
public OnPlayerText( playerid, text[ ] )
{
new
bool:bInSpaces,
iSpaces,
i = -1
;
while ( text[ ++i ] )
{
if ( text[ i ] <= ' ' )
{
if ( !bInSpaces )
{
bInSpaces = true;
iSpaces = 0;
}
++iSpaces;
}
else
{
if ( bInSpaces )
{
bInSpaces = false;
if ( iSpaces > 1 )
{
strdel( text, i - iSpaces, i - 1 );
i -= iSpaces;
}
}
}
}
SendPlayerMessageToAll( playerid, text );
return 0;
}