SA-MP Forums Archive
[Easy MySQL] Dialog Banlist - 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: [Easy MySQL] Dialog Banlist (/showthread.php?tid=601437)



[Easy MySQL] Dialog Banlist - Sensation - 21.02.2016

Hi all!
I'm using this script for mysql(Easy-Mysql): https://sampforum.blast.hk/showthread.php?tid=590310


I made a ban system with this easy-mysql script. My question: How can i get banned players from 'bans' table and make a dialog for this with easy mysql? Please help me..


Re: [Easy MySQL] Dialog Banlist - Sensation - 21.02.2016

I made this command but it shows one result in dialog.

Код:
CMD:banlist(playerid,params[])
{
new banned[24],string[1024];

new countid = SQL::CountRows("banlist");
    for(new id=0;id<countid;id++)
    {
    if(SQL::RowExists("banlist", "id", id))
    {
    new handle= SQL::Open(SQL::READ, "banlist", "id",id);
    SQL::ReadString(handle, "banlist", banned,24);
    SQL::Close(handle);
    }
    }
format(string,sizeof(string),"%s%s\n",string,banned);
ShowPlayerDialog(playerid,DIALOG_BANINFO,DIALOG_STYLE_MSGBOX,"Banned Players",string,"Close","");
return 1;
}