05.03.2016, 01:14
pawn Код:
case DIALOG_VERMIEMBROSCLAN:
{
if(response)
{
new string[128], DBResult:qresult, rows;
format(string, sizeof(string), "SELECT `Nick`,`Ks`,`Dhs` FROM `USERS` WHERE `Clan` = '%q' COLLATE NOCASE", JugadorInfo[playerid][zClan]);
qresult = db_query(ZLDB, string);
rows = db_num_rows(qresult);
if(rows)
{
new final_string[1280], MiInfoNick[MAX_PLAYER_NAME], MiInfoKill, MiInfoDeath;
strcat(final_string, "#\tNick\tKdr\n");
for(new i = 0; i < rows; i ++)
{
db_get_field_assoc(qresult, "Nick", MiInfoNick, sizeof(MiInfoNick));
MiInfoKill = db_get_field_assoc_int(qresult, "Ks");
MiInfoDeath = db_get_field_assoc_int(qresult, "Dhs");
format(string, sizeof(string), "%d\t%s\t%0.2f\n", (i + 1), MiInfoNick, (float(MiInfoKill) / float(MiInfoDeath)));
strcat(final_string, string);
db_next_row(qresult);
}
ShowPlayerDialog(playerid,DIALOG_SINUSO, DIALOG_STYLE_TABLIST_HEADERS, "-§- Miembros del clan -§-", final_string, "Cerrar", "");
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
}
db_free_result(qresult);
}
}

