10.03.2013, 21:48
Hi I need some help with text wrapping.
![](http://i.imgur.com/gFqjWrq.jpg)
It gets like this but I would like it to be like this instead
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.. ..
...aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
and not three lines!
here is the function
and the command.
![](http://i.imgur.com/gFqjWrq.jpg)
It gets like this but I would like it to be like this instead
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.. ..
...aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
and not three lines!
here is the function
pawn Код:
SendCustomPlayerMessage(text[])
{
new playerid, string[126], text2[65];
if(strlen(text) > 64)
{
new text1[65];
strmid(text2, text, 64, 128);
strmid(text1, text, 0, 64);
format(string, 128, "%s...", text1);
ProxDetector(20.0, playerid, string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
format(string, 128, "...%s ))", text2);
ProxDetector(20.0, playerid, string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
}
else format(string, 128, "%s", text);
ProxDetector(20.0, playerid, string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
}
and the command.
pawn Код:
LEANCMD:(btest)
{
if(isnull(params)) return SCM(playerid, COLOR_GREY,"/b [local ooc chat]");
new string[128];
if(AdminDuty[playerid] == 0)
{
format(string, sizeof(string), "(( [%i] %s: %s ))",playerid, GetName(playerid), params);
SendCustomPlayerMessage(string);
format(string,sizeof(string),"[%d-%d-%d](( %s: %s ))",GetDay(),GetMonth(),GetYear(),GetName(playerid), params);
Log("/logs/Emotes.txt",string);
return 1;
}
if(AdminDuty[playerid] == 1)
{
format(string, sizeof(string), "(( [%i] {FF9900}%s{C3C3C3}: %s ))",playerid, GetName(playerid), params);
ProxDetector(20.0, playerid, string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
format(string,sizeof(string),"[%d-%d-%d][ADMINDUTY] (( %s: %s ))",GetDay(),GetMonth(),GetYear(),GetName(playerid), params);
Log("/logs/Emotes.txt",string);
return 1;
}
return 1;
}