Need help in the reportlist and banlist

Started by Kid_Buu, May 31, 2018, 02:53 PM

Previous topic - Next topic

Kid_Buu

Hi, I have the commands /reportlist and /banlist but they have an error.
What happens is only shows a single report or a ban, could someone help me?

Mahmoud Tornado

Quote from: Kid_Buu on May 31, 2018, 02:53 PMHi, I have the commands /reportlist and /banlist but they have an error.
What happens is only shows a single report or a ban, could someone help me?

May you forget this.
local q = QuerySQL( Ban, "SELECT * FROM BannedPlayers" ), i = 0;  // Change it to your ban database
 while( GetSQLColumnData( q, 0 ) )
 {
  local
   Name = GetSQLColumnData( q, 0 ),
   Reason = GetSQLColumnData( q, 2 );   //Delete it if you don't have reason.
   MessagePlayer("[#00de00]Banned: [#fbf3f3]"+Name+", Reason: "+Reason+".",player);
  GetSQLNextRow( q );
  i++;
 }