19.02.2012, 17:50
You can do this:
Now in OnQueryFinish use extraid instead of playerid, and cmd_giveplayerid instead of giveplayerid.
EDIT: In R7, you can create your own functions with your custom parameters, so you haven't to use OnQueryFinish with only 1 parameter (extraid).
pawn Код:
new cmd_giveplayerid;
CMD:yourcmd(playerid, params[])
{
new giveplayerid;
// something to do before the query
cmd_giveplayerid = giveplayerid;
mysql_query("query, blabla", THREADID, playerid);
return 1;
}
public OnQueryFinish(...)
{
if(resultid == THREADID)
{
// code to execute after query
}
return 1;
}
EDIT: In R7, you can create your own functions with your custom parameters, so you haven't to use OnQueryFinish with only 1 parameter (extraid).