[HELP] To small space to type
#1

On my /ooc and /b command etc players can only type about BlahBlah characters and it will be cutted in half and they have to type again to continue.

I've seen on other scripts that if you type to long, it will change row and you can type how much you want (almost).

Here is my OOC script, we can work from that:

Код:
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(IsLogged[playerid] == 0)
	    {
	      SendClientMessage(playerid, COLOR_GREY, "	You are not logged in yet.");
	      return 1;
	    }
			if(noooc == 0)
			{
				SendClientMessage(playerid, COLOR_GREY, "	The OOC channel has been disabled by an admin.");
				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_GREY, "	USAGE: (/o)oc [text]");
				return 1;
			}
			format(string, sizeof(string), "(( [OOC] %s: %s ))", sendername, result);
			SendClientMessageToAll(COLOR_WHITE,string);
		}
		return 1;
	}
Thanks for the help
Reply
#2

Код:
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(IsLogged[playerid] == 0)
	    {
	      SendClientMessage(playerid, COLOR_GREY, "	You are not logged in yet.");
	      return 1;
	    }
			if(noooc == 0)
			{
				SendClientMessage(playerid, COLOR_GREY, "	The OOC channel has been disabled by an admin.");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[256];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GREY, "	USAGE: (/o)oc [text]");
				return 1;
			}
			format(string, sizeof(string), "(( [OOC] %s: %s ))", sendername, result);
			SendClientMessageToAll(COLOR_WHITE,string);
		}
		return 1;
	}
Try that.
Reply
#3

Quote:
Originally Posted by Eric_
Код:
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(IsLogged[playerid] == 0)
	    {
	      SendClientMessage(playerid, COLOR_GREY, "	You are not logged in yet.");
	      return 1;
	    }
			if(noooc == 0)
			{
				SendClientMessage(playerid, COLOR_GREY, "	The OOC channel has been disabled by an admin.");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[256];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GREY, "	USAGE: (/o)oc [text]");
				return 1;
			}
			format(string, sizeof(string), "(( [OOC] %s: %s ))", sendername, result);
			SendClientMessageToAll(COLOR_WHITE,string);
		}
		return 1;
	}
Try that.
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)