@@iMatt nu cred ca a inteles ce are de facut :))
@@CSORIN poftim:
YCMD:comanda( playerid, params[], help ) {
if( !PlayerInfo[ playerid ][ pAdmin ] )
return SCM( playerid, -1, "Nu esti admin" );
new gQuery[ 256 ];
mysql_format( SQL, gQuery, sizeof gQuery, "SELECT * FROM `bans` ORDER BY `ID` DESC LIMIT 25" );
mysql_tquery( SQL, gQuery, "showBans", "d", playerid );
return true;
}
function showBans( playerid ) {
if( !cache_get_row_count() )
return SCM( playerid, -1, "Nu a fost gasit nici un ban." );
new
numeJucator[ 32 ],
numeAdmin[ 32 ],
zile,
string[ 256 ]
;
for( new i = 0; i < cache_num_rows(); ++i ) {
cache_get_field_content( i, "PlayerName", numeJucator, SQL, 32 );
cache_get_field_content( i, "AdminName", numeAdmin, SQL, 32 );
zile = cache_get_field_content_int( i, "Days" );
format( string, sizeof string, "%s%s, banned by %s for %d days.", string, numeJucaotr, numeAdmin, zile );
}
ShowPlayerDialog( playerid, 0, DIALOG_STYLE_MSGBOX, "Server Bans:", string, "Ok", "" );
return true;
}