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

I favourited this a while ago as I was meaning to add it to my server, it may help you: http://forum.sa-mp.com/showpost.php?...24&postcount=4
Reply
#3

Quote:
Originally Posted by MP2
Посмотреть сообщение
I favourited this a while ago as I was meaning to add it to my server, it may help you: http://forum.sa-mp.com/showpost.php?...24&postcount=4
Thanks alot, this worked very good!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)