[Pedido] Passar de PHP para Pawn.
#6

Quote:
Originally Posted by [Y]Falcon
Посмотреть сообщение
pawn Код:
#include "a_samp"
#include "mysql"

new connectionhandle,
    numrows,
    numfields
;

main()
{
    connectionhandle = mysql_connect("", "", "", "");
    mysql_function_query(connectionhandle, "SELECT * FROM `usuarios` ORDER BY Matou DESC LIMIT 10", true, "sql_receive", "");
}

forward sql_receive(); public sql_receive()
{
    print("Nome  Matou  Morreu  Eagle  Shotgun  M4  Sniper  Remedios  Comida  Vida  Fome  Sono");
   
    static queryresult[12][50];
    cache_get_data(numrows, numfields, connectionhandle);
    for(new ii; ii != numrows; ii++)
    {
        cache_get_field_content(ii, "Nome", queryresult[0], connectionhandle);
        cache_get_field_content(ii, "Matou", queryresult[1], connectionhandle);
        cache_get_field_content(ii, "Morreu", queryresult[2], connectionhandle);
        cache_get_field_content(ii, "Eagle", queryresult[3], connectionhandle);
        cache_get_field_content(ii, "Shot", queryresult[4], connectionhandle);
        cache_get_field_content(ii, "M4", queryresult[5], connectionhandle);
        cache_get_field_content(ii, "Sniper", queryresult[6], connectionhandle);
        cache_get_field_content(ii, "Remedios", queryresult[7], connectionhandle);
        cache_get_field_content(ii, "Comida", queryresult[8], connectionhandle);
        cache_get_field_content(ii, "Vida", queryresult[9], connectionhandle);
        cache_get_field_content(ii, "Fome", queryresult[10], connectionhandle);
        cache_get_field_content(ii, "Sono", queryresult[11], connectionhandle);
        printf("%s - %02i - %02i - %02i - %02i - %02i - %02i - %02i - %02i - %f - %f - %f",
        queryresult[0], queryresult[1], queryresult[2], queryresult[3], queryresult[4], queryresult[5],
        queryresult[6], queryresult[7], queryresult[8], queryresult[9], queryresult[10], queryresult[11]);
    }
    return 0x01;
}
й nessas horas que notamos como pawn й "limitado", boa sorte
Tentei fazer isso porem nгo deu muito certo..
Fiz um top 5 somente dos players que estгo online.
Como vocк disse, o pawn й muito limitado

Abraзos e obrigado pela ajuda.
Reply


Messages In This Thread
Passar de PHP para Pawn. - by HumildadeAgain - 11.03.2013, 20:53
Re: Passar de PHP para Pawn. - by rannyere - 11.03.2013, 21:10
Re: Passar de PHP para Pawn. - by Joao Pedro - 11.03.2013, 21:12
Re: Passar de PHP para Pawn. - by HumildadeAgain - 11.03.2013, 21:16
Re: Passar de PHP para Pawn. - by Falcon. - 11.03.2013, 21:18
Re: Passar de PHP para Pawn. - by HumildadeAgain - 11.03.2013, 21:34

Forum Jump:


Users browsing this thread: 3 Guest(s)