Color en mensaje...
#9

vale, me parece bien, pero el que te pasй va dar un error en una circunstancia especнfica, cбmbialo por este:

Код:
stock SCM2(playerid, color, text[])
{
    if(strlen(text) > 99)
	{
		new text1[120],
			text2[120],
			pos = -1,
			hexant[10];

		strmid(text2, text, 99, 144);
		strmid(text1, text, 0, 99);
		
		strins(text1, "...", strlen(text1));
		strins(text2, "...", 0);

		for(new pos_a; pos_a != -1; pos_a = strfind(text1, "{", false, (pos_a == 0 ? pos_a : pos_a+7)))
			pos = pos_a;
		if(pos == 0) pos = -1;
		if(pos+7 > 99)
		{
        	new a = strfind(text2, "}")+1;
			strmid(hexant, text2, 3, a), // estaba en 0, pero como van a ir los "..." primero se debe poner desde ese punto
			strdel(text2, 3, a), // estaba en 0, pero como van a ir los "..." primero se debe poner desde ese punto
			strins(text1, hexant, strlen(text1));
		}

		if(pos != -1)
            strmid(hexant, text1, pos, pos+8),
			strins(text2, hexant, 0);

		SCM(playerid, color, text1);
		SCM(playerid, color, text2);
	}
	else SCM(playerid, color, text);
    return 1;
}
Reply


Messages In This Thread
Color en mensaje... - by Unrea1 - 01.03.2016, 17:19
Re: Color en mensaje... - by Jastak - 01.03.2016, 20:28
Re: Color en mensaje... - by Unrea1 - 02.03.2016, 00:19
Re: Color en mensaje... - by Jastak - 02.03.2016, 00:53
Re: Color en mensaje... - by Th3Cr4k3r - 02.03.2016, 02:12
Re: Color en mensaje... - by Unrea1 - 02.03.2016, 02:53
Re: Color en mensaje... - by Jastak - 02.03.2016, 03:08
Re: Color en mensaje... - by Unrea1 - 02.03.2016, 04:16
Re: Color en mensaje... - by Jastak - 02.03.2016, 12:53

Forum Jump:


Users browsing this thread: 4 Guest(s)