Array / listitem not working
#2

Problem is in Prisoners[i]++;

pawn Код:
bailPlayer(playerid)
{
    new msg[128],count;
    dialogstr[0] = 0;
    for(new prisoner_id=0; prisoner_id < MAX_PLAYERS; prisoner_id++)
        if(IsPlayerConnectEx(prisoner_id))
        {
            new jailtime = GetPVarInt(prisoner_id, "ReleaseTime");
            jailtime -= gettime();
            if(jailtime > 0)
            {
                format(msg, sizeof(msg), "Prisoner: %s - Bail Price: $%d\n",GetPlayerNameEx(prisoner_id, ENameType_RPName_NoMask), GetPVarInt(prisoner_id, "Bail"));
                strcat(dialogstr, msg);
                Prisoners[count++] = prisoner_id; // storing an ID
            }
        }

    if(count == 0) SendClientMessage(playerid, X11_TOMATO_2, "0 prisoners");
    else ShowPlayerDialog(playerid, EFactionsDialog_PayingBail, DIALOG_STYLE_LIST, "List of prisoners.", dialogstr, "Pay Bail", "Cancel");
    return 1;
}
and change to
pawn Код:
bailfromjail(listitem);
in case EFactionsDialog_PayingBail
Reply


Messages In This Thread
Array / listitem not working - by Prokill911 - 17.02.2015, 21:40
Re: Array / listitem not working - by Jefff - 17.02.2015, 22:20
AW: Array / listitem not working - by Nero_3D - 17.02.2015, 22:35
Re: Array / listitem not working - by Prokill911 - 17.02.2015, 23:48

Forum Jump:


Users browsing this thread: 1 Guest(s)