A problem about onplayertext
#1

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
Reply
#2

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

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

no because I don't have your code
Reply
#5

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;
}
Reply
#6

Код:
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
Reply
#7

Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)