PDA

View Full Version : [Easy MySQL] Dialog Banlist


Sensation
21/02/2016, 11:46 AM
Hi all!
I'm using this script for mysql(Easy-Mysql): http://forum.sa-mp.com/showthread.php?t=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..

Sensation
21/02/2016, 05:47 PM
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_ST YLE_MSGBOX,"Banned Players",string,"Close","");
return 1;
}