something wrong plz help
#1

Well, I wanted to make 2 lines whenever I write a long text, I tried to do that, but it shows a text messed up..., but when I write short text, it looks fine. dunno why, take atleast one look on it, plz and thx

Код:
if(strcmp(cmd, "/d", true) == 0)
	{
	    new string[256];
	    if(IsPlayerConnected(playerid))
	    {
	        if(IsLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_WHITE, "You are not logged in yet.");
	            return 1;
	        }
			GetPlayerName(playerid, sendername, sizeof(sendername));
			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: /r [radio transmission]");
				return 1;
			}
			if(strlen(cmdtext) > 50)
	  		{
   		     new string2[120];
	 	     format(string,120,"[GOV]%s:%s...", sendername,cmdtext[50]);
	 	     strdel(cmdtext,50,strlen(cmdtext));
		 	 format(string2,120,"... %s",cmdtext[4]);
       		 SendClientMessageToAll(COLOR_DEPART_RADIO,string);
		  	 SendClientMessageToAll(COLOR_DEPART_RADIO,string2);
   		    }
		    else
			{
		  	format(string,120,"[GOV]%s: %s", sendername,cmdtext[4]);
		  	SendClientMessageToAll(COLOR_DEPART_RADIO,string);
			}
		}
		return 1;
	}
Reply


Messages In This Thread
something wrong plz help - by samuel_hamza - 13.07.2010, 22:27
Re: something wrong plz help - by coole210 - 14.07.2010, 00:04
Re: something wrong plz help - by samuel_hamza - 14.07.2010, 00:45
Re: something wrong plz help - by Zezombia - 14.07.2010, 00:47
Re: something wrong plz help - by samuel_hamza - 14.07.2010, 00:51
Re: something wrong plz help - by Zezombia - 14.07.2010, 01:11
Re: something wrong plz help - by samuel_hamza - 14.07.2010, 14:04

Forum Jump:


Users browsing this thread: 1 Guest(s)