29.11.2016, 12:37
What is bad with this function:
Код:
stock SMessage(playerid,color,str[],len=128,lines=20){ if(!len||!str[0])return true; new c=0,x=0;if(len>128||len<0)len=128; for(new i=0,j,y=0;i<lines;y=0,i++){ for(j=x+_:!i;j<x+len&&str[j];j++){ if(str[j]<33){if(str[j-1]>32)y=j;} }if(!str[j])j=-1;else{ if(!y){ if(str[j]>32||str[j-1]<33)c=str[j];else c=0;y=j; }else c=0;str[y]=0; }if(playerid<0)SendClientMessageToAll(color,str[x]); else SendClientMessage(playerid,color,str[x]); if(j<0)break;str[y]=c;x=y+(c?0:1); }return true; }