SA-MP Forums Archive
A problem about onplayertext - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A problem about onplayertext (/showthread.php?tid=147708)



A problem about onplayertext - Apply - 14.05.2010

Well, not really a problem but look, when player types in the chat he can only use 1 line and his words are getting cut after a certain spot, how can i make it 2 lines per typing in chat?
Thanks


Re: A problem about onplayertext - cessil - 14.05.2010

you're probably formatting it to a smaller string somewhere in your code


Re: A problem about onplayertext - Apply - 14.05.2010

Can you please show me the line i need to change?


Re: A problem about onplayertext - cessil - 14.05.2010

no because I don't have your code


Re: A problem about onplayertext - Apply - 14.05.2010

Here it is-
Код:
public OnPlayerText(playerid, text[])
{


if(PlayerInfo[playerid][LoggedIn] !=1) return SendClientMessage(playerid,COLOR_RED,"BLABLABLA");


 new file[64],pName[24],s[64];
	GetPlayerName(playerid,pName,24);
	format(file,64,"Tags/%s.ini",pName);
	if(!dini_Isset(file,"Tag"))
	{
		if(fexist(file))
		{
			format(s,64," %s [ID:%d]",text,playerid);
			SendPlayerMessageToAll(playerid, s);
		}
		return 0;
	}
	else if(dini_Isset(file,"Tag"))
	{
		if(fexist(file))
		{
			format(s,64," %s [ID:%d| %s]",text,playerid,dini_Get(file,"Tag"));
			SendPlayerMessageToAll(playerid, s);
			return 1;
 }

 	}
	return 0;
}



Re: A problem about onplayertext - cessil - 14.05.2010

Код:
format(s,64," %s [ID:%d]",text,playerid);
you're formatting a string to 64 characters and then sending it so the max characters you can send is 64, you should change it to 128


Re: A problem about onplayertext - Apply - 14.05.2010

Thanks!