Help with making text longer
#1

I seem to have this irritating problem, when people writes a long /me it just cuts the rest off if the sentence the person wrote is too long, how can i make so it just continues? Like it makes 2 lines if he has such a long /me
here is the code :
Код:
 	if(strcmp(cmd, "/me", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_WHITE, "[Usage] /me [action]");
				return 1;
			}
			if(PlayerInfo[playerid][pMaskuse] == 1)
			{
			  format(string, sizeof(string), "Stranger %s", result);
			}
			else
			{
				format(string, sizeof(string), "%s %s", GetPlayerNameEx(playerid), result);
			}
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		}
		return 1;
	}
Thanks, it works
Would be cooler if it skipped down one line and continued writing so it wouldn't fill the half screen but its awesome, thanks !
Reply


Messages In This Thread
Help with making text longer - by Guso - 30.12.2009, 18:42
Re: Help with making text longer - by Correlli - 30.12.2009, 18:51
Re: Help with making text longer - by jameskmonger - 30.12.2009, 18:54
Re: Help with making text longer - by Mike Garber - 30.12.2009, 19:59
Re: Help with making text longer - by jameskmonger - 31.12.2009, 17:52

Forum Jump:


Users browsing this thread: 1 Guest(s)