29.09.2018, 12:10
Quote:
PHP код:
|
PHP код:
LoadPlayerBankCards(playerid)
{
new p_name_inside_f[MAX_PLAYER_NAME], Dialog_String[226];
GetPlayerName(playerid, p_name_inside_f, sizeof(p_name_inside_f));
format(Dialog_String, sizeof(Dialog_String), "\tBaratis Saxeli\tTanxa\n");
if(SQL::RowExistsEx("bank-cards", "username", p_name_inside_f))
{
new handle = SQL::OpenEx(SQL::MREAD, "bank-cards", "username", p_name_inside_f);
SQL::ReadRetrievedRows(handle, i)
{
SQL::ReadString(handle, "cardname", p_bank_card[playerid][p_bank_card_loaded[playerid]][name], 64, i);
SQL::ReadInt(handle, "cash", p_bank_card[playerid][p_bank_card_loaded[playerid]][cash], i);
SQL::ReadInt(handle, "id", p_bank_card[playerid][p_bank_card_loaded[playerid]][b_c_id], i);
format(cards_info, sizeof(cards_info), "\t%s\t%d\n", p_bank_card[playerid][p_bank_card_loaded[playerid]][name], p_bank_card[playerid][p_bank_card_loaded[playerid]][cash]);
strcat(Dialog_String, cards_info);
}
SQL::Close(handle);
}
else
{
SendClientMessage(playerid, -1, "Tqven Ar Gaqvt Sabanko Baratebi!");
}
ShowPlayerDialog(playerid, 81, DIALOG_STYLE_TABLIST_HEADERS, "Sabanko Baratebi", Dialog_String, "Sworia", "Bugia");
return 1;
}