17.02.2015, 22:20
Problem is in Prisoners[i]++;
and change to
in case EFactionsDialog_PayingBail
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;
}
pawn Код:
bailfromjail(listitem);