Chat limite
#1

Hi all, is there any solution here i make a admins spйcial chat tag but i get only a very very short chat limite!

here is the code:


Код:
		if (IsPlayerTag(playerid,1)&& strlen(text)>0) 
	{
		new color = GetPlayerColor(playerid);
	    format(string,sizeof(string),"» {757575}[ADMIN] {%06x}%s {A6A6A6}[{ff0000}%d{A6A6A6}]{FF0000}: {FFFFFF}%s", GetPlayerColor(playerid) >>> 8,PlayerName[playerid], playerid, text);
	    ForEachPlayer(i)
		    if(!BlockedPlayerList[i][playerid])
		        SendClientMessage(i, color, string);
		return 0;
	}
Reply
#2

How you declared string?
Reply
#3

what you mean?
Reply
#4

You should declare it like this:

PHP код:
new string[145]; 
Reply
#5

I Already have it! i just forget to put it on the post

new string[512];
if (IsPlayerTag(playerid,1)&& strlen(text)>0)
{
new color = GetPlayerColor(playerid);
format(string,sizeof(string),"» {757575}[ADMIN] {%06x}%s {A6A6A6}[{ff0000}%d{A6A6A6}]{FF0000}: {FFFFFF}%s", GetPlayerColor(playerid) >>> 8,PlayerName[playerid], playerid, text);
ForEachPlayer(i)
if(!BlockedPlayerList[i][playerid])
SendClientMessage(i, color, string);
return 0;
}
Reply
#6

The limit-size of a clientmessage is 128 characters. All the colors, playername and id already take up 100 characters, so there are only 28 characters left for the actual text...
Just remove all the color-codes from the string and use 1 global color.
Reply
#7

Quote:
Originally Posted by Schneider
Посмотреть сообщение
The limit-size of a clientmessage is 128 characters. All the colors, playername and id already take up 100 characters, so there are only 28 characters left for the actual text...
Just remove all the color-codes from the string and use 1 global color.
Is there any other way because these colors are imporant for my admins!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)