getting the text between * *
#5

You could also use this because the other code I posted doesn't check if the last digit is also an asterisk

Код:
if(text[0] == '*')
{
	new j = 1;
	while(j < 128)
	{
		if(text[j] == '\0' && text[j-1] == '*')
		{
			new action[128];
			format(action, 128, "%s", text);
			strdel(action, 0, 1);
			strdel(action, j-2, j-1);
			format(string, sizeof(string), "* %s %s", RPN(playerid), action);
			ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
			return 0;
		}
		j++;
	}
}
Reply


Messages In This Thread
getting the text between * * - by aNdReSk - 21.06.2010, 03:13
Re: getting the text between * * - by mprofitt - 21.06.2010, 03:21
Re: getting the text between * * - by bigcomfycouch - 21.06.2010, 03:29
Re: getting the text between * * - by aNdReSk - 21.06.2010, 03:34
Re: getting the text between * * - by bigcomfycouch - 21.06.2010, 04:04

Forum Jump:


Users browsing this thread: 1 Guest(s)