case DIALOG_SUSPECTNAME3: { if(!response) return 1; new giveplayerid; if(!sscanf(inputtext, "u", giveplayerid)) { new info[1024], caption[96]; Wanted[playerid] = giveplayerid; format(caption, sizeof(caption), "Remove wanted points to %s", GetName(giveplayerid)); if(PlayerInfo[giveplayerid][pWanted][0] == 1) { format(info, 128, "Wanted (1) Crime: {30D5C7}%s\n", PlayerInfo[giveplayerid][WantedReason1]); } if(PlayerInfo[giveplayerid][pWanted][1] == 1) { format(info, 128, "Wanted (2) Crime: {30D5C7}%s\n", PlayerInfo[giveplayerid][WantedReason2]); } if(PlayerInfo[giveplayerid][pWanted][2] == 1) { format(info, 128, "Wanted (3) Crime: {30D5C7}%s\n", PlayerInfo[giveplayerid][WantedReason3]); } if(PlayerInfo[giveplayerid][pWanted][3] == 1) { format(info, 128, "Wanted (4) Crime: {30D5C7}%s\n", PlayerInfo[giveplayerid][WantedReason4]); } if(PlayerInfo[giveplayerid][pWanted][4] == 1) { format(info, 128, "Wanted (5) Crime: {30D5C7}%s\n", PlayerInfo[giveplayerid][WantedReason5]); } if(PlayerInfo[giveplayerid][pWanted][5] == 1) { format(info, 128, "Wanted (6) Crime: {30D5C7}%s\n", PlayerInfo[giveplayerid][WantedReason6]); } ShowPlayerDialog(playerid, DIALOG_REMOVESUSPECT, DIALOG_STYLE_LIST, caption, info, "Select", "Cancel"); } }
Using format will format the string to what you specified, while strcat will add to it.
So use strcat. |
new info2[157];
if(PlayerInfo[giveplayerid][pWanted][0] == 1)
{
format(info2, 128, "Wanted (1) Crime: {30D5C7}%s\n", PlayerInfo[giveplayerid][WantedReason1]");
strcat(info, info2);
}
Format the string to add, here's an example:
pawn Код:
|