OnPlayerText Problem
#2

PHP код:
// Define when to split the text into another line!
#define EX_SPLITLENGTH 118

stock SendSplitMessage(playeridcolor, final[])
{
    new 
buffer[EX_SPLITLENGTH+5];
    new 
len strlen(final);
    if(
len>EX_SPLITLENGTH)
    {
        new 
times = (len/EX_SPLITLENGTH);
        for(new 
0times+1i++)
        {
            
strdel(buffer0EX_SPLITLENGTH+5);
            if(
len-(i*EX_SPLITLENGTH)>EX_SPLITLENGTH)
            {
                
strmid(buffer, final, EX_SPLITLENGTH*iEX_SPLITLENGTH*(i+1));
                
format(buffersizeof(buffer), "%s ..."buffer);
            }
            else
            {
                
strmid(buffer, final, EX_SPLITLENGTH*ilen);
            }
            
SendClientMessage(playeridcolorbuffer);
        }
    }
    else
    {
        
SendClientMessage(playeridcolor, final);
    }

Usage

PHP код:
SendSplitMessage(playeridcolormsg); 
Reply


Messages In This Thread
OnPlayerText Problem - by IceBilizard - 19.02.2017, 15:34
Respuesta: OnPlayerText Problem - by Eloy - 19.02.2017, 16:00

Forum Jump:


Users browsing this thread: 1 Guest(s)