SA-MP Forums Archive
BBCode in dialogs, etc? - 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: BBCode in dialogs, etc? (/showthread.php?tid=463344)



BBCode in dialogs, etc? - seanny - 11.09.2013

Hello, I want to modify my graffiti system, but I'm stuck here at the BBCode part, I have no clue what to put if I want more than one BBCode, currently my system only supports "\n".

I hope someone understands from the code I posted below.

pawn Код:
else if(dialogid == GRAFFITI_TEXT)
        {
            if(!response)
            {
                GraffitiSet[playerid] = 0;
                return 1;
            }
            if(response)
            {
                if(strlen(inputtext) > 50)
                {
                    SendClientMessage(playerid, COLOR_LIGHTRED, "Your tag cannot be above 30 characters!");
                    GraffitiSet[playerid] = 0;
                    return 1;
                }
                else
                {
                    new Search[] = "(n)";
                    new Replace[] = "\n";
                    format(inputtext, 255, "%s", str_replace(Search, Replace, inputtext));
                    strmid(GraffitiText[playerid], inputtext, 0, strlen(inputtext), 255);
                    SendClientMessage(playerid, COLOR_WHITE, "You have successfully set your graffiti tag!");
                    GraffitiSet[playerid] = 1;
                    return 1;
                }
            }
            return 1;
        }



Re: BBCode in dialogs, etc? - seanny - 14.09.2013

Bump after 2 days.


Re: BBCode in dialogs, etc? - Grimrandomer - 14.09.2013

What sort of BBCode are you looking to add?


Re: BBCode in dialogs, etc? - seanny - 14.09.2013

Quote:
Originally Posted by Grimrandomer
Посмотреть сообщение
What sort of BBCode are you looking to add?
Basic ones like colours and new lines