MySQL problem
#1

Hello,

I've some issues with OnQueryFinish, I'd like to hide some textdraws after the query but nothing happend. I think it's related to 'playerid'

pawn Код:
public OnQueryFinish(query[], resultid, extraid, connectionHandle)
{
    mysql_store_result();
    new type = extraid;
    new playerid = resultid;
    if(type == QUERY_LOGIN)
    {
        if(mysql_num_rows() != 0)
        {
            mysql_free_result();
            Spawn(playerid);
        }
pawn Код:
public Spawn(playerid)
{
    new str[80];
    format(str, sizeof(str),"Bienvenue %s.",PlayerInfo[playerid][Nom]);
    SendClientMessage(playerid, COLOR_BLUE, str);
    TogglePlayerControllable(playerid,1);
    CancelSelectTextDraw(playerid);
    PlayerInfo[playerid][Logged] = 1;
    TextDrawHideForPlayer(playerid,box0);
    TextDrawHideForPlayer(playerid,box1);
    TextDrawHideForPlayer(playerid,titre1[playerid]);
    TextDrawHideForPlayer(playerid,msg1[playerid]);
    TextDrawHideForPlayer(playerid,msg2[playerid]);
    TextDrawHideForPlayer(playerid,errormsg1[playerid]);
    TextDrawHideForPlayer(playerid,suivant);
}
Thanks in advance.
Reply
#2

pawn Код:
public OnQueryFinish(query[], resultid, extraid, connectionHandle)
{
    mysql_store_result();
    if(resultid == QUERY_LOGIN)
    {
        if(mysql_num_rows() != 0)
        {
            mysql_free_result();
            Spawn(extraid);
        }
Reply
#3

Still nothing happend, but thanks for your help.
Reply
#4

Sorry for the bump.
Reply
#5

Are you passing the player's ID through the extraid parameter?
Reply
#6

Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)