help !
#8

use this

pawn Код:
//use it like
SendLongMessage(playerid, 0xFF8C00FF ,string);//send the long message

//the stock function (please note: i did NOT write this function myself!)
stock SendLongMessage(playerid, color ,message[] )
{
    new len = strlen(message),
        _iL = len / MAX_CHARS_PER_LINE;

    if( ( len % MAX_CHARS_PER_LINE ) ) _iL++;
    new _Line[MAX_CHARS_PER_LINE + 5];

    new _:_i@Index;
    while( _i@Index < _iL )
    {
        if( _i@Index == 0 )
            strmid( _Line, message, ( _i@Index * MAX_CHARS_PER_LINE ), ( _i@Index * MAX_CHARS_PER_LINE ) + MAX_CHARS_PER_LINE );
        else
            strmid( _Line, message, ( _i@Index * MAX_CHARS_PER_LINE ), ( _i@Index * MAX_CHARS_PER_LINE ) + MAX_CHARS_PER_LINE );

        #if defined FINAL_DOTS
        if( _iL > 1 )
        {
            if( _i@Index == 0 )
            {
                format( _Line, sizeof _Line, "%s ...", _Line );
            }
            else if( _i@Index > 0 && ( _i@Index + 1 ) < _iL )
            {
                format( _Line, sizeof _Line, "... %s ...", _Line );
            }
            else
            {
                format( _Line, sizeof _Line, "... %s", _Line );
            }
        }
        #endif
        SendClientMessage(playerid, color, _Line );
        _i@Index++;
    }
    return 1;
}
Reply


Messages In This Thread
help ! - by yuvraj201 - 20.12.2013, 00:28
Re: help ! - by yuvraj201 - 20.12.2013, 22:56
Re: help ! - by Kells - 20.12.2013, 22:57
Re: help ! - by yuvraj201 - 20.12.2013, 23:00
Re: help ! - by xVIP3Rx - 20.12.2013, 23:00
Re: help ! - by yuvraj201 - 20.12.2013, 23:04
Re: help ! - by PowerPC603 - 20.12.2013, 23:06
Re: help ! - by BlackWolf120 - 20.12.2013, 23:06

Forum Jump:


Users browsing this thread: 2 Guest(s)