Help with text wrapping.
#1

Hi I need some help with text wrapping.



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


Messages In This Thread
Help with text wrapping. - by lean1337 - 10.03.2013, 21:48
Re: Help with text wrapping. - by MP2 - 10.03.2013, 22:24
Re: Help with text wrapping. - by lean1337 - 11.03.2013, 12:51

Forum Jump:


Users browsing this thread: 1 Guest(s)