Kick_West
Умник
Вылазит такие иероглифы, я полагаю проблема здесь, но хз, поправьте меня)
Код:
stock ShowCaptureTasher(playerid,listitem)
{
string="";
mysql_format(db_handle,string,455,"SELECT `Name`,`kill_capture`, `pMember` FROM `accounts` ORDER BY `kill_capture` DESC LIMIT 10",(!listitem?(17):(listitem==1)?(18):(listitem==2)?(12):(listitem==3)?(15):(13)));
mysql_tquery(db_handle,string,"ShowTop10Capture", "ii",playerid,(!listitem?(17):(listitem==1)?(18):(listitem==2)?(12):(listitem==3)?(15):(13)));
return 1;
}
forward ShowTop10Capture(playerid,fraction);
public ShowTop10Capture(playerid,fraction)
{
new rows,fields;
cache_get_data(rows,fields,db_handle);
new str[] = "%s{c0c0c0}%i место: "WHITE"%s. Убийств = %i. (Банда: {%06x} %s)\n\n"; string=""; new NAME[24];
for(new i; i < rows; i++)
{
if(cache_get_field_content_int(i, "pMember") != fraction) continue;
cache_get_field_content(i, "Name", NAME, db_handle);
format(string,sizeof(string),str,string,i+1,cache_get_field_content_int(i, "kill_capture", db_handle),FractionInfo[fraction][fColor] >>> 8,FractionInfo[fraction][fName]);
}
ShowPlayerDialog(playerid, 0000, DIALOG_STYLE_MSGBOX, ""SERVER"Топ 10 лучших каптурщиков банды:", string, "Принять", "");
return 1;
}
