09.03.2018, 22:05
Код HTML:
forward MResultado(playerid);
public MResultado(playerid)
{
new rows, fields, MStatus[128], MNome[128], MScore[128], DialogBox[1200], MResultado[128];
cache_get_data(rows,fields,mysqlConnection);
if(rows)
{
for(new i = 0; i < rows; i++ )
{
cache_get_field_content(i, "Nome", MNome, mysqlConnection);
cache_get_field_content(i, "Score", MScore, mysqlConnection);
cache_get_field_content(i, "Status", MStatus, mysqlConnection);
if(strcmp(MStatus, "Offline", false, 8) == 0)
format(MResultado, sizeof(MResultado),"Nome: %s -> Score: %d -> Status: {FF0000}%s\n", MNome, strval(MScore), MStatus);
else
format(MResultado, sizeof(MResultado),"Nome: %s -> Score: %d -> Status: {00FF00}%s\n", MNome, strval(MScore), MStatus);
strcat(DialogBox,MResultado);
}
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Jogadores",DialogBox,"OK","");
}
}

