SA-MP Forums Archive
SQL - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SQL (/showthread.php?tid=602710)



SQL - Mrcroissant - 11.03.2016

'evening everyone

i would do a dialog that diplays sql results, so the results could be different in any case. How could i indicate what actions will be done while every items will be differents depending of players.

e.g

DIALOG_LIST
1
2
3
4
but after it could be
1
2
3

Cheers


Re: SQL - czerwony03 - 11.03.2016

save results to array/table, and then manage this data in OnPlayerDialogResponse


Re: SQL - Mrcroissant - 11.03.2016

Thank you for your answer, could you detail, im not an expert with sql


Re: SQL - czerwony03 - 11.03.2016

Create table:
Код:
new Results[MAX_PLAYERS][MAX_RECORDS];
Than, while creating dialog, save to this array for example UID's from results:
Код:
Results[playerid][record_number]=record_uid;
And than, in OnPlayerDialogResponse look for UID with that:
Код:
Results[playerid][listitem]