11.09.2013, 16:05
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.
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;
}