[Ajuda] De PHP para Pawn
#8

Amigo, й o R6-2.

tem uma forma melhor? a forma que eu tф usando nгo dб certo.

minha OnPlayerRequestClass:

pawn Код:
public OnPlayerRequestClass(playerid)
{
    new query[300], pname[24]/*, SkinBD[2]*/;
    GetPlayerName(playerid, pname, 24);
    format(query, sizeof(query), "SELECT * FROM contas WHERE nick = '%s'", pname);
    mysql_query(query);
    mysql_store_result();
    while(mysql_fetch_row_format(query,"|"))
    {
        PegaBD(playerid);    
    }
    mysql_free_result();

   
   
    return 1;
}
a funзгo PegaBD(playerid):
pawn Код:
public PegaBD(playerid)
{
    new temp[30];
   

    mysql_fetch_field_row(temp, "idade");  format(PlayerInfo[playerid][pIdade], 3, temp);
    mysql_fetch_field_row(temp, "sexo");  format(PlayerInfo[playerid][pSexo], 3, temp);
    mysql_fetch_field_row(temp, "pais");  format(PlayerInfo[playerid][pPais], 3, temp);
    mysql_fetch_field_row(temp, "idioma");  format(PlayerInfo[playerid][pIdioma], 3, temp);
    mysql_fetch_field_row(temp, "skin");  format(PlayerInfo[playerid][pSkin], 3, temp);
    mysql_fetch_field_row(temp, "skin_sec");  format(PlayerInfo[playerid][pSkinSec], 3, temp);
    mysql_fetch_field_row(temp, "dinheiro");  format(PlayerInfo[playerid][pDinheiro], 3, temp); GivePlayerMoney(playerid, PlayerInfo[playerid][pDinheiro]);
    mysql_fetch_field_row(temp, "celular");  format(PlayerInfo[playerid][pCelular], 3, temp);
    mysql_fetch_field_row(temp, "level");  format(PlayerInfo[playerid][pLevel], 3, temp);
    mysql_fetch_field_row(temp, "horas_jogadas");  format(PlayerInfo[playerid][pHorasJogadas], 11, temp);
    mysql_fetch_field_row(temp, "admin"); format(PlayerInfo[playerid][pAdmin], 1, temp);
    mysql_fetch_field_row(temp, "spawn"); format(PlayerInfo[playerid][pSpawn], 3, temp);

    return 1;
}
Reply


Messages In This Thread
De PHP para Pawn - by Mutuka_XTreme - 09.04.2013, 06:14
Re: De PHP para Pawn - by ReDKiiL - 09.04.2013, 08:04
Re: De PHP para Pawn - by Mutuka_XTreme - 09.04.2013, 16:29
AW: Re: De PHP para Pawn - by Mutuka_XTreme - 09.04.2013, 17:01
Re: De PHP para Pawn - by ReDKiiL - 09.04.2013, 17:22
AW: De PHP para Pawn - by Mutuka_XTreme - 09.04.2013, 17:23
Re: De PHP para Pawn - by ReDKiiL - 09.04.2013, 17:24
AW: De PHP para Pawn - by Mutuka_XTreme - 09.04.2013, 17:30
Re: De PHP para Pawn - by ReDKiiL - 09.04.2013, 17:35
Re: De PHP para Pawn - by Mutuka_XTreme - 09.04.2013, 17:41

Forum Jump:


Users browsing this thread: 1 Guest(s)