17.07.2018, 16:56
Hello, I have a problem viewing accounts banned in the dialog.. not exactly can not see everything.
is it possible to put "the next list? {Next Button}" ?
if anyone can help me, thank you very much.
I'm sorry I'm not so English
ScreenShot Exemple:
https://imgur.com/a/tHuWnIf
CODE MY SCRIPT:
is it possible to put "the next list? {Next Button}" ?
if anyone can help me, thank you very much.
I'm sorry I'm not so English
ScreenShot Exemple:
https://imgur.com/a/tHuWnIf
CODE MY SCRIPT:
Код HTML:
CMD:banlist( playerid, params[] )
{
new strt[226];
format(strt, sizeof(strt), "SELECT * FROM `bans` WHERE `ID` > 0");
mysql_tquery(SQL, strt, "BanList", "d", playerid);
return 1;
}
stock BanList( playerid )
{
new szDialog[MAX_STRING], szDialog2[1024];
new liRows, liFields, OnName[ MAX_PLAYER_NAME ], OnName2[ MAX_PLAYER_NAME ], BBanDate[200];
cache_get_data( liRows, liFields );
strcat(szDialog2, "{FFFF00}ID\t{FFFF00}BanName\t{FFFF00}Admin\t{FFFF00}Ban Date\n");
for( new i = 0; i < liRows; i ++ )
{
cache_get_field_content( i, "PlayerName", OnName );
cache_get_field_content( i, "AdminName", OnName2 );
cache_get_field_content( i, "BanTimeDate", BBanDate, 1, 200 );
format(szDialog, sizeof(szDialog), "%d\t%s\t%s\t%s\n", i + 1, OnName, OnName2, BBanDate);
strcat(szDialog2, szDialog);
strmid(UniversalVar[i + 1][vNameBanList], OnName, 0, strlen(OnName), 255);
}
ShowPlayerDialog(playerid, DIALOG_BANLISTX, 5, "{6699FF}The List Of Players Banned:", szDialog2, "Select", "Exit");
return ( 1 );
}
OnDialogResponse
if(dialogid == DIALOG_BANLISTX)
{
if(response)
{
if(listitem >= 0)
{
new IdBanList = listitem+1;
new qstr[256];
new cont = MySQLCheckAccount(UniversalVar[IdBanList][vNameBanList]);
if(cont == 0) return SCM(playerid,COLOR_WHITE,"{FFB870}Nu exista nici un jucator cu acest nume, banat.");
format(qstr,sizeof(qstr),"SELECT * FROM bans WHERE `PlayerName`='%s' AND `Active`='1'", UniversalVar[IdBanList][vNameBanList]);
new Cache: banuri = mysql_query(SQL, qstr);
if(cache_get_row_count() > 0)
{
new Security1[24];
new query22[256];
mysql_real_escape_string(UniversalVar[IdBanList][vNameBanList], Security1);
format(query22, sizeof(query22), "SELECT * FROM `bans` WHERE `PlayerName` = '%s'", Security1);
mysql_tquery(SQL, query22, "OnInfoBanCalled", "ds", playerid, UniversalVar[IdBanList][vNameBanList]);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "This player is not banned.");
}
cache_delete(banuri);
}
}
return 1;
}