else if(dialogid == DIALOG_SHOWPERSON) //if the player responsed to the dialog (ID = 0, as we've set it as such - you'll use your definition) then the script continues here
{
if(response == 0) //response 0 is always the SECOND BUTTON! (in our case this was "Close".
{
return 1;
}
else //If the player did not press the close button, but the "Select" button, the script reads the following.
{
new dialogstring[128],string[128];
format(string, sizeof(string), "SELECT * FROM `arecords` WHERE `PSQLID` = %d ORDER BY `id` DESC LIMIT 10", psql);
mysql_query(string);
mysql_store_result();
new r_msg[500];
while(mysql_fetch_row(r_msg))
{
sscanf(r_msg, "p<|>e<iiiis[24]iiiii>", PlayerArrests[10]);
if(mysql_num_rows() == 0)
{
format(dialogstring, sizeof(dialogstring), "%s", PlayerArrests[10][ar_cr]);
}
if(mysql_num_rows() > 0)
{
format(dialogstring, sizeof(dialogstring), "%s\n%s", dialogstring, PlayerArrests[10][ar_cr]);
}
else
{
SendClientMessage(playerid, COLOUR_GREY, "No records found.");
}
}
ShowPlayerDialog(playerid, DIALOG_RECORDS, DIALOG_STYLE_LIST, "Arrest Info", dialogstring, "Select", "Close");
}
}
---------------------------------------------------------- Owner of Millenium Roleplay CallumDaBest - Got hacked Next update on MRP: Next week - since i got hacked! ---------------------------------------------------------- |
---------------------------------------------------------- Owner of Millenium Roleplay CallumDaBest - Got hacked Next update on MRP: Next week - since i got hacked! ---------------------------------------------------------- |