SA-MP Forums Archive
Showing stats from mysql - 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: Showing stats from mysql (/showthread.php?tid=401630)



Showing stats from mysql - Larry123 - 23.12.2012

Hello

In mysql i have these fields:

Suspect1,
Suspect2,
Suspect3,
Suspect4,
Suspect5,


_______________________________________

Now i want to do a DIALOG_STYLE_LIST.

I have to get those fields from mysql, and if Suspect() is up to 0, it will be shown as list item:
Код:
if(Suspect.. > 0)
{
     format(string, sizeof(string), "Suspect SQL ID: %i\n", HereIsFieldValueFromSQL);
     strcat(szHugeString, string);
}
ShowPlayerDialog(playerid, 954, DIALOG_STYLE_LIST, "Suspects", szHugeString, "", "OK");
I hope you did understand, if in mysql Suspect is 0, then it`s not seen in dialog, but if it is over 0, we can see it in dialog.

What is the code for getting stats easily?


(I am trying to do MDC system for police)