PDA

View Full Version : MySQL problem


PakPak
16/07/2013, 09:29 PM
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'


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);
}



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.

JustBored
16/07/2013, 09:51 PM
public OnQueryFinish(query[], resultid, extraid, connectionHandle)
{
mysql_store_result();
if(resultid == QUERY_LOGIN)
{
if(mysql_num_rows() != 0)
{
mysql_free_result();
Spawn(extraid);
}

PakPak
16/07/2013, 10:06 PM
Still nothing happend, but thanks for your help.

PakPak
17/07/2013, 11:25 AM
Sorry for the bump.

Bakr
17/07/2013, 11:31 AM
Are you passing the player's ID through the extraid parameter?

PakPak
17/07/2013, 11:38 AM
Thank you!