Chat limite - 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)
+--- Thread: Chat limite (
/showthread.php?tid=566084)
Chat limite -
satafinix - 03.03.2015
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;
}
AW: Chat limite -
Kaliber - 03.03.2015
How you declared string?
Re : Chat limite -
satafinix - 03.03.2015
what you mean?
AW: Chat limite -
Kaliber - 03.03.2015
You should declare it like this:
PHP код:
new string[145];
Re : Chat limite -
satafinix - 03.03.2015
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;
}
Re: Chat limite -
Schneider - 03.03.2015
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.
Re : Re: Chat limite -
satafinix - 03.03.2015
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!