05.03.2016, 00:28
PHP код:
case DIALOG_VERMIEMBROSCLAN:
{
if(response)
{
new DBResult:qresult;
new count=0,string[128];
format(string, sizeof(string), "SELECT Nick,Ks,Dhs FROM `USERS` WHERE `Clan` = '%s' COLLATE NOCASE",DB_Escape(JugadorInfo[playerid][zClan]));
qresult = db_query(ZLDB, string);
count = db_num_rows(qresult);
if(count > 0)
{
new final_string[1280],MiInfoNick[MAX_PLAYER_NAME],MiInfoKill,MiInfoDeath;
strcat(final_string,"#\tNick\tKdr\n");
for(new a=0;a<count;a++)
{
db_get_field_assoc(qresult, "Nick",MiInfoNick,sizeof MiInfoNick);
db_get_field_assoc(qresult, "Ks",string,sizeof string);
MiInfoKill = strval(string);
db_get_field_assoc(qresult, "Dhs",string,sizeof string);
MiInfoDeath = strval(string);
format(string,sizeof(string),"%d\t%s\t%0.2f\n",a+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);
}
}