08.12.2015, 04:00
pawn Код:
format(mysql, sizeof(mysql), "SELECT * FROM `warrants` WHERE `Suspect` = '%s' ORDER BY `ID` DESC", SQL_ReturnEscaped(ReturnName(userid)));
mysql_function_query(g_iHandle, mysql, true, "", "ds", playerid, ReturnName(userid));
printf("%s",mysql);
cache_get_data(rows, fields, g_iHandle);
string[0] = 0;
for (new i = 0; i < rows; i ++)
{
cache_get_field_content(i, "Description", desc, g_iHandle,128);
cache_get_field_content(i, "Date", date, g_iHandle,128);
format(string, sizeof(string), "%s%s (%s)\n", string, desc, date);
}
format(desc, sizeof(desc), "Charges: %s", ReturnName(userid));
Dialog_Show(playerid, ChargeList, DIALOG_STYLE_LIST, desc, string, "Close", "");