case DIALOG_REFERRALS: {
if(!response) return 1;
new szQuery[256], szDialog[1024], Cache: result, money, rp, lvl, regdate[100], ore, name[100], szResult[256];
if(listitem == 0) {
format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `id`='%d'", PlayerInfo[playerid][pReferral]);
result = mysql_query(SQL, szQuery);
cache_get_field_content(0, "name", szResult); format(name, 100, szResult);
if(PlayerInfo[playerid][pReferral] != 0) format(szDialog, sizeof(szDialog), "Ai fost adus pe comunitate de %s.\nTe-ai inregistrat pe data de %s\nCodul tau Referral este %d.", name, PlayerInfo[playerid][pRegistredDate], PlayerInfo[playerid][pSQLID]);
else format(szDialog, sizeof(szDialog), "Nu ai fost adus pe comunitate de cineva.\nTe-ai inregistrat pe %s\nCodul tau Referral este %d.\nAi adus in total %d jucatori.", PlayerInfo[playerid][pRegistredDate], PlayerInfo[playerid][pSQLID], CountReferrals(playerid));
ShowPlayerDialog(playerid, DIALOG_REFERRALS+1, DIALOG_STYLE_MSGBOX, "Referral info", szDialog, "Back", "Exit");
return 1;
}
listitem --;
format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `name`='%s'", Selected[playerid][listitem]);
result = mysql_query(SQL, szQuery);
cache_get_field_content(0, "RegisterDate", szResult); format(regdate, 100, szResult);
cache_get_field_content(0, "Level", szResult); lvl = strval(szResult);
cache_get_field_content(0, "ReferralRP", szResult); rp = strval(szResult);
cache_get_field_content(0, "ReferralMoney", szResult); money = strval(szResult);
cache_get_field_content(0, "ConnectedTime", szResult); ore = strval(szResult);
cache_delete(result);
format(szDialog, sizeof(szDialog), "Informatii despre %s\nInregistrat la data de: %s\nLevel: %d\nOre jucate: %d\nBani castigati de la el: $%s\nRP-uri castigate de la el: %d", Selected[playerid][listitem], regdate, lvl, ore, FormatNumber(money), rp);
ShowPlayerDialog(playerid, DIALOG_REFERRALS+1, DIALOG_STYLE_MSGBOX, "Referral player", szDialog, "Back", "Exit");
}