08.08.2014, 18:17
Hi, first, Thanks for being here reading and paying attention.
I have a CMD, "/Admins" to show a list with all admins in the table, my problem is in show it.
So, if u can helpe me. Please!
Very thanks.
I have a CMD, "/Admins" to show a list with all admins in the table, my problem is in show it.
pawn Код:
public OnAdminsFound(playerid)
{
new rows, fields, TotalRows;
new nome[21], level, date[11], hide, rankx[13], temp[21], Str1[256], Str2[500];
cache_get_data(rows, fields);
while(TotalRows < rows)
{
cache_get_row(TotalRows, 1, temp), format(nome,21,temp);
cache_get_row(TotalRows, 2, temp), level = strval(temp);
cache_get_row(TotalRows, 4, temp), format(date,11,temp);
cache_get_row(TotalRows, 12, temp), oculto = strval(temp);
if (hide != 1)
{
if(level == 1)
{
format(rankx,sizeof(rankx),"Moderator");
}
else if(level == 2)
{
format(rankx,sizeof(rankx),"Administrator");
}
else if(level == 3)
{
format(rankx,sizeof(rankx),"Owner");
}
format(Str1, sizeof(Str1), "{FFFFFF}Name: %s | Level:%i | Date: %s\n", nome,rankx,date);
strcat(Str2, Str1);
TotalRows++;
ShowPlayerDialog(playerid, 1258, DIALOG_STYLE_MSGBOX, " * {FFFFFF}Administrators Online!", Str2, "Close", "");
}
}
return 1;
}
Very thanks.