30.03.2015, 13:07
This code should show me all the wanted reasons for player:
Instead it shows only 1 wanted, It shows only 1 of them, If pWanted[4] and pWanted[5] == 1 i want them both to be showed in the dialog... all those who 0 doesn't show, which is good.
Код:
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"); } }