[Ajuda] Log Faccзгo
#4

Bom fiz da seguinte forma e funcionou.

pawn Код:
forward showResults(playerid);


new var[100];
format(var ,sizeof(var), "SELECT * FROM logfaccao WHERE gang = '%s' LIMIT 10", GangInfo[PlayerInfo[playerid][pLider]][gGang]);
mysql_function_query(Connect, var, true, "showResults", "i", playerid);



public showResults(playerid) {

    new row_, field_, gang[100], acao[200], str[300], tito[900];
    cache_get_data(row_, field_, Connect);

    if ( row_ != 0 ) {

        new i;

        for ( i = 0; i < row_; ++i ) {

            cache_get_field_content(i, "gang", gang);
            cache_get_field_content(i, "acao", acao);

            format(str, sizeof(str), "[%s] %s\n",gang, acao);
            strcat(tito,str);
        }
        ShowPlayerDialog(playerid, Dialog_Faccao_VerLog, DIALOG_STYLE_LIST, "Log da Facзгo", tito, "Fechar", #);
    }
    else
        ShowPlayerDialog(playerid, Dialog_Faccao_VerLog, DIALOG_STYLE_LIST, "Log da Facзгo", "Nenhum resultado encontrado!", "Fechar", #);
    return 1;
}
OBS: Fiz conforme a tabela que tenho em meu banco de dados.


Se o problema persistir execute a Query diretamente em seu banco de dados e veja se o problema nгo й com a mesma.
Reply


Messages In This Thread
Log Faccзгo - by mau.tito - 19.12.2013, 15:38
Re: Log Faccзгo - by Gii - 19.12.2013, 16:38
Re: Log Faccзгo - by mau.tito - 19.12.2013, 17:02
Re: Log Faccзгo - by Gii - 19.12.2013, 17:37
Re: Log Faccзгo - by mau.tito - 19.12.2013, 21:10

Forum Jump:


Users browsing this thread: 1 Guest(s)