14.03.2013, 20:42
pawn Код:
CMD:pager ( playerid, params[] )
{
new
text [ 64 ];
if( sscanf( params, "s[64]", text ) )
return false;
new
pStr [ 128 ],
pStr_Extracted [ 128 ];
if( strlen ( text ) <= 57 )
{
format( pStr, 128, "PAGER: ~w~%s", text );
}
else
{
format( pStr, 128, "PAGER: ~w~%s~n~\t\t..", text );
printf( pStr );
strmid ( pStr_Extracted, pStr, 57, strlen ( pStr ) );
printf( pStr_Extracted );
strcat ( pStr, pStr_Extracted, 128 );
}
PlayerTextDrawHide ( playerid, Pager [ playerid ] );
PlayerTextDrawSetString ( playerid, Pager [ playerid ], pStr );
PlayerTextDrawShow( playerid, Pager [ playerid ] );
return true;
}
Picture for a better explaination: